summaryrefslogtreecommitdiff
path: root/dev-python/sybil
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/sybil')
-rw-r--r--dev-python/sybil/Manifest3
-rw-r--r--dev-python/sybil/files/sybil-2.0.1-py310.patch94
-rw-r--r--dev-python/sybil/sybil-2.0.1.ebuild6
3 files changed, 101 insertions, 2 deletions
diff --git a/dev-python/sybil/Manifest b/dev-python/sybil/Manifest
index 33056f2d4be1..0b11c2844a8f 100644
--- a/dev-python/sybil/Manifest
+++ b/dev-python/sybil/Manifest
@@ -1,3 +1,4 @@
+AUX sybil-2.0.1-py310.patch 3513 BLAKE2B 5004b889f186591a31e990b7bc88eec5063b67e2d43103e73c6a4c411b96d804762421cd24440a4caa2622abaf04c6b4e1e5417e2e1644339fedbf9c6aab7292 SHA512 450b21492c70dc8838b9eeb515d9dfbd36e857da6c641598e3a95e6499431476b5c864f466653e36015236b5c13c2056cd324adbe44d9a52bd9d8fc17260708a
DIST sybil-2.0.1.tar.gz 29316 BLAKE2B cf03bc1595efab535d1248b9d267dcd01547f02539977c12b8753e70d13ea0744a6ab76dc1e44fd1c46d192577aa4c1a9b5d5d52678928acfd63937358fa3e33 SHA512 4f3be7686c1acf6812623a756fa79b41e3fbe5d4c3b4c7cf5dfe39fbe56806b4ef3acd24e25968ab9119b2c65ad5c30eabe32f1a93fb62ba8d3893ef123e69f0
-EBUILD sybil-2.0.1.ebuild 429 BLAKE2B 9ed8efdaec0c3cf9f19ef1e47c68094d5f0b38546765d2fd38edef5f9c073a249ea3203acf2d7595b6d73ccc1216f3ff9cc8dcf32deccbc9c3d5f5d2f6579996 SHA512 f079cd49b756e34ae15a2f79d2e4c9b35ea0a28c4f5bebf7a6f463cd99b29f8bce16a2d89127ff67acaf584baa16e5eed52a4c79bdcc2ed2ce038dfd2a34904e
+EBUILD sybil-2.0.1.ebuild 475 BLAKE2B e1c7d174ede80ea3907674b271d8ee38af02ca9a2d5724957aac1b95d70afd7b0b36c1fa8689643d846df141b9be9accf6f84785df227a3a15c6e72e681e0f65 SHA512 8ce03f90558d6ee63fff2d7e2b3707c5cc674077853b54b4585ca5b8b1747b197e32a48b6c3bb5c20e7a3014417ecdc3428bcbb0ea0c14a0b54cb77831a8f06a
MISC metadata.xml 397 BLAKE2B 6a49550b305c35a6fbb679f8b33a359e96067c3980fccb5bb4f46837f125f84d7c590cdff0b7e9edd08d27ae406ec2e12a00db9e5c266d83f764c213579b3b9e SHA512 85ed69ab5207b47db4b65e7a199639a5368cfc9ea03365ed62bf00c7447e5aaadee89b9827a1bbc93d035732b757a132e6e2992163ada0c2050be0983f3bc883
diff --git a/dev-python/sybil/files/sybil-2.0.1-py310.patch b/dev-python/sybil/files/sybil-2.0.1-py310.patch
new file mode 100644
index 000000000000..15d46bae929b
--- /dev/null
+++ b/dev-python/sybil/files/sybil-2.0.1-py310.patch
@@ -0,0 +1,94 @@
+From 022fe7d654bdeba6db6eb26c0f9434f0882174bf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 9 Jun 2021 10:49:33 +0200
+Subject: [PATCH 1/3] tests: adjust for slightly different whitespace under
+ python3.10
+
+'> raise' is now '> raise' (extra space).
+
+For https://bugzilla.redhat.com/show_bug.cgi?id=1908278.
+The tests now pass with python3-3.9.5-2.fc34.x86_64 and
+python3-3.10.0~b2-3.fc35.x86_64.
+---
+ tests/test_functional.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_functional.py b/tests/test_functional.py
+index f8d41de..5a2e356 100644
+--- a/tests/test_functional.py
++++ b/tests/test_functional.py
+@@ -99,14 +99,14 @@ def pytest_sessionfinish(self, session):
+ 'sybil teardown 4\n'
+ 'session_fixture teardown')
+ out.then_find('_ fail.rst line=1 column=1 _')
+- out.then_find( "> raise Exception('the start!')")
++ out.then_find( " raise Exception('the start!')")
+ out.then_find('_ fail.rst line=8 column=1 _')
+ out.then_find('Y count was 3 instead of 2')
+ out.then_find('fail.rst:8: SybilFailure')
+ out.then_find('_ fail.rst line=10 column=1 _')
+ out.then_find('ValueError: X count was 3 instead of 4')
+ out.then_find('_ fail.rst line=14 column=1 _')
+- out.then_find("> raise Exception('boom!')")
++ out.then_find(" raise Exception('boom!')")
+ out.then_find('fail.rst:18: Exception')
+
+
+
+From 9723fc90f0b1f8f48c1109d501a31309f93add92 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 9 Jun 2021 10:50:06 +0200
+Subject: [PATCH 2/3] tests: adjust for different line numbers under python3.10
+
+I think this is related to
+https://docs.python.org/3.10/whatsnew/3.10.html#pep-626-precise-line-numbers-for-debugging-and-other-tools
+
+For https://bugzilla.redhat.com/show_bug.cgi?id=1908278.
+The tests now pass with python3-3.9.5-2.fc34.x86_64 and
+python3-3.10.0~b2-3.fc35.x86_64.
+---
+ tests/test_codeblock.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_codeblock.py b/tests/test_codeblock.py
+index c9f8b17..c30ae3a 100644
+--- a/tests/test_codeblock.py
++++ b/tests/test_codeblock.py
+@@ -44,7 +44,7 @@ def test_future_imports():
+ )
+ # the future import line drops the firstlineno by 1
+ code = compile_codeblock(regions[0].parsed, document.path)
+- assert code.co_firstlineno == 2
++ assert code.co_firstlineno in (1, 2) # we get 1 under python3.10
+ assert evaluate_region(regions[1], namespace) is None
+ assert buffer.getvalue() == (
+ 'pathalogical worst case for line numbers\n'
+@@ -52,7 +52,7 @@ def test_future_imports():
+ )
+ # the future import line drops the firstlineno by 1
+ code = compile_codeblock(regions[1].parsed, document.path)
+- assert code.co_firstlineno == 8
++ assert code.co_firstlineno in (1, 8) # we get 1 under python3.10
+
+
+ def test_windows_line_endings(tmp_path):
+
+From 11862367a760045cc34c11cf888b04f9ca6f4e2d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 9 Jun 2021 10:51:56 +0200
+Subject: [PATCH 3/3] gitignore: ignore __pycache__ directories
+
+---
+ .gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/.gitignore b/.gitignore
+index ee824be..0afa48a 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -5,4 +5,5 @@
+ .coverage*
+ _build/
+ .*cache/
++__pycache__/
+ pytestdebug.log
diff --git a/dev-python/sybil/sybil-2.0.1.ebuild b/dev-python/sybil/sybil-2.0.1.ebuild
index 0e19bc2316fd..84763f93566f 100644
--- a/dev-python/sybil/sybil-2.0.1.ebuild
+++ b/dev-python/sybil/sybil-2.0.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Automated testing for the examples in your documentation"
@@ -15,3 +15,7 @@ SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~riscv x86"
distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-py310.patch
+)