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 py dependency #137

Merged
merged 2 commits into from
Sep 23, 2023
Merged

Remove py dependency #137

merged 2 commits into from
Sep 23, 2023

Conversation

Tenzer
Copy link
Contributor

@Tenzer Tenzer commented Sep 9, 2023

The py.std module is just an alias for the built in Python modules, so doesn't serve any purpose over importing them directly.

TerminalWriter can instead be imported from Pytest directly via a private import, which means the py dependency can be removed.

This follows the suggestions from #110.

My motivation for doing this is that we hit DeprecationWarnings from py when using pytest-xprocess because we elevate warnings to errors when we run tests.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGELOG.rst, summarizing the change and linking to the issue.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and make sure no tests failed.

The `py.std` module is just an alias for the built in Python modules, so
doesn't serve any purpose over importing them directly.

`TerminalWriter` can instead be imported from Pytest directly via a private
import, which means the `py` dependency can be removed.
@jclerman
Copy link

With apologies for the gratuitous tag: @northernSage, it'd be great to have this merged into a new release! pytest-xprocess is the only dependency in several of my repos that relies on py.

Copy link
Member

@northernSage northernSage left a comment

Choose a reason for hiding this comment

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

All seems in order, thanks for taking the time 👍🏻

@northernSage northernSage merged commit 1847ca7 into pytest-dev:master Sep 23, 2023
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.

3 participants