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

Add regression test for #6497 #6498

Merged
merged 6 commits into from May 9, 2022

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented May 4, 2022

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #6497 (depends on pylint-dev/astroid#1544)

Backporting an astroid patch upgrade is not essential, but possible?

@jacobtylerwalls jacobtylerwalls added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer Needs astroid update Needs an astroid update (probably a release too) before being mergable labels May 4, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.13.9 milestone May 4, 2022
@coveralls
Copy link

coveralls commented May 4, 2022

Pull Request Test Coverage Report for Build 2296059200

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0003%) to 95.345%

Totals Coverage Status
Change from base Build 2294052651: 0.0003%
Covered Lines: 16017
Relevant Lines: 16799

πŸ’› - Coveralls

@jacobtylerwalls
Copy link
Member Author

Hmm, we have other functional tests using numpy but apparently aren't installing it on CI runs.

@DanielNoord
Copy link
Collaborator

Think it makes sense to do this as not finding modules can have more effect than a simple bad-open-mode false positive.

@Pierre-Sassoulas
Copy link
Member

Backporting an astroid patch upgrade is not essential, but possible?

I think it makes sense, we want to make sure that the fix works. We already got an issue with 2.13.7, and the 2.13 maintenance branch is even more different than 2.14.0-dev0 now. It could also make sense to wait for 2.14 though, it's getting closer.

@jacobtylerwalls
Copy link
Member Author

I think it makes sense, we want to make sure that the fix works. We already got an issue with 2.13.7, and the 2.13 maintenance branch is even more different than 2.14.0-dev0 now. It could also make sense to wait for 2.14 though, it's getting closer.

I'm tempted to wait and just do 2.14 final. May I ask what is the issue with 2.13.8 you had in mind? (Just making sure it's not the one I closed as a dupe!)

@Pierre-Sassoulas
Copy link
Member

May I ask what is the issue with 2.13.8 you had in mind?

We had an issue with the config that changed so cherry-picking went wrong https://github.com/PyCQA/pylint/milestone/64?closed=1, it's fixed now, but this kind of problem can happens again (well we'll fix it before releasing this time, but it's more work).

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review May 9, 2022 12:11
@@ -10,3 +10,4 @@ pytest-profiling~=1.7
pytest-xdist~=2.5
# Type packages for mypy
types-pkg_resources==0.1.3
numpy~=1.22.3
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should add numpy to our standard test requirements, if we do that then we could have code that misbehave if numpy is not installed and we would not know. What we could do is create a CI job where we install additional libraries. It's been a recurring topic when dealing with pandas/numpy, etc. To be clear we need to be able to handle crashes in external lib and make sure that we do not regress but for false positives it's a little blurrier. For django and pytest we deferred to external plugins for false positives. Starting to do lib specific code directly in pylint is a slipery slope, we already have a lot on our plates as it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

I bet I could just rewrite with a fake_package/distutils.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nah, that didn't work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a comment. Adding a new workflow is not a very appealing ROI right now. We tested this with numpy installed in astroid, and if it fails somehow here in pylint again, a contributor will notice.

Copy link
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.

I agree about not adding a new CI job right now. Would you mind adding a test for pydantic's distutil ?

Copy link
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.

πŸ‘

@jacobtylerwalls jacobtylerwalls merged commit 273a8b2 into pylint-dev:main May 9, 2022
@jacobtylerwalls jacobtylerwalls deleted the numpy-distutils branch May 9, 2022 18:44
@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 May 9, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request May 9, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request May 9, 2022
Pierre-Sassoulas pushed a commit that referenced this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Needs astroid update Needs an astroid update (probably a release too) before being mergable Regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pylint (>=2.13.0) cannot find misc_util module in numpy.distutils
4 participants