From b961c694e39b24e4768f46f1725eaef928012b56e30eefde14091a6f21b48250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 Feb 2019 08:59:10 +0000 Subject: [PATCH 1/2] Accepting request 679992 from home:jayvdb:noflake8 - Replace test_modules.tar.gz with python-testsuite - Remove fix_tests.patch which is half fixing test_modules.tar.gz, and the other half is replaced with a less brittle sed. - Remove unnecessary build dependencies - Update to 3.7.2 OBS-URL: https://build.opensuse.org/request/show/679992 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=4 --- fix_tests.patch | 29 ----------------------------- python-typing_extensions.changes | 19 +++++++++++++++++++ python-typing_extensions.spec | 15 +++++---------- test_modules.tar.gz | 3 --- typing_extensions-3.7.2.tar.gz | 3 +++ 5 files changed, 27 insertions(+), 42 deletions(-) delete mode 100644 fix_tests.patch delete mode 100644 test_modules.tar.gz create mode 100644 typing_extensions-3.7.2.tar.gz diff --git a/fix_tests.patch b/fix_tests.patch deleted file mode 100644 index 2cfff67..0000000 --- a/fix_tests.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/src_py3/test_typing_extensions.py -+++ b/src_py3/test_typing_extensions.py -@@ -31,7 +31,7 @@ except ImportError: - - # We assume Python versions *below* 3.5.0 will have the most - # up-to-date version of the typing module installed. Since --# the typing module isn't a part of the standard library in older -+# the typing module isn't a part of the standard library in older - # versions of Python, those users are likely to have a reasonably - # modern version of `typing` installed from PyPi. - TYPING_LATEST = sys.version_info[:3] < (3, 5, 0) -@@ -288,7 +288,7 @@ else: - AwaitableWrapper = AsyncIteratorWrapper = ACM = object - - PY36_TESTS = """ --from test import ann_module, ann_module2, ann_module3 -+import ann_module, ann_module2, ann_module3 - from typing_extensions import AsyncContextManager - from typing import NamedTuple - -@@ -1313,7 +1313,7 @@ class AllTests(BaseTestCase): - file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'typing_extensions.py') - try: -- subprocess.check_output('python -OO {}'.format(file_path), -+ subprocess.check_output('python3 -OO {}'.format(file_path), - stderr=subprocess.STDOUT, - shell=True) - except subprocess.CalledProcessError: diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index 6c6d96a..c3de173 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Feb 28 04:57:58 UTC 2019 - John Vandenberg + +- Replace test_modules.tar.gz with python-testsuite +- Remove fix_tests.patch which is half fixing test_modules.tar.gz, + and the other half is replaced with a less brittle sed. +- Remove unnecessary build dependencies +- Update to 3.7.2 + * Pass *args and **kwargs to superclass in Generic.__new__ + * Fix for issue #524 + * Fix typing_extensions to support PEP 560 + * Add annotations to NamedTuple children __new__ constructors + * Add missing 'NoReturn' to __all__ in typing.py + * Backport Generic.__new__ fix + * Fix IO.closed to be property + * Add Final to typing_extensions + * Fix instance/subclass checks of functions against runtime protocols + * Add Literal[...] types to typing_extensions + ------------------------------------------------------------------- Tue Oct 23 10:24:22 UTC 2018 - Matej Cepl diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index e024360..98fcf19 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -1,7 +1,7 @@ # # spec file for package python-typing_extensions # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,22 +20,17 @@ %define modname typing_extensions %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-typing_extensions -Version: 3.6.6 +Version: 3.7.2 Release: 0 Summary: Backported and Experimental Type Hints for Python 35+ License: Python-2.0 Group: Development/Languages/Python URL: https://github.com/python/typing/ Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz -Source1: test_modules.tar.gz -Patch0: fix_tests.patch -BuildRequires: %{python_module flake8-bugbear} -BuildRequires: %{python_module flake8-pyi} -BuildRequires: %{python_module flake8} BuildRequires: %{python_module pytest >= 3.0} -BuildRequires: %{python_module pytest-cov >= 2.4.0} BuildRequires: %{python_module pytest-xdist >= 1.18} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module testsuite} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -60,7 +55,8 @@ Python versions or requires experimental types. %prep %setup -q -n %{modname}-%{version} -%autopatch -p1 +# Workaround https://github.com/python/typing/pull/615 +sed -i 's/python -OO/python3 -OO/' src_py3/test_typing_extensions.py %build %python_build @@ -71,7 +67,6 @@ Python versions or requires experimental types. %check cd src_py3 -tar xvf %{SOURCE1} %__python3 test_typing_extensions.py %files %{python_files} diff --git a/test_modules.tar.gz b/test_modules.tar.gz deleted file mode 100644 index 71509f2..0000000 --- a/test_modules.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:197b3c64106db87f9f11522e24307125038bd38b0acd7ad7b3b64c1423d48e03 -size 17042 diff --git a/typing_extensions-3.7.2.tar.gz b/typing_extensions-3.7.2.tar.gz new file mode 100644 index 0000000..5960c87 --- /dev/null +++ b/typing_extensions-3.7.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb2cd053238d33a8ec939190f30cfd736c00653a85a2919415cecf7dc3d9da71 +size 34042 From ac5d8358f52345fb4106454e7079291664fe4d5a8cdbc4836d5a2851bb4c6c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 Feb 2019 09:01:48 +0000 Subject: [PATCH 2/2] - Drop the old tarball OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=5 --- python-typing_extensions.changes | 5 +++++ typing_extensions-3.6.6.tar.gz | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 typing_extensions-3.6.6.tar.gz diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index c3de173..806f5de 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 28 09:01:37 UTC 2019 - Tomáš Chvátal + +- Drop the old tarball + ------------------------------------------------------------------- Thu Feb 28 04:57:58 UTC 2019 - John Vandenberg diff --git a/typing_extensions-3.6.6.tar.gz b/typing_extensions-3.6.6.tar.gz deleted file mode 100644 index beeaf69..0000000 --- a/typing_extensions-3.6.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51e7b7f3dcabf9ad22eed61490f3b8d23d9922af400fe6656cb08e66656b701f -size 32610