Skip to content

Commit b40a70b

Browse files
authored
Merge branch 'main' into update-setup-python-action
2 parents 5bb594c + c3dc91e commit b40a70b

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
python-version: ${{ matrix.python }}
7171
allow-prereleases: true
72-
- uses: actions/cache@v3
72+
- uses: actions/cache@v4
7373
id: cache
7474
with:
7575
path: setuptools/tests/config/downloads/*.cfg

mypy.ini

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[mypy]
22
# CI should test for all versions, local development gets hints for oldest supported
3+
# Some upstream typeshed distutils stubs fixes are necessary before we can start testing on Python 3.12
34
python_version = 3.8
45
strict = False
56
warn_unused_ignores = True
@@ -8,6 +9,7 @@ explicit_package_bases = True
89
exclude = (?x)(
910
^build/
1011
| ^.tox/
12+
| ^.egg/
1113
| ^pkg_resources/tests/data/my-test-package-source/setup.py$ # Duplicate module name
1214
| ^.+?/(_vendor|extern)/ # Vendored
1315
| ^setuptools/_distutils/ # Vendored

pkg_resources/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ def _find_adapter(registry, ob):
31933193
for t in types:
31943194
if t in registry:
31953195
return registry[t]
3196-
# _find_adapter would previously return None, and immediatly be called.
3196+
# _find_adapter would previously return None, and immediately be called.
31973197
# So we're raising a TypeError to keep backward compatibility if anyone depended on that behaviour.
31983198
raise TypeError(f"Could not find adapter for {registry} and {ob}")
31993199

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ testing =
7373
# for tools/finalize.py
7474
jaraco.develop >= 7.21; python_version >= "3.9" and sys_platform != "cygwin"
7575
pytest-home >= 0.5
76+
mypy==1.9 # pin mypy version so a new version doesn't suddenly cause the CI to fail
7677
# No Python 3.11 dependencies require tomli, but needed for type-checking since we import it directly
7778
tomli
7879
# No Python 3.12 dependencies require importlib_metadata, but needed for type-checking since we import it directly

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ def _restore_install_lib(self):
8888

8989
if __name__ == '__main__':
9090
# allow setup.py to run from another directory
91-
# TODO: Use a proper conditonal statement here
91+
# TODO: Use a proper conditional statement here
9292
here and os.chdir(here) # type: ignore[func-returns-value]
9393
dist = setuptools.setup(**setup_params)

setuptools/_core_metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _read_list_from_msg(msg: Message, field: str) -> Optional[List[str]]:
6262

6363

6464
def _read_payload_from_msg(msg: Message) -> Optional[str]:
65-
value = msg.get_payload().strip()
65+
value = str(msg.get_payload()).strip()
6666
if value == 'UNKNOWN' or not value:
6767
return None
6868
return value

setuptools/command/editable_wheel.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ def _simple_layout(
620620
layout = {pkg: find_package_path(pkg, package_dir, project_dir) for pkg in packages}
621621
if not layout:
622622
return set(package_dir) in ({}, {""})
623-
# TODO: has been fixed upstream, waiting for new mypy release https://github.com/python/typeshed/pull/11310
624-
parent = os.path.commonpath(starmap(_parent_path, layout.items())) # type: ignore[call-overload]
623+
parent = os.path.commonpath(starmap(_parent_path, layout.items()))
625624
return all(
626625
_path.same_path(Path(parent, *key.split('.')), value)
627626
for key, value in layout.items()

0 commit comments

Comments
 (0)