From 6d6d7acad6c3c72f4b8d5846ae4bd1e76862f69e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Dec 28 2016 09:22:46 +0000 Subject: Backport patches for py36 support Signed-off-by: Igor Gnatenko --- diff --git a/0001-support-ref-link-for-each-step.patch b/0001-support-ref-link-for-each-step.patch index 0cf1db9..2ae7196 100644 --- a/0001-support-ref-link-for-each-step.patch +++ b/0001-support-ref-link-for-each-step.patch @@ -1,7 +1,7 @@ -From ad04991a5cd67f946971cc15043f95a8eae29711 Mon Sep 17 00:00:00 2001 +From 1b42506d8527c523f4f98e0d817cf94cef2a7be1 Mon Sep 17 00:00:00 2001 From: Ziv Thaller Date: Mon, 21 Mar 2016 14:21:14 +0200 -Subject: [PATCH 1/2] support ref link for each step +Subject: [PATCH 1/3] support ref link for each step (cherry picked from commit 3b90000922638f56e9de521bc51f1ed46a5203c7) --- @@ -27,5 +27,5 @@ index 79768bb..3833b65 100644 # ----------------------------------------------------------------------------- # CLASS: SphinxStepsFormatter -- -2.9.2 +2.11.0 diff --git a/0002-Add-step-label-to-be-used-in-step-refs-like.patch b/0002-Add-step-label-to-be-used-in-step-refs-like.patch index 49ad321..198ab3a 100644 --- a/0002-Add-step-label-to-be-used-in-step-refs-like.patch +++ b/0002-Add-step-label-to-be-used-in-step-refs-like.patch @@ -1,7 +1,7 @@ -From 539d2bcbc0c855278cd3b639097c9e9f4ef20909 Mon Sep 17 00:00:00 2001 +From 4a31e5a9ab7b5ccb1e9c153377076d522d1633f7 Mon Sep 17 00:00:00 2001 From: jenisys Date: Tue, 22 Mar 2016 21:56:48 +0100 -Subject: [PATCH 2/2] Add step-label to be used in step-refs, like: # -- +Subject: [PATCH 2/3] Add step-label to be used in step-refs, like: # -- FILE: something.rst See also :ref:`When I create a database "{db_server}:{db_name}"` @@ -11,23 +11,22 @@ NOTES: (cherry picked from commit d3f7a2ac99c6f7faae331b05f56096eb851d11c9) --- - CHANGES.rst | 4 ++++ + CHANGES.rst | 3 +++ behave/formatter/sphinx_steps.py | 29 ++++++++++++++++++++++------- behave/formatter/sphinx_util.py | 4 +++- - 3 files changed, 29 insertions(+), 8 deletions(-) + 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst -index 1bdb644..91aa5cf 100644 +index 1bdb644..e32d2b6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst -@@ -8,6 +8,10 @@ GOALS: +@@ -8,6 +8,9 @@ GOALS: - Improve support for Windows +FORMATTERS: + + * pull #423: sphinx.steps: Support ref link for each step (provided by: ZivThaller) -+ Version: 1.2.5 (2015-01-31) ------------------------------------------------------------------------------- @@ -121,5 +120,5 @@ index e1f7846..5e5cfbf 100644 self.stream.write("%s\n" % separator) self.stream.write("%s\n" % heading) -- -2.9.2 +2.11.0 diff --git a/0003-PREPARE-for-Python-3.6-re.LOCALE-was-removed.patch b/0003-PREPARE-for-Python-3.6-re.LOCALE-was-removed.patch new file mode 100644 index 0000000..b294736 --- /dev/null +++ b/0003-PREPARE-for-Python-3.6-re.LOCALE-was-removed.patch @@ -0,0 +1,29 @@ +From b750b601da576517340dc5cb8a3ddb921dad740c Mon Sep 17 00:00:00 2001 +From: jenisys +Date: Sat, 1 Oct 2016 12:42:11 +0200 +Subject: [PATCH 3/3] PREPARE for Python 3.6: re.LOCALE was removed + +(cherry picked from commit f52cc2f59df8e21a5caf21b268bbd9ca6fa3e1e1) +--- + behave/configuration.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/behave/configuration.py b/behave/configuration.py +index a2563df..134004c 100644 +--- a/behave/configuration.py ++++ b/behave/configuration.py +@@ -661,8 +661,10 @@ class Configuration(object): + :param names: List of name parts or regular expressions (as text). + :return: Compiled regular expression to use. + """ ++ # -- NOTE: re.LOCALE is removed in Python 3.6 (deprecated in Python 3.5) ++ # flags = (re.UNICODE | re.LOCALE) + pattern = u"|".join(names) +- return re.compile(pattern, flags=(re.UNICODE | re.LOCALE)) ++ return re.compile(pattern, flags=re.UNICODE) + + def exclude(self, filename): + if isinstance(filename, FileLocation): +-- +2.11.0 + diff --git a/python-behave.spec b/python-behave.spec index a6239c7..df0bbff 100644 --- a/python-behave.spec +++ b/python-behave.spec @@ -16,11 +16,12 @@ URL: http://pypi.python.org/pypi/%{modname} Source0: https://github.com/behave/behave/archive/v%{version}/%{modname}-%{version}.tar.gz Patch0: HTML-Formatter.patch Patch1: html_formatter_no_set_codecs.patch -# https://github.com/behave/behave/commit/3b90000922638f56e9de521bc51f1ed46a5203c7 -Patch2: 0001-support-ref-link-for-each-step.patch -# https://github.com/behave/behave/commit/d3f7a2ac99c6f7faae331b05f56096eb851d11c9 -Patch3: 0002-Add-step-label-to-be-used-in-step-refs-like.patch -Patch4: 0003-unicode_fixes.patch +Patch2: 0003-unicode_fixes.patch + +# Cherry-picked patches +Patch1001: 0001-support-ref-link-for-each-step.patch +Patch1002: 0002-Add-step-label-to-be-used-in-step-refs-like.patch +Patch1003: 0003-PREPARE-for-Python-3.6-re.LOCALE-was-removed.patch BuildArch: noarch