From 4e5a5958dd577de471fee4adc79b69fca70638041534f98eba56a7d32005e242 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 25 Oct 2022 05:34:48 +0000 Subject: [PATCH] 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