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

Reduce use of deprecated distutils module #353

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

jakelishman
Copy link
Contributor

Per PEP 632, distutils is deprecated and most uses of it can be replaced by setuptools. The only use within testtools is to support the deprecated TestCommand that's due to be removed in the next major, but in the meantime, adding a runtime dependency on setuptools for Python 3.12+ (which removed distutils entirely) allows it to continue working.

Fix #352.

Per PEP 632, `distutils` is deprecated and most uses of it can be
replaced by `setuptools`.  The only use within `testtools` is to support
the deprecated `TestCommand` that's due to be removed in the next major,
but in the meantime, adding a runtime dependency on `setuptools` for
Python 3.12+ (which removed `distutils` entirely) allows it to continue
working.
Copy link
Member

@jelmer jelmer left a comment

Choose a reason for hiding this comment

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

thanks!

@jelmer jelmer merged commit a0a9a53 into testing-cabal:master Sep 22, 2023
8 checks passed
@jakelishman jakelishman deleted the fix-disutils-removal branch September 22, 2023 14:09
@philbucher
Copy link

Hi, thanks for the fix!
Do you already have plans for a release with this fix?
Thanks!

tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this pull request May 20, 2024
For Python 3.12, stestr does not work unless testtools >= 2.7.0

See:

https: //github.com/testing-cabal/testtools/pull/353/commits/18e1a7157562b00655561ee25ce0b41d383b2ed1
Change-Id: Idd599d80573f4740a4729d27106c329cc13ac25c
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.

testtools fails to import with Python 3.12
3 participants