Skip to content

Commit 1363ceb

Browse files
authored
Merge branch 'main' into pycache-gitignore
2 parents b0655fc + 449021c commit 1363ceb

File tree

131 files changed

+4775
-6865
lines changed

Some content is hidden

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

131 files changed

+4775
-6865
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[bumpversion]
2-
current_version = 69.5.1
2+
current_version = 70.1.1
33
commit = True
44
tag = True
55

6-
[bumpversion:file:setup.cfg]
6+
[bumpversion:file:pyproject.toml]

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
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
@@ -198,8 +206,6 @@ jobs:
198206
if: hashFiles('coverage.xml') != '' # Rudimentary `file.exists()`
199207
uses: codecov/codecov-action@v4
200208
with:
201-
files: >-
202-
${{ github.workspace }}\coverage.xml
203209
flags: >- # Mark which lines are covered by which envs
204210
CI-GHA,
205211
${{ github.job }},

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ include
88
lib
99
distribute.egg-info
1010
setuptools.egg-info
11+
setuptools/tests/bdist_wheel_testdata/*/*.egg-info/
1112
.coverage
1213
.eggs
1314
.tox

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.8
3+
rev: v0.4.9
44
hooks:
55
- id: ruff
66
- id: ruff-format

NEWS.rst

Lines changed: 109 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,98 @@
1+
v70.1.1
2+
=======
3+
4+
Misc
5+
----
6+
7+
- #4429
8+
9+
10+
v70.1.0
11+
=======
12+
13+
Features
14+
--------
15+
16+
- Adopted the ``bdist_wheel`` command from the ``wheel`` project -- by :user:`agronholm` (#1386)
17+
- Improve error message when ``pkg_resources.ZipProvider`` tries to extract resources with a missing Egg -- by :user:`Avasam`
18+
19+
Added variables and parameter type annotations to ``pkg_resources`` to be nearly on par with typeshed.\* -- by :user:`Avasam`
20+
\* Excluding ``TypeVar`` and ``overload``. Return types are currently inferred. (#4246)
21+
- Migrated Setuptools' own config to pyproject.toml (#4310)
22+
23+
24+
Bugfixes
25+
--------
26+
27+
- Prevent a ``TypeError: 'NoneType' object is not callable`` when ``shutil_rmtree`` is called without an ``onexc`` parameter on Python<=3.11 -- by :user:`Avasam` (#4382)
28+
- Replace use of mktemp with can_symlink from the stdlib test suite. (#4403)
29+
- Improvement for ``attr:`` directives in configuration to handle
30+
more edge cases related to complex ``package_dir``. (#4405)
31+
- Fix accidental implicit string concatenation. (#4411)
32+
33+
34+
Misc
35+
----
36+
37+
- #4365, #4422
38+
39+
40+
v70.0.0
41+
=======
42+
43+
Features
44+
--------
45+
46+
- Emit a warning when ``[tools.setuptools]`` is present in ``pyproject.toml`` and will be ignored. -- by :user:`SnoopJ` (#4150)
47+
- Improved `AttributeError` error message if ``pkg_resources.EntryPoint.require`` is called without extras or distribution
48+
Gracefully "do nothing" when trying to activate a ``pkg_resources.Distribution`` with a `None` location, rather than raising a `TypeError`
49+
-- by :user:`Avasam` (#4262)
50+
- Typed the dynamically defined variables from `pkg_resources` -- by :user:`Avasam` (#4267)
51+
- Modernized and refactored VCS handling in package_index. (#4332)
52+
53+
54+
Bugfixes
55+
--------
56+
57+
- In install command, use super to call the superclass methods. Avoids race conditions when monkeypatching from _distutils_system_mod occurs late. (#4136)
58+
- Fix finder template for lenient editable installs of implicit nested namespaces
59+
constructed by using ``package_dir`` to reorganise directory structure. (#4278)
60+
- Fix an error with `UnicodeDecodeError` handling in ``pkg_resources`` when trying to read files in UTF-8 with a fallback -- by :user:`Avasam` (#4348)
61+
62+
63+
Improved Documentation
64+
----------------------
65+
66+
- Uses RST substitution to put badges in 1 line. (#4312)
67+
68+
69+
Deprecations and Removals
70+
-------------------------
71+
72+
- Further adoption of UTF-8 in ``setuptools``.
73+
This change regards mostly files produced and consumed during the build process
74+
(e.g. metadata files, script wrappers, automatically updated config files, etc..)
75+
Although precautions were taken to minimize disruptions, some edge cases might
76+
be subject to backwards incompatibility.
77+
78+
Support for ``"locale"`` encoding is now **deprecated**. (#4309)
79+
- Remove ``setuptools.convert_path`` after long deprecation period.
80+
This function was never defined by ``setuptools`` itself, but rather a
81+
side-effect of an import for internal usage. (#4322)
82+
- Remove fallback for customisations of ``distutils``' ``build.sub_command`` after long
83+
deprecated period.
84+
Users are advised to import ``build`` directly from ``setuptools.command.build``. (#4322)
85+
- Removed ``typing_extensions`` from vendored dependencies -- by :user:`Avasam` (#4324)
86+
- Remove deprecated ``setuptools.dep_util``.
87+
The provided alternative is ``setuptools.modified``. (#4360)
88+
89+
90+
Misc
91+
----
92+
93+
- #4255, #4280, #4282, #4308, #4348
94+
95+
196
v69.5.1
297
=======
398

@@ -53,7 +148,19 @@ v69.3.0
53148
Features
54149
--------
55150

56-
- Support PEP 625 by canonicalizing package name and version in filenames. (#3593)
151+
- Support PEP 625 by canonicalizing package name and version in filenames
152+
per
153+
`the spec <https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name>`_.
154+
Projects whose names contain uppercase characters, dashes, or periods will
155+
now see their sdist names normalized to match the standard and the format
156+
previously seen in wheels. For example:
157+
158+
- ``zope.interface`` -> ``zope_interface``
159+
- ``CherryPy`` -> ``cherrypy``
160+
- ``foo-bar_baz`` -> ``foo_bar_baz``
161+
162+
Projects are encouraged to adopt this change to align with standards and
163+
other backend build systems. (#3593)
57164

58165

59166
v69.2.0
@@ -119,7 +226,7 @@ Improved Documentation
119226
----------------------
120227

121228
- 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)
229+
- Changed ``versionadded`` for "Type information included by default" feature from ``v68.3.0`` to ``v69.0.0`` -- by :user:`Avasam` (#4182)
123230
- Described the auto-generated files -- by :user:`VladimirFokow` (#4198)
124231
- Updated "Quickstart" to describe the current status of ``setup.cfg`` and ``pyproject.toml`` -- by :user:`VladimirFokow` (#4200)
125232

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.

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def pytest_configure(config):
3939
'pkg_resources/_vendor',
4040
'setuptools/config/_validate_pyproject',
4141
'setuptools/modified.py',
42+
'setuptools/tests/bdist_wheel_testdata',
4243
]
4344

4445

docs/build_meta.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ being used to package your scripts and install from source). To use it with
6060
build-backend = "setuptools.build_meta"
6161

6262
``build_meta`` implements ``setuptools``' build system support.
63-
The ``setuptools`` package implements the ``build_sdist``
64-
command and the ``wheel`` package implements the ``build_wheel``
65-
command; the latter is a dependency of the former
66-
exposed via :pep:`517` hooks.
63+
The ``setuptools`` package implements the ``build_sdist`` and
64+
``build_wheel`` commands.
6765

6866
Use ``setuptools``' :ref:`declarative config <declarative config>` to
6967
specify the package information in ``setup.cfg``::

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@
124124
github_repo_url = f'{github_url}/{github_repo_slug}'
125125
github_sponsors_url = f'{github_url}/sponsors'
126126
extlinks = {
127-
'user': (f'{github_sponsors_url}/%s', '@%s'), # noqa: WPS323
128-
'pypi': ('https://pypi.org/project/%s', '%s'), # noqa: WPS323
129-
'wiki': ('https://wikipedia.org/wiki/%s', '%s'), # noqa: WPS323
127+
'user': (f'{github_sponsors_url}/%s', '@%s'),
128+
'pypi': ('https://pypi.org/project/%s', '%s'),
129+
'wiki': ('https://wikipedia.org/wiki/%s', '%s'),
130130
}
131131
extensions += ['sphinx.ext.extlinks']
132132

docs/userguide/declarative_config.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ Configuring setuptools using ``setup.cfg`` files
1212
call is still required even if your configuration resides in ``setup.cfg``.
1313

1414
``Setuptools`` allows using configuration files (for example, :file:`setup.cfg`)
15-
to define a package’s metadata and other options that are normally supplied
16-
to the ``setup()`` function (declarative config).
15+
to define a package’s metadata and other options (declarative config).
1716

18-
This approach not only allows automation scenarios but also reduces
19-
boilerplate code in some cases.
17+
This approach allows automation scenarios and can reduce boilerplate code.
2018

2119
.. _example-setup-config:
2220

@@ -135,6 +133,24 @@ value associated with ``""`` in the ``package_dir`` dictionary.
135133
Please see :doc:`package discovery </userguide/package_discovery>` for more
136134
details.
137135

136+
Interpolation
137+
=============
138+
139+
Config files are parsed using :mod:`configparser` with
140+
`interpolation <https://docs.python.org/3/library/configparser.html#interpolation-of-values>`_
141+
enabled. As a result, one config value may reference another. This
142+
feature may be used, for example, in defining extras:
143+
144+
.. code-block:: ini
145+
146+
[options.extras_require]
147+
tester =
148+
pytest==3.3.2
149+
pytest-sugar
150+
dev =
151+
pytest-xdist
152+
%(tester)s
153+
138154
Specifying values
139155
=================
140156

0 commit comments

Comments
 (0)