diff --git a/avoid_contextlib2.patch b/avoid_contextlib2.patch deleted file mode 100644 index 6a05ef6..0000000 --- a/avoid_contextlib2.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- 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 -- `__ -- or `contextlib2.contextmanager -- `__, -+ `__, - - * functions that have an attribute ``__returns_contextmanager__`` - with a truthy value. diff --git a/python-sphinxcontrib-trio.spec b/python-sphinxcontrib-trio.spec index 1c4c4b2..596336a 100644 --- a/python-sphinxcontrib-trio.spec +++ b/python-sphinxcontrib-trio.spec @@ -1,7 +1,7 @@ # # spec file for package python-sphinxcontrib-trio # -# 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 @@ -27,7 +27,6 @@ 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 # https://github.com/python-trio/sphinxcontrib-trio/issues/18 -Patch0: avoid_contextlib2.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros