Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mypy to 1.14, jaraco.path to 3.7.2 #4776

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ ignore_missing_imports = True

# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
[mypy-wheel.*]
ignore_missing_imports = True
follow_untyped_imports = True
# - The following are not marked as py.typed:
# - jaraco: Since mypy 1.12, the root name of the untyped namespace package gets called-out too
# - jaraco.develop: https://github.com/jaraco/jaraco.develop/issues/22
# - jaraco.envs: https://github.com/jaraco/jaraco.envs/issues/7
# - jaraco.packaging: https://github.com/jaraco/jaraco.packaging/issues/20
# - jaraco.path: https://github.com/jaraco/jaraco.path/issues/2
# - jaraco.text: https://github.com/jaraco/jaraco.text/issues/17
[mypy-jaraco,jaraco.develop,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.text]
ignore_missing_imports = True
[mypy-jaraco,jaraco.develop.*,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.text]
follow_untyped_imports = True

# Even when excluding a module, import issues can show up due to following import
# https://github.com/python/mypy/issues/11936#issuecomment-1466764006
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test = [
"packaging>=24.2",
"jaraco.envs>=2.2",
"pytest-xdist>=3", # Dropped dependency on pytest-fork and py
"jaraco.path>=3.2.0",
"jaraco.path>=3.7.2", # Typing fixes
"build[virtualenv]>=1.0.3",
"filelock>=3.4.0",
"ini2toml[lite]>=0.14",
Expand Down Expand Up @@ -135,7 +135,7 @@ type = [
# pin mypy version so a new version doesn't suddenly cause the CI to fail,
# until types-setuptools is removed from typeshed.
# For help with static-typing issues, or mypy update, ping @Avasam
"mypy>=1.12,<1.14",
"mypy==1.14.*",
# Typing fixes in version newer than we require at runtime
"importlib_metadata>=7.0.2; python_version < '3.10'",
# Imported unconditionally in tools/finalize.py
Expand Down
4 changes: 2 additions & 2 deletions setuptools/tests/test_build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def C(file):

class TestBuildExtInplace:
def get_build_ext_cmd(self, optional: bool, **opts) -> build_ext:
files = {
files: dict[str, str | dict[str, dict[str, str]]] = {
"eggs.c": "#include missingheader.h\n",
".build": {"lib": {}, "tmp": {}},
}
path.build(files) # jaraco/path#232
path.build(files)
extension = Extension('spam.eggs', ['eggs.c'], optional=optional)
dist = Distribution(dict(ext_modules=[extension]))
dist.script_name = 'setup.py'
Expand Down
4 changes: 2 additions & 2 deletions setuptools/tests/test_core_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io
from email import message_from_string
from email.generator import Generator
from email.message import Message
from email.message import EmailMessage, Message
from email.parser import Parser
from email.policy import EmailPolicy
from pathlib import Path
Expand Down Expand Up @@ -416,7 +416,7 @@ def _assert_roundtrip_message(metadata: str) -> None:
then ensures the metadata generated by setuptools is compatible.
"""
with io.StringIO(metadata) as buffer:
msg = Parser().parse(buffer)
msg = Parser(EmailMessage).parse(buffer)

serialization_policy = EmailPolicy(
utf8=True,
Expand Down
Loading