Repository navigation
Conversation
Signed-off-by: Nguyen Quang Minh <135627235+n24q02m@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
setup.pystill importsExtensionandbuild_extfrom the deprecateddistutilspackage (removed from the Python standard library in Python 3.12 via PEP 632):from distutils.core import Extensionfrom distutils.command import build_extOn Python 3.12–3.15, these imports only resolve today because
from setuptools import setupactivates setuptools' internal_distutils_hackshim. Importing directly fromsetuptoolsremoves the unnecessary dependency ondistutilscompatibility shims.Changes
setup.py:from distutils.core import Extensionandfrom distutils.command import build_extwithfrom setuptools import Extension, setupandfrom setuptools.command import build_ext.build-support/,pkg/, and.github/workflows/and confirmed no other files referencedistutils, and all wheel build paths already install/usesetuptools.Verification
rg --hidden -n "distutils" .finds zero remainingdistutilsreferences in tracked source/build/workflow files.python3 -m py_compile setup.pysucceeds on Python 3.12.16.setup.py --name --versionoutputspulsar-client/3.13.0a1withsetuptools 82.0.1.issubclass(my_build_ext, setuptools.command.build_ext.build_ext)isTrue.setup.py build_extandsetup.py bdist_wheelruns copy_pulsar.soviamy_build_ext.build_extensionand produce a valid.whlcontaining_pulsar.cpython-312-x86_64-linux-gnu.soand allpulsarpackages.git diff --checkis clean.