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

Deprecate pytest namespace #3735

Merged

Conversation

nicoddemus
Copy link
Member

This is based on #3732, so it is better to review after that PR gets merged.

Fix #2639

This hook has been deprecated and will be removed in the future.

Fix pytest-dev#2639
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.

great 👍

.. warning::
This hook has been **deprecated** and will be removed in pytest 4.0.

Plugins who need this feature are suggested
Copy link
Member

Choose a reason for hiding this comment

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

i propose to align this somewhere along

Plugins whose users depend on the current name-space functionality should prepare to migrate to a namespace they actually own.

To support the migration its suggested to trigger `DeprecationWarnings` for objects they put into the pytest namespace.

An stopgap measure to avoid the warning is to monkeypatch the `pytest` module.
but just as the `pytest_namespace` hook this should be seen as a temporary measure to be removed.

simply to avoid accidentally declaring monkeypatching ´pytest` fine

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure will do

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from features to master July 30, 2018 12:58
@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from master to features July 30, 2018 12:58
@RonnyPfannschmidt
Copy link
Member

the base dance removed the already merged commits, i'm puzzled as to why its not more easy

@nicoddemus
Copy link
Member Author

the base dance removed the already merged commits, i'm puzzled as to why its not more easy

Yeah it should detect that automatically.

@coveralls
Copy link

coveralls commented Jul 30, 2018

Coverage Status

Coverage increased (+0.05%) to 92.544% when pulling 8609f8d on nicoddemus:deprecate-pytest-namespace into 8af78f4 on pytest-dev:features.

@hookspec(historic=True)
@hookspec(
historic=True,
warn_on_impl=RemovedInPytest4Warning(
Copy link
Member

Choose a reason for hiding this comment

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

i just noticed that we didn't declare this one in the deprecated module, lets please move the actual declaration there

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops good catch!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

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.

None yet

4 participants