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

Suppress DeprecationWarnings and prints when running tests #131

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

AlexWaygood
Copy link
Member

If I run tests on main with Python 3.11, I get this output:

(venv) C:\Users\alexw\coding\typing_extensions>python src/test_typing_extensions.py
..............................................................C:\Users\alexw\coding\typing_extensions\src\test_typing_extensions.py:242: DeprecationWarning: A will go away soon
  A(42)
...........................................sssssssssssssssssss..................................................................................Runtime type is 'object'
..........................................C:\Users\alexw\coding\typing_extensions\src\test_typing_extensions.py:1962: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.
  Emp = TypedDict('Emp', name=str, id=int)
........C:\Users\alexw\coding\typing_extensions\src\test_typing_extensions.py:2069: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.
  EmpD = TypedDict('EmpD', name=str, id=int)
..C:\Users\alexw\coding\typing_extensions\src\test_typing_extensions.py:2047: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.
  EmpD = TypedDict('EmpD', name=str, id=int)
....s.C:\Users\alexw\coding\typing_extensions\src\test_typing_extensions.py:1977: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.
  TD = TypedDict("TD", cls=type, self=object, typename=str, _typename=int,
........
----------------------------------------------------------------------
Ran 272 tests in 0.145s

OK (skipped=20)

With this PR, I get this output:

(venv) C:\Users\alexw\coding\typing_extensions>python src/test_typing_extensions.py
.........................................................................................................sssssssssssssssssss..........................................................................................................................................s.........
----------------------------------------------------------------------
Ran 272 tests in 0.131s

OK (skipped=20)

@JelleZijlstra JelleZijlstra merged commit 6db3067 into python:main Apr 9, 2023
15 checks passed
@AlexWaygood AlexWaygood deleted the test-deprecations branch April 9, 2023 21:29
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

Successfully merging this pull request may close these issues.

None yet

2 participants