Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-mypy_extensions for
openSUSE:Factory checked in at 2026-07-26 11:26:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mypy_extensions (Old)
and /work/SRC/openSUSE:Factory/.python-mypy_extensions.new.2004 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mypy_extensions"
Sun Jul 26 11:26:30 2026 rev:7 rq:1367458 version:1.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-mypy_extensions/python-mypy_extensions.changes
2025-06-03 17:50:37.270343490 +0200
+++
/work/SRC/openSUSE:Factory/.python-mypy_extensions.new.2004/python-mypy_extensions.changes
2026-07-26 11:26:35.566840910 +0200
@@ -1,0 +2,9 @@
+Thu Jul 16 12:16:18 UTC 2026 - Markéta Machová <[email protected]>
+
+- Update to 1.1.0
+ * Deprecate mypy_extensions.TypedDict
+ * Add support for Python 3.12
+ * Deprecate mypy_extensions.NoReturn
+- Launch tests
+
+-------------------------------------------------------------------
Old:
----
mypy_extensions-1.0.0.tar.gz
New:
----
mypy_extensions-1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mypy_extensions.spec ++++++
--- /var/tmp/diff_new_pack.kETrWZ/_old 2026-07-26 11:26:36.510873303 +0200
+++ /var/tmp/diff_new_pack.kETrWZ/_new 2026-07-26 11:26:36.514873440 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-mypy_extensions
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
%{?sle15_python_module_pythons}
Name: python-mypy_extensions
-Version: 1.0.0
+Version: 1.1.0
Release: 0
Summary: Experimental type system extensions for programs checked with
mypy typechecker
License: MIT
Group: Development/Languages/Python
URL: https://www.mypy-lang.org/
Source:
https://files.pythonhosted.org/packages/source/m/mypy_extensions/mypy_extensions-%{version}.tar.gz
+BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -47,6 +48,10 @@
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+# test_py36_class_syntax_usage fails on python314:
https://github.com/python/mypy_extensions/issues/65
+%pytest tests/* -k "not test_py36_class_syntax_usage"
+
%files %{python_files}
%license LICENSE
%{python_sitelib}/mypy_extensions.py
++++++ mypy_extensions-1.0.0.tar.gz -> mypy_extensions-1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/MANIFEST.in
new/mypy_extensions-1.1.0/MANIFEST.in
--- old/mypy_extensions-1.0.0/MANIFEST.in 2021-11-15 13:34:24.000000000
+0100
+++ new/mypy_extensions-1.1.0/MANIFEST.in 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/PKG-INFO
new/mypy_extensions-1.1.0/PKG-INFO
--- old/mypy_extensions-1.0.0/PKG-INFO 2023-02-04 13:09:09.374855000 +0100
+++ new/mypy_extensions-1.1.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +1,29 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: mypy_extensions
-Version: 1.0.0
+Version: 1.1.0
Summary: Type system extensions for programs checked with the mypy type
checker.
-Home-page: https://github.com/python/mypy_extensions
-Author: The mypy developers
-Author-email: [email protected]
-License: MIT License
+Author-email: The mypy developers <[email protected]>
+Requires-Python: >=3.8
+Description-Content-Type: text/markdown
+License-Expression: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
-Requires-Python: >=3.5
License-File: LICENSE
+Project-URL: Homepage, https://github.com/python/mypy_extensions
Mypy Extensions
===============
-The "mypy_extensions" module defines extensions to the standard "typing" module
-that are supported by the mypy type checker and the mypyc compiler.
+The `mypy_extensions` module defines extensions to the Python standard
+library `typing` module that are supported by the mypy type checker and
+the mypyc compiler.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mypy_extensions-1.0.0/mypy_extensions.egg-info/PKG-INFO
new/mypy_extensions-1.1.0/mypy_extensions.egg-info/PKG-INFO
--- old/mypy_extensions-1.0.0/mypy_extensions.egg-info/PKG-INFO 2023-02-04
13:09:09.000000000 +0100
+++ new/mypy_extensions-1.1.0/mypy_extensions.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-Metadata-Version: 2.1
-Name: mypy-extensions
-Version: 1.0.0
-Summary: Type system extensions for programs checked with the mypy type
checker.
-Home-page: https://github.com/python/mypy_extensions
-Author: The mypy developers
-Author-email: [email protected]
-License: MIT License
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Console
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Topic :: Software Development
-Requires-Python: >=3.5
-License-File: LICENSE
-
-Mypy Extensions
-===============
-
-The "mypy_extensions" module defines extensions to the standard "typing" module
-that are supported by the mypy type checker and the mypyc compiler.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mypy_extensions-1.0.0/mypy_extensions.egg-info/SOURCES.txt
new/mypy_extensions-1.1.0/mypy_extensions.egg-info/SOURCES.txt
--- old/mypy_extensions-1.0.0/mypy_extensions.egg-info/SOURCES.txt
2023-02-04 13:09:09.000000000 +0100
+++ new/mypy_extensions-1.1.0/mypy_extensions.egg-info/SOURCES.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-LICENSE
-MANIFEST.in
-README.md
-mypy_extensions.py
-setup.cfg
-setup.py
-mypy_extensions.egg-info/PKG-INFO
-mypy_extensions.egg-info/SOURCES.txt
-mypy_extensions.egg-info/dependency_links.txt
-mypy_extensions.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mypy_extensions-1.0.0/mypy_extensions.egg-info/dependency_links.txt
new/mypy_extensions-1.1.0/mypy_extensions.egg-info/dependency_links.txt
--- old/mypy_extensions-1.0.0/mypy_extensions.egg-info/dependency_links.txt
2023-02-04 13:09:09.000000000 +0100
+++ new/mypy_extensions-1.1.0/mypy_extensions.egg-info/dependency_links.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/mypy_extensions-1.0.0/mypy_extensions.egg-info/top_level.txt
new/mypy_extensions-1.1.0/mypy_extensions.egg-info/top_level.txt
--- old/mypy_extensions-1.0.0/mypy_extensions.egg-info/top_level.txt
2023-02-04 13:09:09.000000000 +0100
+++ new/mypy_extensions-1.1.0/mypy_extensions.egg-info/top_level.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-mypy_extensions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/mypy_extensions.py
new/mypy_extensions-1.1.0/mypy_extensions.py
--- old/mypy_extensions-1.0.0/mypy_extensions.py 2023-02-04
12:57:12.000000000 +0100
+++ new/mypy_extensions-1.1.0/mypy_extensions.py 2025-04-16
15:10:22.518853200 +0200
@@ -5,7 +5,7 @@
from mypy_extensions import TypedDict
"""
-from typing import Any
+from typing import Any, Dict
import sys
# _type_check is NOT a part of public typing API, it is used here only to mimic
@@ -42,17 +42,32 @@
except (AttributeError, ValueError):
pass
- return _TypedDictMeta(_typename, (), ns)
+ return _TypedDictMeta(_typename, (), ns, _from_functional_call=True)
class _TypedDictMeta(type):
- def __new__(cls, name, bases, ns, total=True):
+ def __new__(cls, name, bases, ns, total=True, _from_functional_call=False):
# Create new typed dict class object.
# This method is called directly when TypedDict is subclassed,
# or via _typeddict_new when TypedDict is instantiated. This way
# TypedDict supports all three syntaxes described in its docstring.
# Subclasses and instances of TypedDict return actual dictionaries
# via _dict_new.
+
+ # We need the `if TypedDict in globals()` check,
+ # or we emit a DeprecationWarning when creating
mypy_extensions.TypedDict itself
+ if 'TypedDict' in globals():
+ import warnings
+ warnings.warn(
+ (
+ "mypy_extensions.TypedDict is deprecated, "
+ "and will be removed in a future version. "
+ "Use typing.TypedDict or typing_extensions.TypedDict
instead."
+ ),
+ DeprecationWarning,
+ stacklevel=(3 if _from_functional_call else 2)
+ )
+
ns['__new__'] = _typeddict_new if name == 'TypedDict' else _dict_new
tp_dict = super(_TypedDictMeta, cls).__new__(cls, name, (dict,), ns)
@@ -135,7 +150,8 @@
# Return type that indicates a function does not return
-class NoReturn: pass
+# Deprecated, use typing or typing_extensions variants instead
+class _DEPRECATED_NoReturn: pass
def trait(cls):
@@ -211,3 +227,25 @@
* isinstance(x, {name}) is the same as isinstance(x, int)
""".format(name=_int_type.__name__)
del _int_type
+
+
+def _warn_deprecation(name: str, module_globals: Dict[str, Any]) -> Any:
+ if (val := module_globals.get(f"_DEPRECATED_{name}")) is None:
+ msg = f"module '{__name__}' has no attribute '{name}'"
+ raise AttributeError(msg)
+ module_globals[name] = val
+ if name in {"NoReturn"}:
+ msg = (
+ f"'mypy_extensions.{name}' is deprecated, "
+ "and will be removed in a future version. "
+ f"Use 'typing.{name}' or 'typing_extensions.{name}' instead"
+ )
+ else:
+ assert False, f"Add deprecation message for 'mypy_extensions.{name}'"
+ import warnings
+ warnings.warn(msg, DeprecationWarning, stacklevel=3)
+ return val
+
+
+def __getattr__(name: str) -> Any:
+ return _warn_deprecation(name, module_globals=globals())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/pyproject.toml
new/mypy_extensions-1.1.0/pyproject.toml
--- old/mypy_extensions-1.0.0/pyproject.toml 1970-01-01 01:00:00.000000000
+0100
+++ new/mypy_extensions-1.1.0/pyproject.toml 2025-04-22 16:21:35.373651300
+0200
@@ -0,0 +1,33 @@
+[build-system]
+requires = ["flit_core>=3.11,<4"]
+build-backend = "flit_core.buildapi"
+
+[project]
+name = "mypy_extensions"
+version = "1.1.0"
+description = "Type system extensions for programs checked with the mypy type
checker."
+readme = "README.md"
+authors = [
+ {name = "The mypy developers", email = "[email protected]"}
+]
+license = "MIT"
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",
+ "Intended Audience :: Developers",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Topic :: Software Development",
+]
+requires-python = ">=3.8"
+
+[project.urls]
+Homepage = "https://github.com/python/mypy_extensions"
+
+[tool.flit.sdist]
+include = ["tox.ini", "*/*test*.py"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/setup.cfg
new/mypy_extensions-1.1.0/setup.cfg
--- old/mypy_extensions-1.0.0/setup.cfg 2023-02-04 13:09:09.374855000 +0100
+++ new/mypy_extensions-1.1.0/setup.cfg 1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-[bdist_wheel]
-universal = 0
-
-[egg_info]
-tag_build =
-tag_date = 0
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/setup.py
new/mypy_extensions-1.1.0/setup.py
--- old/mypy_extensions-1.0.0/setup.py 2023-02-04 12:57:12.000000000 +0100
+++ new/mypy_extensions-1.1.0/setup.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-from setuptools import setup
-
-version = '1.0.0'
-description = 'Type system extensions for programs checked with the mypy type
checker.'
-long_description = '''
-Mypy Extensions
-===============
-
-The "mypy_extensions" module defines extensions to the standard "typing" module
-that are supported by the mypy type checker and the mypyc compiler.
-'''.lstrip()
-
-classifiers = [
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Console',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: 3.10',
- 'Programming Language :: Python :: 3.11',
- 'Topic :: Software Development',
-]
-
-setup(
- name='mypy_extensions',
- python_requires='>=3.5',
- version=version,
- description=description,
- long_description=long_description,
- author='The mypy developers',
- author_email='[email protected]',
- url='https://github.com/python/mypy_extensions',
- license='MIT License',
- py_modules=['mypy_extensions'],
- classifiers=classifiers,
-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/tests/testextensions.py
new/mypy_extensions-1.1.0/tests/testextensions.py
--- old/mypy_extensions-1.0.0/tests/testextensions.py 1970-01-01
01:00:00.000000000 +0100
+++ new/mypy_extensions-1.1.0/tests/testextensions.py 2025-04-16
15:10:22.519853000 +0200
@@ -0,0 +1,211 @@
+import collections.abc
+import pickle
+import sys
+import typing
+import warnings
+from contextlib import contextmanager
+from unittest import TestCase, main
+from mypy_extensions import TypedDict, i64, i32, i16, u8
+
+
+class BaseTestCase(TestCase):
+
+ def assertIsSubclass(self, cls, class_or_tuple, msg=None):
+ if not issubclass(cls, class_or_tuple):
+ message = '%r is not a subclass of %r' % (cls, class_or_tuple)
+ if msg is not None:
+ message += ' : %s' % msg
+ raise self.failureException(message)
+
+ def assertNotIsSubclass(self, cls, class_or_tuple, msg=None):
+ if issubclass(cls, class_or_tuple):
+ message = '%r is a subclass of %r' % (cls, class_or_tuple)
+ if msg is not None:
+ message += ' : %s' % msg
+ raise self.failureException(message)
+
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore", category=DeprecationWarning)
+
+ Label = TypedDict('Label', [('label', str)])
+
+ class Point2D(TypedDict):
+ x: int
+ y: int
+
+ class LabelPoint2D(Point2D, Label): ...
+
+ class Options(TypedDict, total=False):
+ log_level: int
+ log_path: str
+
+
+class TypedDictTests(BaseTestCase):
+ @contextmanager
+ def assert_typeddict_deprecated(self):
+ with self.assertWarnsRegex(
+ DeprecationWarning, "mypy_extensions.TypedDict is deprecated"
+ ):
+ yield
+
+ def test_basics_iterable_syntax(self):
+ with self.assert_typeddict_deprecated():
+ Emp = TypedDict('Emp', {'name': str, 'id': int})
+ self.assertIsSubclass(Emp, dict)
+ self.assertIsSubclass(Emp, typing.MutableMapping)
+ self.assertNotIsSubclass(Emp, collections.abc.Sequence)
+ jim = Emp(name='Jim', id=1)
+ self.assertIs(type(jim), dict)
+ self.assertEqual(jim['name'], 'Jim')
+ self.assertEqual(jim['id'], 1)
+ self.assertEqual(Emp.__name__, 'Emp')
+ self.assertEqual(Emp.__module__, __name__)
+ self.assertEqual(Emp.__bases__, (dict,))
+ self.assertEqual(Emp.__annotations__, {'name': str, 'id': int})
+ self.assertEqual(Emp.__total__, True)
+
+ def test_basics_keywords_syntax(self):
+ with self.assert_typeddict_deprecated():
+ Emp = TypedDict('Emp', name=str, id=int)
+ self.assertIsSubclass(Emp, dict)
+ self.assertIsSubclass(Emp, typing.MutableMapping)
+ self.assertNotIsSubclass(Emp, collections.abc.Sequence)
+ jim = Emp(name='Jim', id=1) # type: ignore # mypy doesn't support
keyword syntax yet
+ self.assertIs(type(jim), dict)
+ self.assertEqual(jim['name'], 'Jim')
+ self.assertEqual(jim['id'], 1)
+ self.assertEqual(Emp.__name__, 'Emp')
+ self.assertEqual(Emp.__module__, __name__)
+ self.assertEqual(Emp.__bases__, (dict,))
+ self.assertEqual(Emp.__annotations__, {'name': str, 'id': int})
+ self.assertEqual(Emp.__total__, True)
+
+ def test_typeddict_errors(self):
+ with self.assert_typeddict_deprecated():
+ Emp = TypedDict('Emp', {'name': str, 'id': int})
+ self.assertEqual(TypedDict.__module__, 'mypy_extensions')
+ jim = Emp(name='Jim', id=1)
+ with self.assertRaises(TypeError):
+ isinstance({}, Emp) # type: ignore
+ with self.assertRaises(TypeError):
+ isinstance(jim, Emp) # type: ignore
+ with self.assertRaises(TypeError):
+ issubclass(dict, Emp) # type: ignore
+ with self.assertRaises(TypeError), self.assert_typeddict_deprecated():
+ TypedDict('Hi', x=())
+ with self.assertRaises(TypeError), self.assert_typeddict_deprecated():
+ TypedDict('Hi', [('x', int), ('y', ())])
+ with self.assertRaises(TypeError):
+ TypedDict('Hi', [('x', int)], y=int)
+
+ def test_py36_class_syntax_usage(self):
+ self.assertEqual(LabelPoint2D.__name__, 'LabelPoint2D') # noqa
+ self.assertEqual(LabelPoint2D.__module__, __name__) # noqa
+ self.assertEqual(LabelPoint2D.__annotations__, {'x': int, 'y': int,
'label': str}) # noqa
+ self.assertEqual(LabelPoint2D.__bases__, (dict,)) # noqa
+ self.assertEqual(LabelPoint2D.__total__, True) # noqa
+ self.assertNotIsSubclass(LabelPoint2D, typing.Sequence) # noqa
+ not_origin = Point2D(x=0, y=1) # noqa
+ self.assertEqual(not_origin['x'], 0)
+ self.assertEqual(not_origin['y'], 1)
+ other = LabelPoint2D(x=0, y=1, label='hi') # noqa
+ self.assertEqual(other['label'], 'hi')
+
+ def test_py36_class_usage_emits_deprecations(self):
+ with self.assert_typeddict_deprecated():
+ class Foo(TypedDict):
+ bar: int
+
+ def test_pickle(self):
+ global EmpD # pickle wants to reference the class by name
+ with self.assert_typeddict_deprecated():
+ EmpD = TypedDict('EmpD', name=str, id=int)
+ jane = EmpD({'name': 'jane', 'id': 37})
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ z = pickle.dumps(jane, proto)
+ jane2 = pickle.loads(z)
+ self.assertEqual(jane2, jane)
+ self.assertEqual(jane2, {'name': 'jane', 'id': 37})
+ ZZ = pickle.dumps(EmpD, proto)
+ EmpDnew = pickle.loads(ZZ)
+ self.assertEqual(EmpDnew({'name': 'jane', 'id': 37}), jane)
+
+ def test_optional(self):
+ with self.assert_typeddict_deprecated():
+ EmpD = TypedDict('EmpD', name=str, id=int)
+
+ self.assertEqual(typing.Optional[EmpD], typing.Union[None, EmpD])
+ self.assertNotEqual(typing.List[EmpD], typing.Tuple[EmpD])
+
+ def test_total(self):
+ with self.assert_typeddict_deprecated():
+ D = TypedDict('D', {'x': int}, total=False)
+ self.assertEqual(D(), {})
+ self.assertEqual(D(x=1), {'x': 1})
+ self.assertEqual(D.__total__, False)
+
+ self.assertEqual(Options(), {}) # noqa
+ self.assertEqual(Options(log_level=2), {'log_level': 2}) # noqa
+ self.assertEqual(Options.__total__, False) # noqa
+
+
+native_int_types = [i64, i32, i16, u8]
+
+
+class MypycNativeIntTests(TestCase):
+ def test_construction(self):
+ for native_int in native_int_types:
+ self.assert_same(native_int(), 0)
+
+ self.assert_same(native_int(0), 0)
+ self.assert_same(native_int(1), 1)
+ self.assert_same(native_int(-3), -3)
+ self.assert_same(native_int(2**64), 2**64)
+ self.assert_same(native_int(-2**64), -2**64)
+
+ self.assert_same(native_int(1.234), 1)
+ self.assert_same(native_int(2.634), 2)
+ self.assert_same(native_int(-1.234), -1)
+ self.assert_same(native_int(-2.634), -2)
+
+ self.assert_same(native_int("0"), 0)
+ self.assert_same(native_int("123"), 123)
+ self.assert_same(native_int("abc", 16), 2748)
+ self.assert_same(native_int("-101", base=2), -5)
+
+ def test_isinstance(self):
+ for native_int in native_int_types:
+ assert isinstance(0, native_int)
+ assert isinstance(1234, native_int)
+ assert isinstance(True, native_int)
+ assert not isinstance(1.0, native_int)
+
+ def test_docstring(self):
+ for native_int in native_int_types:
+ # Just check that a docstring exists
+ assert native_int.__doc__
+
+ def assert_same(self, x, y):
+ assert type(x) is type(y)
+ assert x == y
+
+
+class DeprecationTests(TestCase):
+ def test_no_return_deprecation(self):
+ del sys.modules["mypy_extensions"]
+ with self.assertWarnsRegex(
+ DeprecationWarning, "'mypy_extensions.NoReturn' is deprecated"
+ ):
+ import mypy_extensions
+ mypy_extensions.NoReturn
+
+ del sys.modules["mypy_extensions"]
+ with self.assertWarnsRegex(
+ DeprecationWarning, "'mypy_extensions.NoReturn' is deprecated"
+ ):
+ from mypy_extensions import NoReturn # noqa: F401
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mypy_extensions-1.0.0/tox.ini
new/mypy_extensions-1.1.0/tox.ini
--- old/mypy_extensions-1.0.0/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/mypy_extensions-1.1.0/tox.ini 2025-04-16 15:10:22.519853000 +0200
@@ -0,0 +1,20 @@
+[tox]
+minversion = 4.4.4
+skip_missing_interpreters = true
+envlist = py38, py39, py310, py311, py312, py313
+
+[testenv]
+description = run the test driver with {basepython}
+commands = python -We -m unittest discover tests
+
+[testenv:lint]
+description = check the code style
+basepython = python3
+deps = flake8
+commands = flake8 -j0 {posargs}
+
+[flake8]
+max-line-length = 99
+ignore =
+ # multiple statements on one line (colon) (we use this for classes with
empty body)
+ E701