Imported Upstream version 62.3.2 upstream/62.3.2
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:49 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:49 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/command/build_py.py
setuptools/command/dist_info.py
setuptools/config/_apply_pyprojecttoml.py
setuptools/config/pyprojecttoml.py

index 4b8d9d0b7f567d4831c0a32ef935c0f968fcfb2b..755cb1bde9615eb402369118c77550dbe720cc33 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 62.3.1
+current_version = 62.3.2
 commit = True
 tag = True
 
index d30152966fcf5e5ad42b84089d4cdeb539b3327f..32492897cb432f6af901000953d7fef4b5c89b46 100644 (file)
@@ -1,3 +1,12 @@
+v62.3.2
+-------
+
+
+Misc
+^^^^
+* #3328: Include a first line summary to some of the existing multi-line warnings.
+
+
 v62.3.1
 -------
 
index f4a5473f7eca2de5a22ac3601fc40a56181d504e..7380717522908deda4370877471e74bf08fd955a 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = setuptools
-version = 62.3.1
+version = 62.3.2
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
 description = Easily download, build, install, upgrade, and uninstall Python packages
index 91f47416706d4560b39bf72abdc9a3d2383a1897..d2ccb514dff53ea20e91c60cc9873db0ef775f91 100644 (file)
@@ -256,6 +256,7 @@ class _IncludePackageDataAbuse:
     """Inform users that package or module is included as 'data file'"""
 
     MESSAGE = """\
+    Installing {importable!r} as data is deprecated, please list it in `packages`.
     !!\n\n
     ############################
     # Package would be ignored #
@@ -266,7 +267,9 @@ class _IncludePackageDataAbuse:
     therefore is considered deprecated).
 
     Please make sure that {importable!r} is included as a package by using
-    setuptools' `packages` configuration field or the proper discovery methods.
+    setuptools' `packages` configuration field or the proper discovery methods
+    (for example by using `find_namespace_packages(...)`/`find_namespace:`
+    instead of `find_packages(...)`/`find:`).
 
     You can read more about "package discovery" and "data files" on setuptools
     documentation page.
index 8b8509f3df10e15e00a43cf46e687cd50361d2cb..ca540ad119ecde6117572cc243f854a1c0f41310 100644 (file)
@@ -54,7 +54,8 @@ def _version(version: str) -> str:
     try:
         return str(packaging.version.Version(v)).replace("-", "_")
     except packaging.version.InvalidVersion:
-        msg = f"""!!\n\n
+        msg = f"""Invalid version: {version!r}.
+        !!\n\n
         ###################
         # Invalid version #
         ###################
index 4b4ed9dff1493311b0c082cc6a40a8a57ac08a7f..3bf8cc2b236c210d1fb305943c9351618958bd69 100644 (file)
@@ -341,7 +341,10 @@ _PREVIOUSLY_DEFINED = {
 
 
 class _WouldIgnoreField(UserWarning):
-    """Inform users that ``pyproject.toml`` would overwrite previously defined metadata:
+    """Inform users that ``pyproject.toml`` would overwrite previous metadata."""
+
+    MESSAGE = """\
+    {field!r} defined outside of `pyproject.toml` would be ignored.
     !!\n\n
     ##########################################################################
     # configuration would be ignored/result in error due to `pyproject.toml` #
@@ -369,5 +372,4 @@ class _WouldIgnoreField(UserWarning):
     @classmethod
     def message(cls, field, value):
         from inspect import cleandoc
-        msg = "\n".join(cls.__doc__.splitlines()[1:])
-        return cleandoc(msg.format(field=field, value=value))
+        return cleandoc(cls.MESSAGE.format(field=field, value=value))
index be812142e020b63d3fbe5edc67f7172f767707e9..976eb0634ccb694c8706eb45d5035a31945ea617 100644 (file)
@@ -418,7 +418,7 @@ class _ExperimentalProjectMetadata(UserWarning):
 
 
 class _InvalidFile(UserWarning):
-    """Inform users that the given `pyproject.toml` is experimental:
+    """The given `pyproject.toml` file is invalid and would be ignored.
     !!\n\n
     ############################
     # Invalid `pyproject.toml` #
@@ -436,5 +436,4 @@ class _InvalidFile(UserWarning):
     @classmethod
     def message(cls):
         from inspect import cleandoc
-        msg = "\n".join(cls.__doc__.splitlines()[1:])
-        return cleandoc(msg)
+        return cleandoc(cls.__doc__)