Hello community, here is the log from the commit of package python-sphinxcontrib-trio for openSUSE:Factory checked in at 2018-11-06 14:31:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sphinxcontrib-trio (Old) and /work/SRC/openSUSE:Factory/.python-sphinxcontrib-trio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-sphinxcontrib-trio" Tue Nov 6 14:31:42 2018 rev:2 rq:646023 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sphinxcontrib-trio/python-sphinxcontrib-trio.changes 2018-04-20 17:26:57.879990287 +0200 +++ /work/SRC/openSUSE:Factory/.python-sphinxcontrib-trio.new/python-sphinxcontrib-trio.changes 2018-11-06 14:32:10.061228728 +0100 @@ -1,0 +2,5 @@ +Thu Nov 1 16:55:09 CET 2018 - mcepl@suse.com + +- Add avoid_contextlib2.patch gh#python-trio/sphinxcontrib-trio#18 + +------------------------------------------------------------------- New: ---- avoid_contextlib2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sphinxcontrib-trio.spec ++++++ --- /var/tmp/diff_new_pack.jg7MQc/_old 2018-11-06 14:32:24.245209440 +0100 +++ /var/tmp/diff_new_pack.jg7MQc/_new 2018-11-06 14:32:24.269209407 +0100 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -26,7 +26,8 @@ Group: Development/Languages/Python URL: https://github.com/python-trio/sphinxcontrib-trio Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-trio/sphinxcontrib-trio-%{version}.tar.gz -BuildRequires: %{python_module devel >= 3.5} +# https://github.com/python-trio/sphinxcontrib-trio/issues/18 +Patch0: avoid_contextlib2.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -42,6 +43,7 @@ %prep %setup -q -n sphinxcontrib-trio-%{version} +%autopatch -p1 %build %python_build ++++++ avoid_contextlib2.patch ++++++ --- a/sphinxcontrib_trio/__init__.py +++ b/sphinxcontrib_trio/__init__.py @@ -92,13 +92,6 @@ CM_CODES = set() from contextlib import contextmanager CM_CODES.add(contextmanager(None).__code__) -try: - from contextlib2 import contextmanager as contextmanager2 -except ImportError: - pass -else: - CM_CODES.add(contextmanager2(None).__code__) - extended_function_option_spec = { "async": directives.flag, "decorator": directives.flag, --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,5 @@ pytest pytest-cov async_generator -contextlib2 lxml cssselect --- a/tests/test_sphinxcontrib_trio.py +++ b/tests/test_sphinxcontrib_trio.py @@ -14,13 +14,6 @@ from pathlib import Path import lxml.html try: - from contextlib2 import contextmanager as contextmanager2 -except ImportError: - have_contextmanager2 = False -else: - have_contextmanager2 = True - -try: from async_generator import async_generator, yield_ except ImportError: have_async_generator = False @@ -108,12 +101,6 @@ def test_sniff_options(): check(cm, "with") - if have_contextmanager2: - @contextmanager2 - def cm2(): # pragma: no cover - yield - check(cm2, "with") - def manual_cm(): # pragma: no cover pass manual_cm.__returns_contextmanager__ = True --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -111,9 +111,7 @@ Autodetection heuristics * ``:with:`` is autodetected for: * functions decorated with `contextlib.contextmanager - https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager`__ - or `contextlib2.contextmanager - https://contextlib2.readthedocs.io/en/stable/#contextlib2.contextmanager`__, + https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager`__, * functions that have an attribute ``__returns_contextmanager__`` with a truthy value.