Skip to content

Add py to requirements#7692

Merged
Pierre-Sassoulas merged 1 commit intopylint-dev:mainfrom
cdce8p:add-py-dependency
Oct 31, 2022
Merged

Add py to requirements#7692
Pierre-Sassoulas merged 1 commit intopylint-dev:mainfrom
cdce8p:add-py-dependency

Conversation

@cdce8p
Copy link
Copy Markdown
Member

@cdce8p cdce8p commented Oct 31, 2022

Description

The py package is used in a number of test files without being an explicit dependency. On linux it is installed with either pytest-xdist or tox, but that doesn't cover pypy, windows, and macos. If these environments are rebuild from scratch, the tests would fail.

https://github.com/PyCQA/pylint/blob/004fc7483ff6cd99ddd19dd6a572011797b138b0/tests/test_self.py#L30

https://github.com/PyCQA/pylint/blob/004fc7483ff6cd99ddd19dd6a572011797b138b0/tests/test_self.py#L164-L166

https://github.com/PyCQA/pylint/blob/004fc7483ff6cd99ddd19dd6a572011797b138b0/tests/test_pylint_runners.py#L17

@cdce8p cdce8p added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer Maintenance Discussion or action around maintaining pylint or the dev workflow labels Oct 31, 2022
@cdce8p cdce8p added this to the 2.15.6 milestone Oct 31, 2022
@cdce8p cdce8p added the Skip news 🔇 This change does not require a changelog entry label Oct 31, 2022
Copy link
Copy Markdown
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Should we change the typing instead ? I suppose there is no LocalPath fixture used by pytest on Windows or they would use the dependency themself.

@cdce8p
Copy link
Copy Markdown
Member Author

cdce8p commented Oct 31, 2022

Should we change the typing instead ? I suppose there is no LocalPath fixture used by pytest on Windows or they would use the dependency themself.

With the latest release of pytest, they started vendoring the parts of the py package. However, the docs still mention py._path.local.LocalPath as return type. https://docs.pytest.org/en/7.1.x/reference/reference.html#tmpdir

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 3360243381

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.377%

Totals Coverage Status
Change from base Build 3359757897: 0.0%
Covered Lines: 17205
Relevant Lines: 18039

💛 - Coveralls

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on pytest:
The following messages are now emitted:

Details
  1. inconsistent-return-statements:
    Either all return statements in a function should return an expression, or none of them should.
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/pytester.py#L301
  2. no-name-in-module:
    No name 'NOSE_SUPPORT_METHOD' in module '_pytest.deprecated'
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/python.py#L62
  3. no-name-in-module:
    No name 'PytestReturnNotNoneWarning' in module '_pytest.warning_types'
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/python.py#L81
  4. inconsistent-return-statements:
    Either all return statements in a function should return an expression, or none of them should.
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/python.py#L1085
  5. inconsistent-return-statements:
    Either all return statements in a function should return an expression, or none of them should.
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/fixtures.py#L130
  6. inconsistent-return-statements:
    Either all return statements in a function should return an expression, or none of them should.
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/python_api.py#L798
  7. no-name-in-module:
    No name 'NOSE_SUPPORT' in module '_pytest.deprecated'
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/nose.py#L5
  8. no-name-in-module:
    No name 'warn_explicit_for' in module '_pytest.warning_types'
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/config/__init__.py#L62
  9. no-member:
    Module '_pytest.deprecated' has no 'HOOK_LEGACY_MARKING' member
    https://github.com/pytest-dev/pytest/blob/8e2de91bf85118c9d992c26cb488ddcf30dbdb66/src/_pytest/config/__init__.py#L369

This comment was generated for commit d6834ec

@Pierre-Sassoulas Pierre-Sassoulas merged commit 5bd8485 into pylint-dev:main Oct 31, 2022
@cdce8p cdce8p deleted the add-py-dependency branch October 31, 2022 10:35
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Nov 16, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request Nov 16, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants