diff --git a/hypothesis-Add-support-for-positional-only-arguments.patch b/hypothesis-Add-support-for-positional-only-arguments.patch new file mode 100644 index 0000000000000000000000000000000000000000..46b3375f62ad4e2fbdf0b92e1310a851ebb8ec89 --- /dev/null +++ b/hypothesis-Add-support-for-positional-only-arguments.patch @@ -0,0 +1,28 @@ +From 8f47297fa2e19c426a42b06bb5f8bf1406b8f0f3 Mon Sep 17 00:00:00 2001 +From: Paul Ganssle +Date: Mon, 29 Apr 2019 15:12:28 -0400 +Subject: [PATCH] Add support for positional only arguments + +PEP 570 adds "positional only" arguments to Python, which changes the +code object constructor. This adds support for Python 3.8. + +Fixes GH #1943: https://github.com/HypothesisWorks/hypothesis/issues/1943 +--- + hypothesis-python/src/hypothesis/internal/compat.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/hypothesis-python/src/hypothesis/internal/compat.py b/hypothesis-python/src/hypothesis/internal/compat.py +index 73305bacd2..58f63715ac 100644 +--- a/src/hypothesis/internal/compat.py ++++ b/src/hypothesis/internal/compat.py +@@ -392,6 +392,10 @@ def get_type_hints(thing): + 'co_cellvars', + ] + ++ if sys.version_info >= (3, 8, 0): ++ # PEP 570 added "positional only arguments" ++ CODE_FIELD_ORDER.insert(1, "co_posonlyargcount") ++ + + def update_code_location(code, newfile, newlineno): + """Take a code object and lie shamelessly about where it comes from. diff --git a/python-hypothesis.spec b/python-hypothesis.spec index a5d14e6df3955a6f1fcb242c9d6e5dc331d342b8..dd17b46491eb4165bbe79977337b0b1d14387c40 100644 --- a/python-hypothesis.spec +++ b/python-hypothesis.spec @@ -1,12 +1,13 @@ %{?python_enable_dependency_generator} Name: python-hypothesis Version: 3.66.11 -Release: 2 +Release: 3 Summary: based testing for python code License: MPLv2.0 URL: https://github.com/HypothesisWorks/hypothesis-python Source0: %{url}/archive/hypothesis-python-%{version}/hypothesis-%{version}.tar.gz -Patch0: hypothesis-3.12.0-offline.patch +Patch0000: hypothesis-3.12.0-offline.patch +Patch0001: hypothesis-Add-support-for-positional-only-arguments.patch BuildRequires: python-sphinx BuildArch: noarch @@ -72,5 +73,8 @@ PYTHONPATH=src READTHEDOCS=True sphinx-build -b man docs docs/_build/man %{python3_sitelib}/hypothesis/ %changelog +* Wed Jun 24 2020 lingsheng - 3.66.11-3 +- Add support for positional only arguments + * Thu Nov 28 2019 likexin - 3.66.11-2 - Package init