Skip to content

Unit tests fails under Python 3.14 #564

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

Open
hegjon opened this issue Apr 1, 2025 · 5 comments
Open

Unit tests fails under Python 3.14 #564

hegjon opened this issue Apr 1, 2025 · 5 comments

Comments

@hegjon
Copy link
Contributor

hegjon commented Apr 1, 2025

More information: https://bugzilla.redhat.com/show_bug.cgi?id=2336937

Log:

+ /usr/bin/python3 -m unittest discover
................................................................../builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:885: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  self.assertFalse(asyncio.coroutines.iscoroutinefunction(func))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:886: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  self.assertFalse(asyncio.coroutines.iscoroutinefunction(Cls.func))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:887: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  self.assertTrue(asyncio.coroutines.iscoroutinefunction(coro))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:888: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  self.assertTrue(asyncio.coroutines.iscoroutinefunction(Cls.coro))
.......................................................................................................s..s..s............................................................................................................................................................./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8758: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Tx"))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8762: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Tx"), owner=int)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8769: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("Tx"), owner=Gen), Tx)
E/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8721: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("doesntexist"))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8723: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(ref, format=Format.FORWARDREF), ref)
E/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8808: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int")), int)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8810: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int", module="collections")), int)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8811: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), owner=str), int)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8814: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), globals={}), int)
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8824: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(fr)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8825: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(fr, globals={"hello": str}), str)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8826: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(fr), str)
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8819: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), globals={"int": obj}), obj)
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8796: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Counter", module="collections")), collections.Counter
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8799: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Counter[int]", module="collections")),
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8805: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Format", module="annotationlib"), globals={})
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8831: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Counter[int]"), owner=collections),
../builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8892: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Protocol"), globals=vars(typing))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8896: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Generic"), globals=vars(typing))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8898: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Final"), globals=vars(typing))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8900: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("ClassVar"), globals=vars(typing))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8902: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("Final", is_class=True), globals=vars(typing)), Final)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8903: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("ClassVar", is_class=True), globals=vars(typing)), ClassVar)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8905: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("Final", is_argument=False), globals=vars(typing))
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8907: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("ClassVar", is_argument=False), globals=vars(typing))
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8838: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int")), int)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8839: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), locals={"int": str}), str)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8841: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluate_forward_ref(typing.ForwardRef("int"), locals={"int": float}, globals={"int": str}),
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8844: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), globals={"int": str}), str)
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8849: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  self.assertIs(evaluate_forward_ref(typing.ForwardRef("int")), dict)
./builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8861: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluated_ref1a = evaluate_forward_ref(typing.ForwardRef("Y[Y['Tx']]"), locals={"Y": Y, "Tx": Tx})
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8872: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluated_ref2 = evaluate_forward_ref(typing.ForwardRef("""Y["Y['Tx']"]"""), locals={"Y": Y})
/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py:8880: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing.evaluate_forward_ref' is deprecated, as it leads to incorrect behaviour when calling typing.evaluate_forward_ref on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
  evaluated_ref3 = evaluate_forward_ref(typing.ForwardRef("""Y['Z["StrAlias"]']"""), locals={"Y": Y, "Z": Z, "StrAlias": str})
....EEEFEEFE.EE..............................s.................................s..................F......................s.s...ss...ssss.....s......................s............
======================================================================
ERROR: test_evaluate_with_type_params (test_typing_extensions.TestEvaluateForwardRefs.test_evaluate_with_type_params)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8769, in test_evaluate_with_type_params
    self.assertIs(evaluate_forward_ref(typing.ForwardRef("Tx"), owner=Gen), Tx)
                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/typing.py", line 1001, in evaluate_forward_ref
    value = forward_ref.evaluate(globals=globals, locals=locals,
                                 type_params=type_params, owner=owner)
  File "/usr/lib64/python3.14/annotationlib.py", line 172, in evaluate
    raise NameError(arg)
NameError: Tx

======================================================================
ERROR: test_forward_ref_fallback (test_typing_extensions.TestEvaluateForwardRefs.test_forward_ref_fallback)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8723, in test_forward_ref_fallback
    self.assertIs(evaluate_forward_ref(ref, format=Format.FORWARDREF), ref)
                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/typing.py", line 1001, in evaluate_forward_ref
    value = forward_ref.evaluate(globals=globals, locals=locals,
                                 type_params=type_params, owner=owner)
  File "/usr/lib64/python3.14/annotationlib.py", line 172, in evaluate
    raise NameError(arg)
NameError: doesntexist

======================================================================
ERROR: test_format (test_typing_extensions.TestGetAnnotations.test_format)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8190, in test_format
    get_annotations(f2, format=Format.FORWARDREF),
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_modify_annotations (test_typing_extensions.TestGetAnnotations.test_modify_annotations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8513, in test_modify_annotations
    get_annotations(f, format=Format.FORWARDREF),
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stock_annotations (test_typing_extensions.TestGetAnnotations.test_stock_annotations) (format=<Format.FORWARDREF: 2>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8233, in test_stock_annotations
    get_annotations(foo, format=format),
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stock_annotations_in_module (test_typing_extensions.TestGetAnnotations.test_stock_annotations_in_module) (format=<Format.FORWARDREF: 2>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8271, in test_stock_annotations_in_module
    get_annotations(isa, **kwargs), {"a": int, "b": str}
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stock_annotations_in_module (test_typing_extensions.TestGetAnnotations.test_stock_annotations_in_module) (format=<Format.FORWARDREF: 2>, eval_str=False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8271, in test_stock_annotations_in_module
    get_annotations(isa, **kwargs), {"a": int, "b": str}
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stock_annotations_on_wrapper (test_typing_extensions.TestGetAnnotations.test_stock_annotations_on_wrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8384, in test_stock_annotations_on_wrapper
    get_annotations(wrapped, format=Format.FORWARDREF),
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stringized_annotations_in_module (test_typing_extensions.TestGetAnnotations.test_stringized_annotations_in_module) (format=<Format.FORWARDREF: 2>)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8415, in test_stringized_annotations_in_module
    get_annotations(isa, **kwargs), {"a": "int", "b": "str"}
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
ERROR: test_stringized_annotations_in_module (test_typing_extensions.TestGetAnnotations.test_stringized_annotations_in_module) (format=<Format.FORWARDREF: 2>, eval_str=False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8415, in test_stringized_annotations_in_module
    get_annotations(isa, **kwargs), {"a": "int", "b": "str"}
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/annotationlib.py", line 733, in get_annotations
    raise ValueError("The VALUE_WITH_FAKE_GLOBALS format is for internal use only")
ValueError: The VALUE_WITH_FAKE_GLOBALS format is for internal use only

======================================================================
FAIL: test_stock_annotations (test_typing_extensions.TestGetAnnotations.test_stock_annotations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8236, in test_stock_annotations
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        get_annotations(foo, format=Format.STRING),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        {"a": "int", "b": "str"},
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: {'a': <class 'int'>, 'b': <class 'str'>} != {'a': 'int', 'b': 'str'}
- {'a': <class 'int'>, 'b': <class 'str'>}
?       -------     -      -------      -

+ {'a': 'int', 'b': 'str'}

======================================================================
FAIL: test_stock_annotations_in_module (test_typing_extensions.TestGetAnnotations.test_stock_annotations_in_module)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 8331, in test_stock_annotations_in_module
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        get_annotations(isa, format=Format.STRING),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        {"a": "int", "b": "str"},
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: {'a': <class 'int'>, 'b': <class 'str'>} != {'a': 'int', 'b': 'str'}
- {'a': <class 'int'>, 'b': <class 'str'>}
?       -------     -      -------      -

+ {'a': 'int', 'b': 'str'}

======================================================================
FAIL: test_bound_errors (test_typing_extensions.TypeVarTests.test_bound_errors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-typing-extensions-4.13.0-build/typing_extensions-4.13.0/src/test_typing_extensions.py", line 7211, in test_bound_errors
    with self.assertRaises(TypeError):
         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
AssertionError: TypeError not raised

----------------------------------------------------------------------
Ran 516 tests in 0.150s

FAILED (failures=3, errors=10, skipped=15)

@Daraan
Copy link
Contributor

Daraan commented Apr 1, 2025

Thanks for the headsup.
There have been some changes after #497 that are incompatible with current tests. I'll can do a quick patch.

@Daraan
Copy link
Contributor

Daraan commented Apr 1, 2025

Summary from what I see, its these two points:

@srittau
Copy link
Collaborator

srittau commented Apr 1, 2025

I've opened PR #565 to add Python 3.14 to CI once this problem here gets fixed.

@Daraan
Copy link
Contributor

Daraan commented Apr 1, 2025

Concerning python/cpython#124415 should we only update Format.VALUE_WITH_FAKE_GLOBALS and the tests that fail due to the miss numbering for the time being or do a bigger update for get_annotations? I am not yet sure how big this change will be.

@JelleZijlstra
Copy link
Member

The NameError and most of the DeprecationWarnings are due to a bug in CPython; python/cpython#128930 will fix them.

I put up a PR fixing most of the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants