Skip to content

DEV: add a warningfilter to fix pytest workflow.#20604

Merged
charris merged 1 commit intonumpy:mainfrom
rossbar:fix-test-collection-python3-10
Dec 17, 2021
Merged

DEV: add a warningfilter to fix pytest workflow.#20604
charris merged 1 commit intonumpy:mainfrom
rossbar:fix-test-collection-python3-10

Conversation

@rossbar
Copy link
Contributor

@rossbar rossbar commented Dec 17, 2021

Python 3.10 adds an explicit DeprecationWarning for the distutils module. In the pytest configuration (see pytest.ini) warnings are treated as errors by default, which means the distutils DeprecationWarning breaks test collection by pytest. This PR adds a new warnings filter to the pytest.ini so that the pytest workflow will work w/ Python 3.10+.

@charris
Copy link
Member

charris commented Dec 17, 2021

Is this new? I didn't see the warning on my system (fedora 35).

@rossbar
Copy link
Contributor Author

rossbar commented Dec 17, 2021

It's new with Python 3.10 and only affects those who use pytest directly - AFAICT python runtests.py is unaffected. To reproduce, try running pytest . or pytest --pyargs numpy with python 3.10.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Dec 17, 2021
@charris charris merged commit 5afc767 into numpy:main Dec 17, 2021
@charris
Copy link
Member

charris commented Dec 17, 2021

Thanks Ross. Travis arm64 has been missing all day.

@charris charris added this to the 1.21.5 release milestone Dec 17, 2021
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Dec 17, 2021
@charris charris removed this from the 1.21.5 release milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants