[med-svn] [Git][python-team/packages/mypy][master] 2 commits: python3-ast-serialize is in the archive; build-dep on it and enable the native parser.
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Tue Aug 25 23:02:03 BST 2026
Michael R. Crusoe pushed to branch master at Debian Python Team / packages / mypy
Commits:
0b70b61f by Michael R. Crusoe at 2026-08-25T17:09:33+02:00
python3-ast-serialize is in the archive; build-dep on it and enable the native parser.
- - - - -
9808c0d7 by Michael R. Crusoe at 2026-08-25T17:17:38+02:00
Make explicit the minimum versions of setuptools and pathspec needed. Closes: #1145034
- - - - -
4 changed files:
- debian/changelog
- debian/control
- debian/patches/series
- − debian/patches/skip-ast-serialize
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+mypy (2.2.0-3) UNRELEASED; urgency=medium
+
+ * python3-ast-serialize is in the archive; build-dep on it and enable
+ the native parser.
+ * d/control: Make explicit the minimum versions of setuptools and
+ pathspec needed. Closes: #1145034
+
+ -- Michael R. Crusoe <crusoe at debian.org> Tue, 25 Aug 2026 17:08:47 +0200
+
mypy (2.2.0-2) unstable; urgency=medium
* d/control: breaks older python3-pytest-mypy.
=====================================
debian/control
=====================================
@@ -10,15 +10,16 @@ Build-Depends:
dh-sequence-python3,
dh-sequence-sphinxdoc <!nodoc>,
dh-python (>= 6.20251221),
- python3-setuptools,
+ python3-setuptools (>= 77.0.3),
pybuild-plugin-pyproject,
flake8,
help2man,
python3-all,
+ python3-ast-serialize,
python3-librt (>> 0.12),
python3-lxml,
python3-attr <!nocheck>,
- python3-pathspec,
+ python3-pathspec (>= 1),
python3-pytest (>= 8.1.0) <!nocheck>,
python3-pytest-xdist <!nocheck>,
python3-pytest-cov <!nocheck>,
=====================================
debian/patches/series
=====================================
@@ -2,4 +2,3 @@ remove-mypyc-test-run-timeout
hint-typeshed-package
verbose
intersphinx
-skip-ast-serialize
=====================================
debian/patches/skip-ast-serialize deleted
=====================================
@@ -1,124 +0,0 @@
-From: Michael R. Crusoe <crusoe at debian.org>
-Subject: turn off native parsing
-Forwarded: not-needed
-
-The Python package ast_serialize is not available in Debian yet.
---- mypy.orig/mypy/main.py
-+++ mypy/mypy/main.py
-@@ -99,7 +99,6 @@
-
- if options.num_workers:
- # Supporting both parsers would be really tricky, so just support the new one.
-- options.native_parser = True
- if options.num_workers < 0:
- fail("error: Number of workers cannot be negative", stderr, options)
- if options.cache_dir == os.devnull:
-@@ -113,6 +112,8 @@
- stderr,
- options,
- )
-+ options.num_workers = 0
-+ # native parser is not yet supported in Debian
-
- if options.allow_redefinition and not options.local_partial_types:
- fail(
-@@ -1180,11 +1181,7 @@
-
- # Experimental parallel type-checking support.
- internals_group.add_argument(
-- "-n",
-- "--num-workers",
-- type=int,
-- default=0,
-- help="Number of separate mypy worker processes (experimental)",
-+ "-n", "--num-workers", type=int, default=0, help=argparse.SUPPRESS
- )
-
- report_group = parser.add_argument_group(
-@@ -1297,10 +1294,15 @@
- help=argparse.SUPPRESS,
- )
- # --native-parser enables the native parser (experimental)
-- add_invertible_flag(
-- "--native-parser",
-+ np_arg = parser.add_argument(
-+ "--native-parser", default=False, action="store_false", help=argparse.SUPPRESS
-+ )
-+ parser.add_argument(
-+ invert_flag_name("--native-parser"),
- default=False,
-- help="Enable faster parser that parses directly to mypy AST",
-+ dest=np_arg.dest,
-+ action="store_false",
-+ help=argparse.SUPPRESS,
- )
- # --logical-deps adds some more dependencies that are not semantically needed, but
- # may be helpful to determine relative importance of classes and functions for overall
---- mypy.orig/mypy/nativeparse.py
-+++ mypy/mypy/nativeparse.py
-@@ -22,7 +22,7 @@
- import time
- from typing import Final, cast
-
--import ast_serialize
-+import ast_serialize # type: ignore[import-not-found, unused-ignore]
- from librt.internal import (
- read_float as read_float_bare,
- read_int as read_int_bare,
-@@ -284,7 +284,7 @@
- # module may be not ready in a thread sometimes.
- t0 = time.time()
- while ast_serialize is None:
-- time.sleep(0.0001) # type: ignore[unreachable]
-+ time.sleep(0.0001)
- if time.time() - t0 > 10.0:
- raise ImportError("Cannot import ast_serialize")
- ast_bytes, errors, ignores, import_bytes, ast_data = ast_serialize.parse(
---- mypy.orig/PKG-INFO
-+++ mypy/PKG-INFO
-@@ -31,7 +31,6 @@
- Requires-Dist: pathspec>=1.0.0
- Requires-Dist: tomli>=1.1.0; python_version < "3.11"
- Requires-Dist: librt>=0.12.0; platform_python_implementation != "PyPy"
--Requires-Dist: ast-serialize<1.0.0,>=0.6.0
- Provides-Extra: dmypy
- Requires-Dist: psutil>=4.0; extra == "dmypy"
- Provides-Extra: mypyc
---- mypy.orig/pyproject.toml
-+++ mypy/pyproject.toml
-@@ -14,8 +14,6 @@
- # the following is from build-requirements.txt
- "types-psutil",
- "types-setuptools",
-- # required to work around a mypyc import bug
-- "ast-serialize>=0.6.0,<1.0.0",
- ]
- build-backend = "setuptools.build_meta"
-
-@@ -59,7 +57,6 @@
- "pathspec>=1.0.0",
- "tomli>=1.1.0; python_version<'3.11'",
- "librt>=0.12.0; platform_python_implementation != 'PyPy'",
-- "ast-serialize>=0.6.0,<1.0.0",
- ]
- dynamic = ["version"]
-
---- mypy.orig/mypy.egg-info/PKG-INFO
-+++ mypy/mypy.egg-info/PKG-INFO
-@@ -31,7 +31,6 @@
- Requires-Dist: pathspec>=1.0.0
- Requires-Dist: tomli>=1.1.0; python_version < "3.11"
- Requires-Dist: librt>=0.12.0; platform_python_implementation != "PyPy"
--Requires-Dist: ast-serialize<1.0.0,>=0.6.0
- Provides-Extra: dmypy
- Requires-Dist: psutil>=4.0; extra == "dmypy"
- Provides-Extra: mypyc
---- mypy.orig/mypy.egg-info/requires.txt
-+++ mypy/mypy.egg-info/requires.txt
-@@ -1,6 +1,5 @@
- mypy_extensions>=1.0.0
- pathspec>=1.0.0
--ast-serialize<1.0.0,>=0.6.0
-
- [:platform_python_implementation != "PyPy"]
- librt>=0.12.0
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/2d37ac6ae449b9337894b5cb8044a9f3ff1d2555...9808c0d7362eef155f725f9a0f21051ddf01a6c2
--
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/2d37ac6ae449b9337894b5cb8044a9f3ff1d2555...9808c0d7362eef155f725f9a0f21051ddf01a6c2
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260825/a4d9206d/attachment-0001.htm>
More information about the debian-med-commit
mailing list