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

MAINT workaround for bug in setuptools/pkg_resources #21676

Merged

Conversation

ogrisel
Copy link
Member

@ogrisel ogrisel commented Nov 15, 2021

Workaround for pypa/setuptools#2885
Fixes #21674.

@@ -20,6 +20,9 @@ addopts =
filterwarnings =
ignore:the matrix subclass:PendingDeprecationWarning

# Workaround for https://github.com/pypa/setuptools/issues/2885
ignore::DeprecationWarning:pkg_resources
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ignore::DeprecationWarning:pkg_resources
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

maybe?

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 think I understand: when CHECK_WARNINGS='true' the default pytest config from setup.cfg no longer applies.

Copy link
Member Author

Choose a reason for hiding this comment

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

and indeed when we have -Werror::DeprecationWarning in the commandline, we also need -Wignore:Creating\ a\ LegacyVersion:DeprecationWarning in the commandline. -Wignore::DeprecationWarning:pkg_resources does not work, probably because it does not subsume error::DeprecationWarning in the pytest logic.

Copy link
Member

Choose a reason for hiding this comment

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

interesting, confusing!

@ogrisel
Copy link
Member Author

ogrisel commented Nov 15, 2021

The setuptools 59.1 release has been yanked (pypa/setuptools#2885 (comment)) so this workaround should not be needed anymore.

@ogrisel ogrisel closed this Nov 15, 2021
@ogrisel ogrisel deleted the workaround-for-pkg_resources-bug branch November 15, 2021 14:19
@ogrisel ogrisel restored the workaround-for-pkg_resources-bug branch November 15, 2021 14:21
@ogrisel ogrisel reopened this Nov 15, 2021
@ogrisel
Copy link
Member Author

ogrisel commented Nov 15, 2021

Actually by the time the yanking propagates to conda-based distributions, it might be better to apply this workaround.

@ogrisel
Copy link
Member Author

ogrisel commented Nov 15, 2021

Windows py37_conda_forge_mkl is green! @adrinjalali shall we merge?

Edit: my closing / reopening of this PR triggered another Azure pipelines build. Maybe waiting for this to complete is safer.

Edit 2: too late, @adrinjalali was too quick ;)

@adrinjalali adrinjalali merged commit a0b5e1b into scikit-learn:main Nov 15, 2021
@ogrisel ogrisel deleted the workaround-for-pkg_resources-bug branch November 15, 2021 14:25
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Nov 20, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 22, 2021
)

* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
)

* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
)

* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
ogrisel pushed a commit that referenced this pull request Dec 9, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
)

* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
glemaitre pushed a commit that referenced this pull request Dec 25, 2021
* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
glemaitre pushed a commit that referenced this pull request Dec 25, 2021
mathijs02 pushed a commit to mathijs02/scikit-learn that referenced this pull request Dec 27, 2022
)

* MAINT workaround for bug in setuptools/pkg_resources

* Additional workakaround for CHECK_WARNINGS commandline
mathijs02 pushed a commit to mathijs02/scikit-learn that referenced this pull request Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants