https://github.com/python/cpython/commit/dd41f933200637c4cf7575daa42ed08c369e97f6
commit: dd41f933200637c4cf7575daa42ed08c369e97f6
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2026-05-05T15:25:23Z
summary:

[3.14] gh-149410: Test that `typing.NoDefault` is final (GH-149411) (#149419)

gh-149410: Test that `typing.NoDefault` is final (GH-149411)
(cherry picked from commit bad9296fb0424bc480fa0ecfd2d60f73c33358f5)

Co-authored-by: sobolevn <[email protected]>

files:
M Lib/test/test_typing.py

diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 2c6a5c7466032d..2c99b221e52d1f 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -10859,6 +10859,10 @@ def test_no_attributes(self):
         with self.assertRaises(AttributeError):
             type(NoDefault).foo
 
+    def test_no_subclassing(self):
+        with self.assertRaises(TypeError):
+            class Test(type(NoDefault)): ...
+
 
 class AllTests(BaseTestCase):
     """Tests for __all__."""

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to