Skip to content

Commit a49a1bb

Browse files
committed
Merge branch 'main' into feature/pep-621
2 parents 9296481 + d8148cc commit a49a1bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1051
-5897
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ jobs:
6161
- platform: ubuntu-latest
6262
python: "3.10"
6363
distutils: stdlib
64+
# Python 3.8, 3.9 are on macos-13 but not macos-latest (macos-14-arm64)
65+
# https://github.com/actions/setup-python/issues/850
66+
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
67+
- {python: "3.8", platform: "macos-13"}
68+
exclude:
69+
- {python: "3.8", platform: "macos-latest"}
6470
runs-on: ${{ matrix.platform }}
6571
continue-on-error: ${{ matrix.python == '3.13' }}
6672
env:
@@ -89,7 +95,8 @@ jobs:
8995
shell: bash
9096
run: |
9197
rm -rf dist
92-
pipx run build
98+
# workaround for pypa/setuptools#4333
99+
pipx run --pip-args 'pyproject-hooks!=1.1' build
93100
echo "PRE_BUILT_SETUPTOOLS_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV
94101
echo "PRE_BUILT_SETUPTOOLS_WHEEL=$(ls dist/*.whl)" >> $GITHUB_ENV
95102
rm -rf setuptools.egg-info # Avoid interfering with the other tests
@@ -122,6 +129,7 @@ jobs:
122129
job:
123130
- diffcov
124131
- docs
132+
- check-extern
125133
runs-on: ubuntu-latest
126134
steps:
127135
- uses: actions/checkout@v4

NEWS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Improved Documentation
119119
----------------------
120120

121121
- Updated documentation referencing obsolete Python 3.7 code. -- by :user:`Avasam` (#4096)
122-
- Changed ``versionadded`` for "Type information included by default" feature from ``v68.3.0`` to ``v69.0.0`` -- by :user:Avasam` (#4182)
122+
- Changed ``versionadded`` for "Type information included by default" feature from ``v68.3.0`` to ``v69.0.0`` -- by :user:`Avasam` (#4182)
123123
- Described the auto-generated files -- by :user:`VladimirFokow` (#4198)
124124
- Updated "Quickstart" to describe the current status of ``setup.cfg`` and ``pyproject.toml`` -- by :user:`VladimirFokow` (#4200)
125125

README.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1-
.. image:: https://img.shields.io/pypi/v/setuptools.svg
1+
.. |pypi-version| image:: https://img.shields.io/pypi/v/setuptools.svg
22
:target: https://pypi.org/project/setuptools
33

4-
.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg
4+
.. |py-version| image:: https://img.shields.io/pypi/pyversions/setuptools.svg
55

6-
.. image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
6+
.. |test-badge| image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
77
:target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
88
:alt: tests
99

10-
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
11-
:target: https://github.com/astral-sh/ruff
12-
:alt: Ruff
10+
.. |ruff-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
11+
:target: https://github.com/astral-sh/ruff
12+
:alt: Ruff
1313

14-
.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg
15-
:target: https://setuptools.pypa.io
14+
.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
15+
:target: https://setuptools.pypa.io
1616

17-
.. image:: https://img.shields.io/badge/skeleton-2024-informational
17+
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2024-informational
1818
:target: https://blog.jaraco.com/skeleton
1919

20-
.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
20+
.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
2121
:target: https://codecov.io/gh/pypa/setuptools
2222

23-
.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
23+
.. |tidelift-badge| image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
2424
:target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme
2525

26-
.. image:: https://img.shields.io/discord/803025117553754132
26+
.. |discord-badge| image:: https://img.shields.io/discord/803025117553754132
2727
:target: https://discord.com/channels/803025117553754132/815945031150993468
2828
:alt: Discord
2929

30+
|pypi-version| |py-version| |test-badge| |ruff-badge| |docs-badge| |skeleton-badge| |codecov-badge| |discord-badge|
31+
3032
See the `Quickstart <https://setuptools.pypa.io/en/latest/userguide/quickstart.html>`_
3133
and the `User's Guide <https://setuptools.pypa.io/en/latest/userguide/>`_ for
3234
instructions on how to use Setuptools.

mypy.ini

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ exclude = (?x)(
1515
| ^setuptools/_distutils/ # Vendored
1616
| ^setuptools/config/_validate_pyproject/ # Auto-generated
1717
)
18+
1819
# Ignoring attr-defined because setuptools wraps a lot of distutils classes, adding new attributes,
1920
# w/o updating all the attributes and return types from the base classes for type-checkers to understand
2021
# Especially with setuptools.dist.command vs distutils.dist.command vs setuptools._distutils.dist.command
21-
# *.extern modules that actually live in *._vendor will also cause attr-defined issues on import
22+
[mypy-setuptools.*]
2223
disable_error_code = attr-defined
2324

25+
# - pkg_resources tests create modules that won't exists statically before the test is run.
26+
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
27+
[mypy-pkg_resources.tests.*]
28+
disable_error_code = import-not-found
29+
2430
# - Avoid raising issues when importing from "extern" modules, as those are added to path dynamically.
2531
# https://github.com/pypa/setuptools/pull/3979#discussion_r1367968993
2632
# - distutils._modified has different errors on Python 3.8 [import-untyped], on Python 3.9+ [import-not-found]
@@ -29,8 +35,7 @@ disable_error_code = attr-defined
2935
[mypy-pkg_resources.extern.*,setuptools.extern.*,distutils._modified,jaraco.*,trove_classifiers]
3036
ignore_missing_imports = True
3137

32-
# - pkg_resources tests create modules that won't exists statically before the test is run.
33-
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
34-
# - setuptools._vendor.packaging._manylinux: Mypy issue, this vendored module is already excluded!
35-
[mypy-pkg_resources.tests.*,setuptools._vendor.packaging._manylinux,setuptools.config._validate_pyproject.*]
36-
disable_error_code = import-not-found
38+
# Even when excluding vendored/generated modules, there might be problems: https://github.com/python/mypy/issues/11936#issuecomment-1466764006
39+
[mypy-setuptools._vendor.packaging._manylinux,setuptools.config._validate_pyproject.*]
40+
follow_imports = silent
41+
# silent => ignore errors when following imports

newsfragments/4150.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Emit a warning when ``[tools.setuptools]`` is present in ``pyproject.toml`` and will be ignored. -- by :user:`SnoopJ`

newsfragments/4255.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Treat ``EncodingWarning``s as errors in tests. -- by :user:`Avasam`

newsfragments/4262.feature.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Improved `AttributeError` error message if ``pkg_resources.EntryPoint.require`` is called without extras or distribution
2+
Gracefully "do nothing" when trying to activate a ``pkg_resources.Distribution`` with a `None` location, rather than raising a `TypeError`
3+
-- by :user:`Avasam`

newsfragments/4278.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix finder template for lenient editable installs of implicit nested namespaces
2+
constructed by using ``package_dir`` to reorganise directory structure.

newsfragments/4308.misc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix ``setuptools_wheel`` fixture and avoid the recursive creation of
2+
``build/lib/build/lib/build/...`` directories in the project root during tests.

newsfragments/4309.removal.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Further adoption of UTF-8 in ``setuptools``.
2+
This change regards mostly files produced and consumed during the build process
3+
(e.g. metadata files, script wrappers, automatically updated config files, etc..)
4+
Although precautions were taken to minimize disruptions, some edge cases might
5+
be subject to backwards incompatibility.
6+
7+
Support for ``"locale"`` encoding is now **deprecated**.

0 commit comments

Comments
 (0)