From: DongHun Kwak Date: Tue, 29 Dec 2020 22:07:49 +0000 (+0900) Subject: Imported Upstream version 49.3.1 X-Git-Tag: upstream/49.3.1^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e4df063452f0a4119fb8d3c1f4607a1821136f6;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 49.3.1 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 99e5def..bb1e621 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.3.0 +current_version = 49.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index da0eada..df0230e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +vv49.3.1 +-------- + +* #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. + + v49.3.0 ------- diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 71fa7ce..1e7b294 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -16,9 +16,12 @@ def warn_distutils_present(): # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 return warnings.warn( - "Distutils was imported before Setuptools. This usage is discouraged " - "and may exhibit undesirable behaviors or errors. Please use " - "Setuptools' objects directly or at least import Setuptools first.") + "Distutils was imported before Setuptools, but importing Setuptools " + "also replaces the `distutils` module in `sys.modules`. This may lead " + "to undesirable behaviors or errors. To avoid these issues, avoid " + "using distutils directly, ensure that setuptools is installed in the " + "traditional way (e.g. not an editable install), and/or make sure that " + "setuptools is always imported before distutils.") def clear_distutils(): @@ -56,8 +59,8 @@ def do_override(): See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ - warn_distutils_present() if enabled(): + warn_distutils_present() ensure_local_distutils() diff --git a/setup.cfg b/setup.cfg index fd3b11e..5244019 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.3.0 +version = 49.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org