Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated features #7660

Merged
merged 11 commits into from Aug 19, 2020
Merged

Conversation

nicoddemus
Copy link
Member

This removes all features which have been deprecated over 2 minor versions ago or more.

@RonnyPfannschmidt also removed resultlog, seems like there's has been enough time for people to try pytest-reportlog and provide feedback.

Close #5585

@@ -59,38 +72,46 @@ display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log``



Node Construction changed to ``Node.from_parent``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result log (``--result-log``)
Copy link
Member Author

Choose a reason for hiding this comment

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

This diff is pretty confusing, suggest to read the full file instead.

@@ -1315,53 +1306,6 @@ def fixture( # noqa: F811
name the decorated function ``fixture_<fixturename>`` and then use
``@pytest.fixture(name='<fixturename>')``.
"""
# Positional arguments backward compatibility.
Copy link
Member Author

Choose a reason for hiding this comment

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

image

"https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent"
" for more details."
).format(name=self.__name__)
fail(msg, pytrace=False)
Copy link
Member Author

Choose a reason for hiding this comment

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

@RonnyPfannschmidt I understand that was the intention in the end, correct?

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

Indeed, the result log one seems jittery but im glad it's going

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

The commits look good to me, really nice to get rid of that cruft.

I'm somewhat anxious about "Hard failure when constructing Node subclasses" however. The problem is that the from_parent API cannot be typed properly, and once we disallow direct construction there is no turning back ever. But maybe at this point we should just accept this.

@nicoddemus
Copy link
Member Author

The problem is that the from_parent API cannot be typed properly, and once we disallow direct construction there is no turning back ever.

Actually I recall @RonnyPfannschmidt mentioning this was supposed to be transitory, but don't remember the details now.

@RonnyPfannschmidt
Copy link
Member

Yup, until we get rid of the tricky mess in some of the ctors from_parent is a necessity mess

@nicoddemus
Copy link
Member Author

FTR that's what https://github.com/pytest-dev/pytest/projects/3 is about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove deprecated features in 6.0
3 participants