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

Unit tests fails with Python 3.13.0a2 #326

Closed
hegjon opened this issue Jan 22, 2024 · 2 comments
Closed

Unit tests fails with Python 3.13.0a2 #326

hegjon opened this issue Jan 22, 2024 · 2 comments

Comments

@hegjon
Copy link
Contributor

hegjon commented Jan 22, 2024

More details: https://bugzilla.redhat.com/show_bug.cgi?id=2259519

Output:

+ /usr/bin/python3 -m unittest discover
.......................................................................................................................................................s..s..s....................................................................F................................F...............................................................................................s........../builddir/build/BUILD/typing_extensions-4.9.0/src/test_typing_extensions.py:3507: DeprecationWarning: Failing to pass a value for the 'fields' parameter is deprecated and will be disallowed in Python 3.15. To create a TypedDict class with 0 fields using the functional syntax, pass an empty dictionary, e.g. `Emp = TypedDict('Emp', {})`.
  Emp = TypedDict('Emp', name=str, id=int)
...............s........
======================================================================
FAIL: test_generic_protocols_special_from_protocol (test_typing_extensions.ProtocolTests.test_generic_protocols_special_from_protocol)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/typing_extensions-4.9.0/src/test_typing_extensions.py", line 3061, in test_generic_protocols_special_from_protocol
    self.assertEqual(typing_extensions._get_protocol_attrs(PR), {'x'})
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Items in the first set but not the second:
'__non_callable_proto_members__'

======================================================================
FAIL: test_protocol_issubclass_error_message (test_typing_extensions.ProtocolTests.test_protocol_issubclass_error_message)
----------------------------------------------------------------------
TypeError: Instance and class checks can only be used with @runtime_checkable protocols

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/typing_extensions-4.9.0/src/test_typing_extensions.py", line 3471, in test_protocol_issubclass_error_message
    with self.assertRaisesRegex(TypeError, re.escape(expected_error_message)):
        issubclass(int, Vec2D)
AssertionError: "Protocols\ with\ non\-method\ members\ don't\ support\ issubclass\(\)\.\ Non\-method\ members:\ 'x',\ 'y'\." does not match "Instance and class checks can only be used with @runtime_checkable protocols"

----------------------------------------------------------------------
Ran 385 tests in 0.113s

FAILED (failures=2, skipped=5)
@hegjon hegjon changed the title Unit tests fails with Python 3.13.0a2. Unit tests fails with Python 3.13.0a2 Jan 22, 2024
@AlexWaygood
Copy link
Member

we fixed this two days ago, in 004b893

@hegjon hegjon closed this as completed Jan 22, 2024
@AlexWaygood
Copy link
Member

(The fix has been released as part of typing_extensions 4.10.0, @hegjon :)

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

2 participants