diff --git a/_typed_dict_test_helper.py b/_typed_dict_test_helper.py new file mode 100644 index 0000000..ded561c --- /dev/null +++ b/_typed_dict_test_helper.py @@ -0,0 +1,8 @@ +from __future__ import annotations + +from typing import Generic, Optional, T +from typing_extensions import TypedDict + + +class FooGeneric(TypedDict, Generic[T]): + a: Optional[T] diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index 1ba0a48..22e6883 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Sep 5 06:47:51 UTC 2022 - John Vandenberg + +- Add _typed_dict_test_helper.py missing from PyPI release +- Update to v4.3.0 + * Add typing_extensions.NamedTuple, allowing for generic NamedTuples + on Python <3.11 (backport from python/cpython#92027, by Serhiy Storchaka) + * Adjust typing_extensions.TypedDict to allow for generic TypedDicts + on Python <3.11 (backport from python/cpython#27663, by Samodya Abey) + ------------------------------------------------------------------- Wed Apr 20 09:54:10 UTC 2022 - John Paul Adrian Glaubitz diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index b163d30..b753699 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for python-typing_extensions # # Copyright (c) 2022 SUSE LLC # @@ -28,12 +28,14 @@ %bcond_with test %endif Name: python-typing_extensions%{psuffix} -Version: 4.2.0 +Version: 4.3.0 Release: 0 Summary: Backported and Experimental Type Hints for Python 35+ License: Python-2.0 URL: https://github.com/python/typing/ Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz +# See https://github.com/python/typing_extensions/issues/61 +Source1: https://raw.githubusercontent.com/python/typing_extensions/main/src/_typed_dict_test_helper.py BuildRequires: %{python_module flit-core < 4} BuildRequires: %{python_module flit-core >= 3.4} BuildRequires: %{python_module pip} @@ -72,6 +74,11 @@ Python versions or requires experimental types. %prep %setup -q -n %{modname}-%{version} +# This should not be necessary in the next release +if [ -f src/_typed_dict_test_helper.py ]; then + exit 1 +fi +cp %{SOURCE1} src/ %build %pyproject_wheel @@ -90,7 +97,7 @@ Python versions or requires experimental types. %if ! %{with test} %files %{python_files} %license LICENSE -%doc README.rst +%doc CHANGELOG.md README.md %{python_sitelib}/typing_extensions.py* %pycache_only %{python_sitelib}/__pycache__/typing_extensions* %{python_sitelib}/typing_extensions-%{version}*-info diff --git a/typing_extensions-4.2.0.tar.gz b/typing_extensions-4.2.0.tar.gz deleted file mode 100644 index 552cb7c..0000000 --- a/typing_extensions-4.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376 -size 42982 diff --git a/typing_extensions-4.3.0.tar.gz b/typing_extensions-4.3.0.tar.gz new file mode 100644 index 0000000..45ac0bd --- /dev/null +++ b/typing_extensions-4.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6 +size 47430