Imported Upstream version 51.2.0 upstream/51.2.0
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:30 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:30 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
docs/setuptools.rst
docs/userguide/entry_point.rst
pkg_resources/__init__.py
setup.cfg
setuptools/tests/test_easy_install.py

index 432c813062efa387fb928583792a17c9d6ff6c19..facadd5f3b8cbfcc0633ea92d2b779e92677f0b1 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 51.1.2
+current_version = 51.2.0
 commit = True
 tag = True
 
index 5f69c6abbcfa640ddcc4d98e600776d795c55e21..e51b5e646c8d587af925bf3da2e0dc02d10f8468 100644 (file)
@@ -1,3 +1,21 @@
+v51.2.0
+-------
+
+
+Changes
+^^^^^^^
+* #2493: Use importlib.import_module() rather than the deprectated loader.load_module()
+  in pkg_resources namespace delaration -- by :user:`encukou`
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2525: Fix typo in the document page about entry point. -- by :user:`jtr109`
+
+Misc
+^^^^
+* #2534: Avoid hitting network during test_easy_install.
+
+
 v51.1.2
 -------
 
@@ -13,7 +31,7 @@ v51.1.1
 
 Misc
 ^^^^
-* #2525: Avoid hitting network during test_virtualenv.test_test_command.
+* #2534: Avoid hitting network during test_virtualenv.test_test_command.
 
 
 v51.1.0
index 1000a0cebf42190d43cde0037dfac6e00886be52..05516a4e3105b4a97795e6144c4650320738fa0c 100644 (file)
@@ -157,7 +157,7 @@ To use this feature:
       ]
       build-backend = "setuptools.build_meta"
 
-* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``pep517``.
+* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``build``.
 
   .. warning::
 
index edab446502b8ec325c35fb7c8c88e99f321105f5..738207282cb0bb342118e599478927f70e82632c 100644 (file)
@@ -28,7 +28,7 @@ with ``__init__.py`` as:
 
 .. code-block:: python
 
-    def helloworld():
+    def hello_world():
         print("Hello world")
 
 and ``__main__.py`` providing a hook:
index 737f4d5fad1e8a7e86ed4e600d4f2337420c2535..99b7f680753deda3929a711e2054af3cf5ec5456 100644 (file)
@@ -38,6 +38,7 @@ import itertools
 import inspect
 import ntpath
 import posixpath
+import importlib
 from pkgutil import get_importer
 
 try:
@@ -2209,7 +2210,7 @@ def _handle_ns(packageName, path_item):
     if subpath is not None:
         path = module.__path__
         path.append(subpath)
-        loader.load_module(packageName)
+        importlib.import_module(packageName)
         _rebuild_mod_path(path, packageName, module)
     return subpath
 
index dff72caf38bcfb44c17b8c05a46d57dafe72ef4a..451abe835ae1cf4e756d3accb9b57b9b743383cc 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,7 @@
 [metadata]
 license_file = LICENSE
 name = setuptools
-version = 51.1.2
+version = 51.2.0
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
 description = Easily download, build, install, upgrade, and uninstall Python packages
index dc00e697de615c46594dd8ffacc6f138aea9629f..6aa17e9414192fbd36cdb8df8ef4ef6fb372d617 100644 (file)
@@ -38,6 +38,16 @@ from .files import build_files
 from .textwrap import DALS
 
 
+@pytest.fixture(autouse=True)
+def pip_disable_index(monkeypatch):
+    """
+    Important: Disable the default index for pip to avoid
+    querying packages in the index and potentially resolving
+    and installing packages there.
+    """
+    monkeypatch.setenv('PIP_NO_INDEX', 'true')
+
+
 class FakeDist:
     def get_entry_map(self, group):
         if group != 'console_scripts':
@@ -445,6 +455,7 @@ class TestSetupRequires:
         """
         monkeypatch.setenv(str('PIP_RETRIES'), str('0'))
         monkeypatch.setenv(str('PIP_TIMEOUT'), str('0'))
+        monkeypatch.setenv('PIP_NO_INDEX', 'false')
         with contexts.quiet():
             # create an sdist that has a build-time dependency.
             with TestSetupRequires.create_sdist() as dist_file:
@@ -618,6 +629,7 @@ class TestSetupRequires:
     def test_setup_requires_honors_pip_env(self, mock_index, monkeypatch):
         monkeypatch.setenv(str('PIP_RETRIES'), str('0'))
         monkeypatch.setenv(str('PIP_TIMEOUT'), str('0'))
+        monkeypatch.setenv('PIP_NO_INDEX', 'false')
         monkeypatch.setenv(str('PIP_INDEX_URL'), mock_index.url)
         with contexts.save_pkg_resources_state():
             with contexts.tempdir() as temp_dir: