From 6fd66c5e61a4b3dd5f39cf6b38266ba38af0cbf80e234e92e2bde543b2c18e6d Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 18 Oct 2022 12:16:57 +0000 Subject: [PATCH 1/3] Accepting request 1029737 from home:glaubitz:branches:devel:languages:python - Update to version 4.4.0 * Add `typing_extensions.Any` a backport of python 3.11's Any class which is subclassable at runtime. (backport from python/cpython#31841, by Shantanu and Jelle Zijlstra). Patch by James Hilton-Balfe (@Gobot1234). * Add initial support for TypeVarLike `default` parameter, PEP 696. Patch by Marc Mueller (@cdce8p). * Runtime support for PEP 698, adding `typing_extensions.override`. Patch by Jelle Zijlstra. * Add the `infer_variance` parameter to `TypeVar`, as specified in PEP 695. Patch by Jelle Zijlstra. OBS-URL: https://build.opensuse.org/request/show/1029737 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=35 --- python-typing_extensions.changes | 14 ++++++++++++++ python-typing_extensions.spec | 2 +- typing_extensions-4.3.0.tar.gz | 3 --- typing_extensions-4.4.0.tar.gz | 3 +++ 4 files changed, 18 insertions(+), 4 deletions(-) delete mode 100644 typing_extensions-4.3.0.tar.gz create mode 100644 typing_extensions-4.4.0.tar.gz diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index 22e6883..7114736 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Oct 18 12:07:27 UTC 2022 - John Paul Adrian Glaubitz + +- Update to version 4.4.0 + * Add `typing_extensions.Any` a backport of python 3.11's Any class which is + subclassable at runtime. (backport from python/cpython#31841, by Shantanu + and Jelle Zijlstra). Patch by James Hilton-Balfe (@Gobot1234). + * Add initial support for TypeVarLike `default` parameter, PEP 696. + Patch by Marc Mueller (@cdce8p). + * Runtime support for PEP 698, adding `typing_extensions.override`. Patch by + Jelle Zijlstra. + * Add the `infer_variance` parameter to `TypeVar`, as specified in PEP 695. + Patch by Jelle Zijlstra. + ------------------------------------------------------------------- Mon Sep 5 06:47:51 UTC 2022 - John Vandenberg diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index b753699..b60b1c7 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -28,7 +28,7 @@ %bcond_with test %endif Name: python-typing_extensions%{psuffix} -Version: 4.3.0 +Version: 4.4.0 Release: 0 Summary: Backported and Experimental Type Hints for Python 35+ License: Python-2.0 diff --git a/typing_extensions-4.3.0.tar.gz b/typing_extensions-4.3.0.tar.gz deleted file mode 100644 index 45ac0bd..0000000 --- a/typing_extensions-4.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6 -size 47430 diff --git a/typing_extensions-4.4.0.tar.gz b/typing_extensions-4.4.0.tar.gz new file mode 100644 index 0000000..21f9a5c --- /dev/null +++ b/typing_extensions-4.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa +size 49708 From 4e5a5958dd577de471fee4adc79b69fca70638041534f98eba56a7d32005e242 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 25 Oct 2022 05:34:48 +0000 Subject: [PATCH 2/3] Accepting request 1030938 from home:bnavigator:branches:devel:languages:python - Clean specfile from old cruft. - Requires Python 3.7+ - Fix testsuite: Must test as module; don't need multibuild. - Update Summary and Description OBS-URL: https://build.opensuse.org/request/show/1030938 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=36 --- _multibuild | 3 -- python-typing_extensions.changes | 8 +++ python-typing_extensions.spec | 85 +++++++++++++------------------- 3 files changed, 43 insertions(+), 53 deletions(-) delete mode 100644 _multibuild diff --git a/_multibuild b/_multibuild deleted file mode 100644 index fcc7b97..0000000 --- a/_multibuild +++ /dev/null @@ -1,3 +0,0 @@ - - test - diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index 7114736..cb988bf 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Oct 24 18:14:28 UTC 2022 - Ben Greiner + +- Clean specfile from old cruft. +- Requires Python 3.7+ +- Fix testsuite: Must test as module; don't need multibuild. +- Update Summary and Description + ------------------------------------------------------------------- Tue Oct 18 12:07:27 UTC 2022 - John Paul Adrian Glaubitz diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index b60b1c7..9023580 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -1,5 +1,5 @@ # -# spec file for python-typing_extensions +# spec file for package python-typing_extensions # # Copyright (c) 2022 SUSE LLC # @@ -16,64 +16,53 @@ # -%define modname typing_extensions -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without python2 -%global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" == "test" -%define psuffix -test -%bcond_without test -%else -%define psuffix %{nil} -%bcond_with test -%endif -Name: python-typing_extensions%{psuffix} +Name: python-typing_extensions Version: 4.4.0 Release: 0 -Summary: Backported and Experimental Type Hints for Python 35+ +Summary: Backported and Experimental Type Hints for Python 3.7+ License: Python-2.0 URL: https://github.com/python/typing/ -Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/typing_extensions-%{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} +Source1: https://raw.githubusercontent.com/python/typing_extensions/%{version}/src/_typed_dict_test_helper.py +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module flit-core >= 3.4 with %python-flit-core < 4} BuildRequires: %{python_module pip} +BuildRequires: %{python_module testsuite} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch -Provides: python-typing-extensions = %{version} -%if 0%{?suse_version} > 1320 && %{with test} -BuildRequires: %{python_module testsuite} -%endif -%if %{with python2} -BuildRequires: python-typing >= 3.7.4 -%endif -BuildRequires: (python3-typing >= 3.7.4 if python3-base < 3.5) -%if %{python_version_nodots} < 35 -Requires: python-typing >= 3.7.4 -%endif +Provides: python-typing-extensions = %{version}-%{release} %python_subpackages %description -The ``typing`` module was added to the standard library in Python -3.5 on a provisional basis and will no longer be provisional in -Python 3.7. However, this means users of Python 3.5 - 3.6 who are -unable to upgrade will not be able to take advantage of new types -added to the ``typing`` module, such as ``typing.Text`` or -``typing.Coroutine``. +The typing_extensions module serves two related purposes: -The ``typing_extensions`` module contains both backports of these -changes as well as experimental types that will eventually be -added to the ``typing`` module, such as ``Protocol``. + * Enable use of new type system features on older Python versions. + For example, typing.TypeGuard is new in Python 3.10, but + typing_extensions allows users on previous Python versions to use + it too. + * Enable experimentation with new type system PEPs before they are + accepted and added to the typing module. -Users of other Python versions should continue to install and use -the ``typing`` module from PyPi instead of using this one unless -specifically writing code that must be compatible with multiple -Python versions or requires experimental types. +New features may be added to typing_extensions as soon as they are +specified in a PEP that has been added to the python/peps repository. +If the PEP is accepted, the feature will then be added to typing for +the next CPython release. No typing PEP has been rejected so far, so +we haven't yet figured out how to deal with that possibility. + +Starting with version 4.0.0, typing_extensions uses Semantic Versioning. +The major version is incremented for all backwards-incompatible changes. +Therefore, it's safe to depend on typing_extensions like this: +typing_extensions >=x.y, <(x+1), +where x.y is the first version that includes all features you need. + +typing_extensions supports Python versions 3.7 and higher. +In the future, support for older Python versions will be dropped some time +after that version reaches end of life. %prep -%setup -q -n %{modname}-%{version} +%setup -q -n typing_extensions-%{version} # This should not be necessary in the next release if [ -f src/_typed_dict_test_helper.py ]; then exit 1 @@ -83,24 +72,20 @@ cp %{SOURCE1} src/ %build %pyproject_wheel -%if ! %{with test} %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%endif -%if %{with test} %check -%python_exec src/test_typing_extensions.py -%endif +pushd src +%python_exec -m unittest -v test_typing_extensions +popd -%if ! %{with test} %files %{python_files} %license LICENSE %doc CHANGELOG.md README.md %{python_sitelib}/typing_extensions.py* %pycache_only %{python_sitelib}/__pycache__/typing_extensions* %{python_sitelib}/typing_extensions-%{version}*-info -%endif %changelog From c7441c9c7d8870237dcaa69476dcfae358aee3f7e866baf176ca7218e6e4da6b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 25 Oct 2022 05:36:46 +0000 Subject: [PATCH 3/3] Use pyunittest macro. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=37 --- python-typing_extensions.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index 9023580..cbfcf29 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -31,8 +31,8 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module testsuite} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildArch: noarch Provides: python-typing-extensions = %{version}-%{release} +BuildArch: noarch %python_subpackages %description @@ -78,7 +78,7 @@ cp %{SOURCE1} src/ %check pushd src -%python_exec -m unittest -v test_typing_extensions +%pyunittest -v test_typing_extensions popd %files %{python_files}