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

python-typing-extensions fails to build with Python 3.8 #643

Closed
hegjon opened this issue Jun 8, 2019 · 0 comments · Fixed by #647
Closed

python-typing-extensions fails to build with Python 3.8 #643

hegjon opened this issue Jun 8, 2019 · 0 comments · Fixed by #647

Comments

@hegjon
Copy link

hegjon commented Jun 8, 2019

python-typing-extensions fails to build with Python 3.8.0b1.

From the build log, it looks like some of the extensions were moved to Python's own typing module, invalidating the tests' expectations:

======================================================================
FAIL: test_typing_extensions_defers_when_possible (__main__.AllTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "src_py3/test_typing_extensions.py", line 1384, in test_typing_extensions_defers_when_possible
    self.assertIs(
AssertionError: <function final at 0x7fd16783f280> is not <function final at 0x7fd167c929d0>
======================================================================
FAIL: test_repr (__main__.LiteralTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "src_py3/test_typing_extensions.py", line 237, in test_repr
    self.assertEqual(repr(Literal[1]), "typing_extensions.Literal[1]")
AssertionError: 'typing.Literal[1]' != 'typing_extensions.Literal[1]'
- typing.Literal[1]
+ typing_extensions.Literal[1]
?       +++++++++++
----------------------------------------------------------------------


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00927854-python-typing-extensions/

The original issue was submitted here: https://bugzilla.redhat.com/show_bug.cgi?id=1718366

ilevkivskyi added a commit that referenced this issue Jun 16, 2019
Fixes #643

(Use ignore whitespace option to review this, since it mostly just indents a bunch of stuff.)

PR summary:
* Update Travis config to run on a bunch of newer Python versions (including 3.8-dev).
* Only run `typing` tests on Python 3.6 or older, starting from Python 3.7 development of `typing` moved to CPython repo, where it was significantly reworked. We still run `typing_extension` tests on all versions.
* Update `repr()` tests in `typing_extensions` to conditionally expect correct module name.
* Add `TypedDict` to `__all__`.
* Use `Final`, `Literal`, etc. from `typing` if those are available (as we do for other things).
* Rename `@runtime` to `@runtime_checkable` in `typing_extensions` (I think we can keep `@runtime` in `typing_extensions` as an alias for backwards compatibility).

Note this only updates Python 3 version of `typing_extensions`. There will be a corresponding update for the Python 2 version of `typing_extensions` as part of #648
JelleZijlstra pushed a commit to python/typing_extensions that referenced this issue May 19, 2022
Fixes python/typing#643

(Use ignore whitespace option to review this, since it mostly just indents a bunch of stuff.)

PR summary:
* Update Travis config to run on a bunch of newer Python versions (including 3.8-dev).
* Only run `typing` tests on Python 3.6 or older, starting from Python 3.7 development of `typing` moved to CPython repo, where it was significantly reworked. We still run `typing_extension` tests on all versions.
* Update `repr()` tests in `typing_extensions` to conditionally expect correct module name.
* Add `TypedDict` to `__all__`.
* Use `Final`, `Literal`, etc. from `typing` if those are available (as we do for other things).
* Rename `@runtime` to `@runtime_checkable` in `typing_extensions` (I think we can keep `@runtime` in `typing_extensions` as an alias for backwards compatibility).

Note this only updates Python 3 version of `typing_extensions`. There will be a corresponding update for the Python 2 version of `typing_extensions` as part of python/typing#648
JelleZijlstra pushed a commit to python/typing_extensions that referenced this issue May 19, 2022
Fixes python/typing#643

(Use ignore whitespace option to review this, since it mostly just indents a bunch of stuff.)

PR summary:
* Update Travis config to run on a bunch of newer Python versions (including 3.8-dev).
* Only run `typing` tests on Python 3.6 or older, starting from Python 3.7 development of `typing` moved to CPython repo, where it was significantly reworked. We still run `typing_extension` tests on all versions.
* Update `repr()` tests in `typing_extensions` to conditionally expect correct module name.
* Add `TypedDict` to `__all__`.
* Use `Final`, `Literal`, etc. from `typing` if those are available (as we do for other things).
* Rename `@runtime` to `@runtime_checkable` in `typing_extensions` (I think we can keep `@runtime` in `typing_extensions` as an alias for backwards compatibility).

Note this only updates Python 3 version of `typing_extensions`. There will be a corresponding update for the Python 2 version of `typing_extensions` as part of python/typing#648
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 a pull request may close this issue.

1 participant