FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove _pytest.compat.is_generator() fixes #12960 · Pull Request #12968 · pytest-dev/pytest · GitHub

Remove _pytest.compat.is_generator() fixes #12960 - #12968

Merged
Zac-HD merged 22 commits into
mainfrom
unknown repository
Nov 18, 2024
Merged

Remove _pytest.compat.is_generator() fixes #12960#12968
Zac-HD merged 22 commits into
mainfrom
unknown repository

Conversation

ghost commented Nov 16, 2024
edited by Zac-HD
Loading

Copy link
Copy Markdown

Fixes #12960

psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 16, 2024

ghost commented Nov 16, 2024
edited by ghost
Loading

Copy link
Copy Markdown
Author

Hi @Zac-HD,

I have enabled the xfail for "yield tests" (which has been a no-op since Pytest 4) and turned it into a hard error, in line with the open issue. However, this change is causing failures in the automated pipeline runs for tests utilizing yield (such as test_verbose_reporting in test_terminal.py).

Would you like me to address these failures as part of this change, or should I leave them for now?

Thank you!

Zac-HD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, @arpitgupta-it!

We'll need to get all the tests passing before we merge - that's how we can tell that the PR didn't break anything unexpected, after all. Based on this case I'd guess that most of the failing tests can be fixed just by deleting the now-an-error yield-test, and any associated xfail expectations.

Comment thread changelog/12960.improvement.rst Outdated
Comment thread src/_pytest/python.py

ghost commented Nov 17, 2024
edited by ghost
Loading

Copy link
Copy Markdown
Author

@Zac-HD Please review. The checks have passed!

Zac-HD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

One quick fix for the changelog entry, and then I think we're ready to merge!

cc @RonnyPfannschmidt, I'll merge in a couple of days unless you object.

Comment thread changelog/12960.improvement.rst Outdated

nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @arpitgupta-it! Please take a look at my comments.

Comment thread changelog/12960.breaking.rst Outdated
Comment thread changelog/12960.breaking.rst Outdated
Comment thread src/_pytest/python.py Outdated
Comment thread testing/test_collection.py Outdated
Comment thread testing/test_collection.py Outdated

ghost commented Nov 18, 2024

Copy link
Copy Markdown
Author

@nicoddemus @Zac-HD @RonnyPfannschmidt are we good to go?

Copy link
Copy Markdown
Member

Thanks @arpitgupta-it!

I will leave it open for a few more days in case others want to review it, otherwise I will merge.

Comment thread doc/en/deprecations.rst

ghost commented Nov 18, 2024

Copy link
Copy Markdown
Author

Sounds like a good plan—I'll keep an eye out in case anyone else has feedback. Let me know if you guys need anything else from my side before the merge!

Copy link
Copy Markdown
Member

Will do, thanks @arpitgupta-it!

Zac-HD commented Nov 18, 2024

Copy link
Copy Markdown
Member

Okay, I think with two core devs happy it's time to merge! Thanks again @arpitgupta-it 🙏

Zac-HD merged commit 270c24a into pytest-dev:main Nov 18, 2024

Copy link
Copy Markdown
Member

@Zac-HD thanks! However in the future please try to rebase/squash commits, as unfortunately a lot of "updated changelog", merge, etc commits landed on main.

Please see https://github.com/pytest-dev/pytest/blob/main/CONTRIBUTING.rst#mergesquash-guidelines in case you missed it. 👍

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove _pytest.compat.is_generator() and just use inspect.isgeneratorfunction() directly

2 participants


Back | FazBrowse Home | New Git URL