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

Drop dependency on py.io #571

Merged
merged 3 commits into from Nov 3, 2022
Merged

Drop dependency on py.io #571

merged 3 commits into from Nov 3, 2022

Conversation

drothlis
Copy link
Contributor

@drothlis drothlis commented Nov 3, 2022

Since pytest 7.2.0 was released 2 weeks ago (2022-10-23), CI fails against pytest-latest:

INTERNALERROR>     tw = py.io.TerminalWriter()
INTERNALERROR> AttributeError: module 'py' has no attribute 'io'

Pytest 7.2.0 dropped its dependency on the py package. We don't specify py explicitly as a dependency, so tests starting failing since the release of pytest 7.2.0.

To drop this dependency, pytest vendored py.io.TerminalWriter into _pytest._io in pytest commit 276405a03 (6.0.0rc1). We require pytest>=6.2, so we can import it from there.

Pytest 7.2.0 dropped its dependency on the `py` package. We don't
specify `py` explicitly as a dependency, so tests starting failing since
the release of pytest 7.2.0.

To drop this dependency, pytest vendored `py.io.TerminalWriter` into
`_pytest._io` in pytest commit 276405a03 (6.0.0rc1). It looks like we
still support pytest 5.0 —at least it's listed in tox.ini— so I fall
back to importing from `py.io` if it isn't present in `_pytest`.

This was our only direct use of the `py` library.
We require pytest>=6.2; `_pytest._io.TerminalWriter` exists since
6.0.0rc1. See the previous commit for details.
These aren't used in the `envlist` earlier in `tox.ini`.
`CHANGES.rst` says we require pytest>=6.2.
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Base: 98.49% // Head: 98.49% // No change to project coverage 👍

Coverage data is based on head (411afa6) compared to base (fb7ede3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #571   +/-   ##
=======================================
  Coverage   98.49%   98.49%           
=======================================
  Files          32       32           
  Lines         733      733           
  Branches       16       16           
=======================================
  Hits          722      722           
  Misses          9        9           
  Partials        2        2           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@youtux youtux left a comment

Choose a reason for hiding this comment

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

Thank you!

@youtux youtux merged commit 33fbca4 into pytest-dev:master Nov 3, 2022
@drothlis drothlis deleted the py-io branch November 3, 2022 21:24
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

2 participants