-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Python 3.12] Deprecate distutil #34186
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XuanWang-Amos
added
the
release notes: yes
Indicates if PR needs to be in release notes
label
Aug 28, 2023
grpc-checks
bot
added
per-call-memory/neutral
per-channel-memory/neutral
bloat/none
labels
Aug 28, 2023
XuanWang-Amos
changed the title
[Test] Deprecate distutil
[Python 3.12] Deprecate distutil
Aug 31, 2023
gnossen
approved these changes
Sep 6, 2023
copybara-service
bot
added
the
imported
Specifies if the PR has been imported to the internal repository
label
Sep 7, 2023
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Feb 9, 2024
https://build.opensuse.org/request/show/1145435 by user anag+factory - update to 1.60.1: * Revert change to print backtrace in server - Update to version 1.60.0: * No python specfic changes. - Add patches for embeeded xxhash 0.8.1 from SLE's xxhash package. - Add xxhash-ppc64le-gcc7.patch: fix build failure on ppc64le when using gcc 7 (boo#1208794). - add patch xxhash-avoid-armv6-unaligned-access.patch do not expect unaligned accesses to work on armv6, it breaks in our build setup using aarch64 kernels - Update to version 1.59.2: * No python specific changes. - Update to version 1.59.0: * [Python 3.12] Support Python 3.12 (gh#grpc/grpc#34398). * [Python 3.12] Deprecate distutil (gh#grpc/grpc#34186). - Add minimum required versions for Cython, wheel and abseil-cpp. - Update to version 1.58.0: * [Bazel] Enable grpcio-reflection to be used via
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bloat/none
imported
Specifies if the PR has been imported to the internal repository
lang/Python
per-call-memory/neutral
per-channel-memory/neutral
release notes: yes
Indicates if PR needs to be in release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
distutils
is deprecated with removal planned for Python 3.12 (pep-0632), thus we're trying to replace all distutils usage with setuptools.distutils
if setuptools is installed andSETUPTOOLS_USE_DISTUTILS
is set tolocal
(The default in setuptools, more details can be found in this discussion).How we decide the replacement
Replacement not mentioned in the guide
distutils.utils.get_platform()
withsysconfig.get_platform()
.sysconfig.get_platform()
is good enough for our use cases.DistutilsOptionError
withOptionError
.setuptools.error
is exporting it asOptionError
in the code.setuptools
intest_packages.sh
and changed the version ping to59.6.0
inbuild_artifact_python.bat
.distutils.errors.*
is not fully re-exported until59.0.0
(See this issue for more details).Changes not included in this PR
setuptools
doesn't have similar interface (See this issue for more details), we don't have a clear path to replace them yet.