Skip to content

Commit

Permalink
Update python-typing_extensions to version 4.4.0 / rev 16 via SR 1031001
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1031001
by user mcepl + dimstar_suse
- Clean specfile from old cruft.
- Requires Python 3.7+
- Fix testsuite: Must test as module; don't need multibuild.
- Update Summary and Description
- 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.
  • Loading branch information
mcepl authored and bmwiedemann committed Oct 27, 2022
1 parent 7b65f8d commit 2ce7d92
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 55 deletions.
Binary file modified packages/p/python-typing_extensions/.files
Binary file not shown.
22 changes: 22 additions & 0 deletions packages/p/python-typing_extensions/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,26 @@
<comment></comment>
<requestid>1001419</requestid>
</revision>
<revision rev="16" vrev="1">
<srcmd5>45257d574226ec68cbc8b4edfe49f82d</srcmd5>
<version>4.4.0</version>
<time>1666871607</time>
<user>dimstar_suse</user>
<comment>- Clean specfile from old cruft.
- Requires Python 3.7+
- Fix testsuite: Must test as module; don't need multibuild.
- Update Summary and Description
- 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.
</comment>
<requestid>1031001</requestid>
</revision>
</revisionlist>
3 changes: 0 additions & 3 deletions packages/p/python-typing_extensions/_multibuild

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Oct 24 18:14:28 UTC 2022 - Ben Greiner <code@bnavigator.de>

- 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 <adrian.glaubitz@suse.com>

- 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 <jayvdb@gmail.com>

Expand Down
87 changes: 36 additions & 51 deletions packages/p/python-typing_extensions/python-typing_extensions.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# spec file for python-typing_extensions
# spec file for package python-typing_extensions
#
# Copyright (c) 2022 SUSE LLC
#
Expand All @@ -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}
Version: 4.3.0
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
Provides: python-typing-extensions = %{version}-%{release}
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
%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:

* 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.

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.

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``.
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.

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.
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
Expand All @@ -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
%pyunittest -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

This file was deleted.

0 comments on commit 2ce7d92

Please sign in to comment.