public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/anyio/, dev-python/anyio/files/
@ 2022-02-17 21:48 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-02-17 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     42da4f9a7f7a19a5302a5385bbfdba59d6a955c9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 17 21:42:45 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 17 21:42:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42da4f9a

dev-python/anyio: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/anyio/Manifest                          |   1 -
 dev-python/anyio/anyio-3.2.1.ebuild                |  48 --------
 .../anyio/files/anyio-3.2.1-missing-trio.patch     | 125 ---------------------
 3 files changed, 174 deletions(-)

diff --git a/dev-python/anyio/Manifest b/dev-python/anyio/Manifest
index 854e221cc9f1..d8102ac9e4f7 100644
--- a/dev-python/anyio/Manifest
+++ b/dev-python/anyio/Manifest
@@ -1,3 +1,2 @@
-DIST anyio-3.2.1.tar.gz 126277 BLAKE2B 510980c9251081d5188f7654279753051cd9f8221f2090fb99624612e48b6f5fc1f6d9f1808f1c329c350857f14ceaee0d72615857171de33dc35cc7ba35ab23 SHA512 ef78e5531a917e3a5ddc1106f45ba556ca147e52ab29ed6cb25a3bd287148a15a015942dde6b9535d683fbe5910affed27df6ce5c4049251610f689cd151ee89
 DIST anyio-3.4.0.tar.gz 135737 BLAKE2B 6023d051a10a067b8c86576dd80571a64c72a807c56235ecd7bad364b79b10c5b845c6b584c5310db01b3bfdd92deeaf64b855716b9fa817fe2fc590de33ec4c SHA512 276fb5fc243e2c7f80a069f604ef68eeaca923c0df6f533878f9bf2185e846e537a1b9a8f19260a3c9ad3aad70898884316e6783057044a936762f7eb1f1cb9a
 DIST anyio-3.5.0.tar.gz 136934 BLAKE2B 422d604c23658844467926f42c09895e54debfd3ddf2f7fa561eccae0c9cbc225f51d663cb9f98a2455736ad7a81eb4ae40a6f3ad66f3d2f0b02d0a5157203e0 SHA512 b91124c95d194eb7e4542405a973895d21562a2636d9600d528465da52536d1ffedbf5a6fc3ea5b1ff3e83e7dca2b42f090bb2ff6b077e32f5a2c314f07d3206

diff --git a/dev-python/anyio/anyio-3.2.1.ebuild b/dev-python/anyio/anyio-3.2.1.ebuild
deleted file mode 100644
index 8531185549a0..000000000000
--- a/dev-python/anyio/anyio-3.2.1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Compatibility layer for multiple asynchronous event loop implementations"
-HOMEPAGE="
-	https://github.com/agronholm/anyio
-	https://pypi.org/project/anyio/
-"
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa ppc ppc64 ~riscv sparc x86"
-
-RDEPEND="
-	>=dev-python/idna-2.8[${PYTHON_USEDEP}]
-	>=dev-python/sniffio-1.1[${PYTHON_USEDEP}]
-"
-
-BDEPEND="
-	test? (
-		>=dev-python/hypothesis-4.0[${PYTHON_USEDEP}]
-		>=dev-python/pytest-6.2[${PYTHON_USEDEP}]
-		>=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-		>=dev-python/uvloop-0.15[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests --install pytest
-distutils_enable_sphinx docs \
-	dev-python/sphinx_rtd_theme \
-	dev-python/sphinx-autodoc-typehints
-
-PATCHES=(
-	"${FILESDIR}"/${P}-missing-trio.patch
-)
-
-python_test() {
-	distutils_install_for_testing
-	epytest -Wdefault -m 'not network' -p no:django
-}

diff --git a/dev-python/anyio/files/anyio-3.2.1-missing-trio.patch b/dev-python/anyio/files/anyio-3.2.1-missing-trio.patch
deleted file mode 100644
index 492fe40fe70e..000000000000
--- a/dev-python/anyio/files/anyio-3.2.1-missing-trio.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From d05f92bddc4b34a8d527f66d5d27513cd91c741a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 24 Jun 2021 09:16:01 +0200
-Subject: [PATCH] Handle missing trio gracefully
-
-Make it possible to use anyio without actually having to install trio.
-This involves modifying get_all_backends() to only return the backends
-that are actually present, and teaching the tests to skip trio if it
-is not importable.
----
- src/anyio/_core/_eventloop.py | 13 +++++++++----
- tests/conftest.py             |  9 ++++++++-
- tests/test_pytest_plugin.py   |  2 +-
- tests/test_taskgroups.py      | 10 ++++++++--
- 4 files changed, 26 insertions(+), 8 deletions(-)
-
-diff --git a/src/anyio/_core/_eventloop.py b/src/anyio/_core/_eventloop.py
-index f2364a3..431a922 100644
---- a/src/anyio/_core/_eventloop.py
-+++ b/src/anyio/_core/_eventloop.py
-@@ -10,8 +10,6 @@ import sniffio
- # This must be updated when new backends are introduced
- from ._compat import DeprecatedAwaitableFloat
- 
--BACKENDS = 'asyncio', 'trio'
--
- T_Retval = TypeVar('T_Retval')
- threadlocals = threading.local()
- 
-@@ -106,8 +104,15 @@ def current_time() -> DeprecatedAwaitableFloat:
- 
- 
- def get_all_backends() -> Tuple[str, ...]:
--    """Return a tuple of the names of all built-in backends."""
--    return BACKENDS
-+    """Return a tuple of the names of all available built-in backends."""
-+    backends = ['asyncio']
-+    try:
-+        import trio
-+    except ImportError:
-+        pass
-+    else:
-+        backends.append(trio)
-+    return tuple(backends)
- 
- 
- def get_cancelled_exc_class() -> Type[BaseException]:
-diff --git a/tests/conftest.py b/tests/conftest.py
-index f040ac8..5834395 100644
---- a/tests/conftest.py
-+++ b/tests/conftest.py
-@@ -8,6 +8,11 @@ import trustme
- from _pytest.fixtures import SubRequest
- from trustme import CA
- 
-+try:
-+    import trio
-+except ImportError:
-+    trio = None
-+
- uvloop_marks = []
- uvloop_policy = None
- try:
-@@ -30,7 +35,9 @@ pytest_plugins = ['pytester']
-                  id='asyncio'),
-     pytest.param(('asyncio', {'debug': True, 'policy': uvloop_policy}), marks=uvloop_marks,
-                  id='asyncio+uvloop'),
--    pytest.param('trio')
-+    pytest.param('trio',
-+                 marks=[pytest.mark.skipif(trio is None,
-+                                           reason='trio is not available')])
- ])
- def anyio_backend(request: SubRequest) -> Tuple[str, Dict[str, Any]]:
-     return request.param
-diff --git a/tests/test_pytest_plugin.py b/tests/test_pytest_plugin.py
-index bb254a5..d55d511 100644
---- a/tests/test_pytest_plugin.py
-+++ b/tests/test_pytest_plugin.py
-@@ -135,7 +135,7 @@ def test_asyncio(testdir: Testdir) -> None:
-     )
- 
-     result = testdir.runpytest('-v')
--    result.assert_outcomes(passed=2, failed=1, errors=2)
-+    result.assert_outcomes(passed=2, failed=1, errors=len(get_all_backends()))
- 
- 
- def test_autouse_async_fixture(testdir: Testdir) -> None:
-diff --git a/tests/test_taskgroups.py b/tests/test_taskgroups.py
-index 62a2389..47971c0 100644
---- a/tests/test_taskgroups.py
-+++ b/tests/test_taskgroups.py
-@@ -5,7 +5,6 @@ import time
- from typing import Any, AsyncGenerator, Coroutine, Dict, Generator, NoReturn, Set
- 
- import pytest
--import trio
- 
- import anyio
- from anyio import (
-@@ -13,6 +12,11 @@ from anyio import (
-     fail_after, get_cancelled_exc_class, move_on_after, sleep, wait_all_tasks_blocked)
- from anyio.abc import TaskGroup, TaskStatus
- 
-+try:
-+    import trio
-+except ImportError:
-+    trio = None
-+
- if sys.version_info < (3, 7):
-     current_task = asyncio.Task.current_task
- else:
-@@ -53,7 +57,9 @@ async def test_success() -> None:
- 
- @pytest.mark.parametrize('module', [
-     pytest.param(asyncio, id='asyncio'),
--    pytest.param(trio, id='trio')
-+    pytest.param(trio, id='trio',
-+                 marks=[pytest.mark.skipif(trio is None,
-+                                           reason='trio is not available')])
- ])
- def test_run_natively(module: Any) -> None:
-     async def testfunc() -> None:
--- 
-2.32.0
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/anyio/, dev-python/anyio/files/
@ 2022-04-06 19:41 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-04-06 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     7c1b1e277d01420db29b7fedea9dcb1d3b36fb02
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  6 19:24:56 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr  6 19:40:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1b1e27

dev-python/anyio: Fix tests, PEP 517 build

Closes: https://bugs.gentoo.org/832870
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../{anyio-3.5.0.ebuild => anyio-3.5.0-r1.ebuild}  | 13 ++--
 dev-python/anyio/files/anyio-3.5.0-pytest-7.patch  | 78 ++++++++++++++++++++++
 2 files changed, 87 insertions(+), 4 deletions(-)

diff --git a/dev-python/anyio/anyio-3.5.0.ebuild b/dev-python/anyio/anyio-3.5.0-r1.ebuild
similarity index 85%
rename from dev-python/anyio/anyio-3.5.0.ebuild
rename to dev-python/anyio/anyio-3.5.0-r1.ebuild
index 5379b452a5e4..cbbb327c2923 100644
--- a/dev-python/anyio/anyio-3.5.0.ebuild
+++ b/dev-python/anyio/anyio-3.5.0-r1.ebuild
@@ -3,12 +3,14 @@
 
 EAPI=8
 
+DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{8..10} )
+
 inherit distutils-r1
 
 DESCRIPTION="Compatibility layer for multiple asynchronous event loop implementations"
 HOMEPAGE="
-	https://github.com/agronholm/anyio
+	https://github.com/agronholm/anyio/
 	https://pypi.org/project/anyio/
 "
 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
@@ -26,20 +28,23 @@ RDEPEND="
 BDEPEND="
 	test? (
 		>=dev-python/hypothesis-4.0[${PYTHON_USEDEP}]
-		>=dev-python/pytest-6.2[${PYTHON_USEDEP}]
+		>=dev-python/pytest-7[${PYTHON_USEDEP}]
 		>=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
 		dev-python/trustme[${PYTHON_USEDEP}]
 		amd64? ( >=dev-python/uvloop-0.15[${PYTHON_USEDEP}] )
 	)
 "
 
-distutils_enable_tests --install pytest
+distutils_enable_tests pytest
 distutils_enable_sphinx docs \
 	dev-python/sphinx_rtd_theme \
 	dev-python/sphinx-autodoc-typehints
 
+PATCHES=(
+	"${FILESDIR}"/${P}-pytest-7.patch
+)
+
 python_test() {
 	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	distutils_install_for_testing --via-venv
 	epytest -m 'not network'
 }

diff --git a/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch b/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch
new file mode 100644
index 000000000000..858404632959
--- /dev/null
+++ b/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch
@@ -0,0 +1,78 @@
+From fed7cc4f95e196f68251bcb9253da3b143ea8e7e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
+Date: Mon, 7 Feb 2022 00:16:18 +0200
+Subject: [PATCH] Upgraded pytest to 7.0
+
+---
+ setup.cfg                   |  2 +-
+ tests/test_pytest_plugin.py | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/tests/test_pytest_plugin.py b/tests/test_pytest_plugin.py
+index 4255702..f3b0e0c 100644
+--- a/tests/test_pytest_plugin.py
++++ b/tests/test_pytest_plugin.py
+@@ -1,5 +1,5 @@
+ import pytest
+-from _pytest.pytester import Testdir
++from _pytest.pytester import Pytester
+ 
+ from anyio import get_all_backends
+ 
+@@ -9,7 +9,7 @@ pytestmark = pytest.mark.filterwarnings(
+ pytest_args = '-v', '-p', 'anyio', '-p', 'no:asyncio'
+ 
+ 
+-def test_plugin(testdir: Testdir) -> None:
++def test_plugin(testdir: Pytester) -> None:
+     testdir.makeconftest(
+         """
+         import sniffio
+@@ -67,7 +67,7 @@ def test_plugin(testdir: Testdir) -> None:
+     result.assert_outcomes(passed=3 * len(get_all_backends()), skipped=len(get_all_backends()))
+ 
+ 
+-def test_asyncio(testdir: Testdir) -> None:
++def test_asyncio(testdir: Pytester) -> None:
+     testdir.makeconftest(
+         """
+         import asyncio
+@@ -140,7 +140,7 @@ def test_asyncio(testdir: Testdir) -> None:
+     result.assert_outcomes(passed=2, failed=1, errors=2)
+ 
+ 
+-def test_autouse_async_fixture(testdir: Testdir) -> None:
++def test_autouse_async_fixture(testdir: Pytester) -> None:
+     testdir.makeconftest(
+         """
+         import pytest
+@@ -177,7 +177,7 @@ def test_autouse_async_fixture(testdir: Testdir) -> None:
+     result.assert_outcomes(passed=len(get_all_backends()))
+ 
+ 
+-def test_cancel_scope_in_asyncgen_fixture(testdir: Testdir) -> None:
++def test_cancel_scope_in_asyncgen_fixture(testdir: Pytester) -> None:
+     testdir.makepyfile(
+         """
+         import pytest
+@@ -204,7 +204,7 @@ def test_cancel_scope_in_asyncgen_fixture(testdir: Testdir) -> None:
+     result.assert_outcomes(passed=len(get_all_backends()))
+ 
+ 
+-def test_hypothesis_module_mark(testdir: Testdir) -> None:
++def test_hypothesis_module_mark(testdir: Pytester) -> None:
+     testdir.makepyfile(
+         """
+         import pytest
+@@ -235,7 +235,7 @@ def test_hypothesis_module_mark(testdir: Testdir) -> None:
+     result.assert_outcomes(passed=len(get_all_backends()) + 1, xfailed=len(get_all_backends()))
+ 
+ 
+-def test_hypothesis_function_mark(testdir: Testdir) -> None:
++def test_hypothesis_function_mark(testdir: Pytester) -> None:
+     testdir.makepyfile(
+         """
+         import pytest
+-- 
+2.35.1
+


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/anyio/, dev-python/anyio/files/
@ 2022-06-16  9:18 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-06-16  9:18 UTC (permalink / raw
  To: gentoo-commits

commit:     2d17a8bfc2a05d812544da7352a59124f40f831a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 16 09:15:10 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 16 09:18:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d17a8bf

dev-python/anyio: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/anyio/Manifest                         |  1 -
 dev-python/anyio/anyio-3.5.0-r1.ebuild            | 55 ----------------
 dev-python/anyio/files/anyio-3.5.0-pytest-7.patch | 78 -----------------------
 3 files changed, 134 deletions(-)

diff --git a/dev-python/anyio/Manifest b/dev-python/anyio/Manifest
index f5e33716864f..b9e96550b640 100644
--- a/dev-python/anyio/Manifest
+++ b/dev-python/anyio/Manifest
@@ -1,2 +1 @@
-DIST anyio-3.5.0.tar.gz 136934 BLAKE2B 422d604c23658844467926f42c09895e54debfd3ddf2f7fa561eccae0c9cbc225f51d663cb9f98a2455736ad7a81eb4ae40a6f3ad66f3d2f0b02d0a5157203e0 SHA512 b91124c95d194eb7e4542405a973895d21562a2636d9600d528465da52536d1ffedbf5a6fc3ea5b1ff3e83e7dca2b42f090bb2ff6b077e32f5a2c314f07d3206
 DIST anyio-3.6.1.tar.gz 140240 BLAKE2B 391892591bee88df8fd5c099b6670af8e01af0610f7659e2f2e717c2dfd94d6e5212260acf3acca6c8b149cab6781044fb665d579a63b322332bf87767374858 SHA512 99ae55eada2df971405a1592afd980ac964c80a4502465a2016423182409691d0c943280a3a7448efc78036e481614451585238b62ebea924709f0ba888f7604

diff --git a/dev-python/anyio/anyio-3.5.0-r1.ebuild b/dev-python/anyio/anyio-3.5.0-r1.ebuild
deleted file mode 100644
index a90f9a7309cb..000000000000
--- a/dev-python/anyio/anyio-3.5.0-r1.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Compatibility layer for multiple asynchronous event loop implementations"
-HOMEPAGE="
-	https://github.com/agronholm/anyio/
-	https://pypi.org/project/anyio/
-"
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND="
-	>=dev-python/idna-2.8[${PYTHON_USEDEP}]
-	>=dev-python/sniffio-1.1[${PYTHON_USEDEP}]
-"
-# On amd64, let's get more test coverage by dragging in uvloop, but let's
-# not bother on other arches where uvloop may not be supported.
-BDEPEND="
-	test? (
-		>=dev-python/hypothesis-4.0[${PYTHON_USEDEP}]
-		>=dev-python/pytest-7[${PYTHON_USEDEP}]
-		>=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
-		dev-python/trio[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-		amd64? (
-			$(python_gen_cond_dep '
-				>=dev-python/uvloop-0.15[${PYTHON_USEDEP}]
-			' 'python*')
-		)
-	)
-"
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs \
-	dev-python/sphinx_rtd_theme \
-	dev-python/sphinx-autodoc-typehints
-
-PATCHES=(
-	"${FILESDIR}"/${P}-pytest-7.patch
-)
-
-python_test() {
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest -m 'not network'
-}

diff --git a/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch b/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch
deleted file mode 100644
index 858404632959..000000000000
--- a/dev-python/anyio/files/anyio-3.5.0-pytest-7.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From fed7cc4f95e196f68251bcb9253da3b143ea8e7e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
-Date: Mon, 7 Feb 2022 00:16:18 +0200
-Subject: [PATCH] Upgraded pytest to 7.0
-
----
- setup.cfg                   |  2 +-
- tests/test_pytest_plugin.py | 14 +++++++-------
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/tests/test_pytest_plugin.py b/tests/test_pytest_plugin.py
-index 4255702..f3b0e0c 100644
---- a/tests/test_pytest_plugin.py
-+++ b/tests/test_pytest_plugin.py
-@@ -1,5 +1,5 @@
- import pytest
--from _pytest.pytester import Testdir
-+from _pytest.pytester import Pytester
- 
- from anyio import get_all_backends
- 
-@@ -9,7 +9,7 @@ pytestmark = pytest.mark.filterwarnings(
- pytest_args = '-v', '-p', 'anyio', '-p', 'no:asyncio'
- 
- 
--def test_plugin(testdir: Testdir) -> None:
-+def test_plugin(testdir: Pytester) -> None:
-     testdir.makeconftest(
-         """
-         import sniffio
-@@ -67,7 +67,7 @@ def test_plugin(testdir: Testdir) -> None:
-     result.assert_outcomes(passed=3 * len(get_all_backends()), skipped=len(get_all_backends()))
- 
- 
--def test_asyncio(testdir: Testdir) -> None:
-+def test_asyncio(testdir: Pytester) -> None:
-     testdir.makeconftest(
-         """
-         import asyncio
-@@ -140,7 +140,7 @@ def test_asyncio(testdir: Testdir) -> None:
-     result.assert_outcomes(passed=2, failed=1, errors=2)
- 
- 
--def test_autouse_async_fixture(testdir: Testdir) -> None:
-+def test_autouse_async_fixture(testdir: Pytester) -> None:
-     testdir.makeconftest(
-         """
-         import pytest
-@@ -177,7 +177,7 @@ def test_autouse_async_fixture(testdir: Testdir) -> None:
-     result.assert_outcomes(passed=len(get_all_backends()))
- 
- 
--def test_cancel_scope_in_asyncgen_fixture(testdir: Testdir) -> None:
-+def test_cancel_scope_in_asyncgen_fixture(testdir: Pytester) -> None:
-     testdir.makepyfile(
-         """
-         import pytest
-@@ -204,7 +204,7 @@ def test_cancel_scope_in_asyncgen_fixture(testdir: Testdir) -> None:
-     result.assert_outcomes(passed=len(get_all_backends()))
- 
- 
--def test_hypothesis_module_mark(testdir: Testdir) -> None:
-+def test_hypothesis_module_mark(testdir: Pytester) -> None:
-     testdir.makepyfile(
-         """
-         import pytest
-@@ -235,7 +235,7 @@ def test_hypothesis_module_mark(testdir: Testdir) -> None:
-     result.assert_outcomes(passed=len(get_all_backends()) + 1, xfailed=len(get_all_backends()))
- 
- 
--def test_hypothesis_function_mark(testdir: Testdir) -> None:
-+def test_hypothesis_function_mark(testdir: Pytester) -> None:
-     testdir.makepyfile(
-         """
-         import pytest
--- 
-2.35.1
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/anyio/, dev-python/anyio/files/
@ 2024-10-12  7:28 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2024-10-12  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     6dd496f59f465e51d5ca6c3a3f0dbf62034aeacd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 12 07:20:07 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 07:27:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dd496f5

dev-python/anyio: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/anyio/Manifest                      |  2 -
 dev-python/anyio/anyio-4.4.0-r1.ebuild         | 87 -------------------------
 dev-python/anyio/anyio-4.5.0.ebuild            | 74 ---------------------
 dev-python/anyio/files/anyio-4.4.0-py313.patch | 90 --------------------------
 4 files changed, 253 deletions(-)

diff --git a/dev-python/anyio/Manifest b/dev-python/anyio/Manifest
index 97c31427ed0e..7d2d94833006 100644
--- a/dev-python/anyio/Manifest
+++ b/dev-python/anyio/Manifest
@@ -1,3 +1 @@
-DIST anyio-4.4.0.tar.gz 163930 BLAKE2B a37b8bc05e43cf1a4bc3f15ab399c78c7a76235942d776848307b189898973e46ddfb553bd20da154dc740d8b8bb93050ac460e56607b686bc2936c5a1e09332 SHA512 db8ad7a4faf257269de9975c3a6325023a95255a8bfe1a9642221080f44a2487160f3c0e8b220d637816e9eb3641550393a3c80b23bddafc33fd9ebe9a23b33d
-DIST anyio-4.5.0.tar.gz 169376 BLAKE2B be8b68729b9ad3c6ff39844617ebabf2b36facee5b1e4cbc9933fb6315a70daec785d2aebab9dc29d387987bee20bc6bf56f3befa9a997a4caa2ef9d7dffcc23 SHA512 12dbcc59888c555381589a820713c636f0f1a09d7999746ce5fbbdaa9a4cad5644510d036287d202db617ee16d59231a8edc824b003056bad22a189b5863c6f5
 DIST anyio-4.6.0.tar.gz 170983 BLAKE2B 686cb9b622cba29d02fe6e440502de80c159dc40547124aed79eb7558fe147fa62f378745c2aa5487ca1ea7c24e1f3c6167f8343236dbb7e0876d95f741c46ec SHA512 4828198d3e2b2924b3490c305dcaddc14b5746b29a0cb36f75913f897254fed0ac46e075a3c04bf164a7d4d597b0dcdd991fe5cb26ffce477d029db7ff924f38

diff --git a/dev-python/anyio/anyio-4.4.0-r1.ebuild b/dev-python/anyio/anyio-4.4.0-r1.ebuild
deleted file mode 100644
index 9dae25bf5777..000000000000
--- a/dev-python/anyio/anyio-4.4.0-r1.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Compatibility layer for multiple asynchronous event loop implementations"
-HOMEPAGE="
-	https://github.com/agronholm/anyio/
-	https://pypi.org/project/anyio/
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND="
-	>=dev-python/idna-2.8[${PYTHON_USEDEP}]
-	>=dev-python/sniffio-1.1[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep '
-		>=dev-python/exceptiongroup-1.2.0[${PYTHON_USEDEP}]
-		>=dev-python/typing-extensions-4.1[${PYTHON_USEDEP}]
-	' 3.10)
-"
-# On amd64, let's get more test coverage by dragging in uvloop, but let's
-# not bother on other arches where uvloop may not be supported.
-BDEPEND="
-	>=dev-python/setuptools-scm-6.4[${PYTHON_USEDEP}]
-	test? (
-		>=dev-python/exceptiongroup-1.2.0[${PYTHON_USEDEP}]
-		>=dev-python/hypothesis-4.0[${PYTHON_USEDEP}]
-		>=dev-python/psutil-5.9[${PYTHON_USEDEP}]
-		>=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-		$(python_gen_cond_dep '
-			>=dev-python/trio-0.23[${PYTHON_USEDEP}]
-		' 3.{10..13})
-		amd64? (
-			$(python_gen_cond_dep '
-				>=dev-python/uvloop-0.17[${PYTHON_USEDEP}]
-			' python3_{10..12})
-		)
-	)
-"
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs \
-	'>=dev-python/sphinx-rtd-theme-1.2.2' \
-	dev-python/sphinxcontrib-jquery \
-	dev-python/sphinx-autodoc-typehints
-
-PATCHES=(
-	# https://github.com/agronholm/anyio/pull/740
-	"${FILESDIR}/${P}-py313.patch"
-)
-
-python_test() {
-	local EPYTEST_DESELECT=(
-		# requires link-local IPv6 interface
-		tests/test_sockets.py::TestTCPListener::test_bind_link_local
-	)
-
-	local filter=()
-	if ! has_version ">=dev-python/trio-0.23[${PYTHON_USEDEP}]"; then
-		filter+=( -k "not trio" )
-		EPYTEST_DESELECT+=(
-			tests/test_pytest_plugin.py::test_plugin
-			tests/test_pytest_plugin.py::test_autouse_async_fixture
-			tests/test_pytest_plugin.py::test_cancel_scope_in_asyncgen_fixture
-		)
-	fi
-
-	case ${EPYTHON} in
-		python3.13)
-			EPYTEST_DESELECT+=(
-				'tests/test_fileio.py::TestPath::test_properties[asyncio]'
-			)
-			;;
-	esac
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest -m 'not network' "${filter[@]}"
-}

diff --git a/dev-python/anyio/anyio-4.5.0.ebuild b/dev-python/anyio/anyio-4.5.0.ebuild
deleted file mode 100644
index fdce513c8b72..000000000000
--- a/dev-python/anyio/anyio-4.5.0.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Compatibility layer for multiple asynchronous event loop implementations"
-HOMEPAGE="
-	https://github.com/agronholm/anyio/
-	https://pypi.org/project/anyio/
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-RDEPEND="
-	>=dev-python/idna-2.8[${PYTHON_USEDEP}]
-	>=dev-python/sniffio-1.1[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep '
-		>=dev-python/exceptiongroup-1.2.0[${PYTHON_USEDEP}]
-		>=dev-python/typing-extensions-4.1[${PYTHON_USEDEP}]
-	' 3.10)
-"
-# On amd64, let's get more test coverage by dragging in uvloop, but let's
-# not bother on other arches where uvloop may not be supported.
-BDEPEND="
-	>=dev-python/setuptools-scm-6.4[${PYTHON_USEDEP}]
-	test? (
-		>=dev-python/exceptiongroup-1.2.0[${PYTHON_USEDEP}]
-		>=dev-python/hypothesis-4.0[${PYTHON_USEDEP}]
-		>=dev-python/psutil-5.9[${PYTHON_USEDEP}]
-		>=dev-python/pytest-mock-3.6.1[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-		$(python_gen_cond_dep '
-			>=dev-python/trio-0.26.1[${PYTHON_USEDEP}]
-		' 3.{10..13})
-		amd64? (
-			$(python_gen_cond_dep '
-				>=dev-python/uvloop-0.21.0_beta1[${PYTHON_USEDEP}]
-			' python3_{10..13})
-		)
-	)
-"
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs \
-	'>=dev-python/sphinx-rtd-theme-1.2.2' \
-	dev-python/sphinxcontrib-jquery \
-	dev-python/sphinx-autodoc-typehints
-
-python_test() {
-	local EPYTEST_DESELECT=(
-		# requires link-local IPv6 interface
-		tests/test_sockets.py::TestTCPListener::test_bind_link_local
-	)
-
-	local filter=()
-	if ! has_version ">=dev-python/trio-0.26.1[${PYTHON_USEDEP}]"; then
-		filter+=( -k "not trio" )
-		EPYTEST_DESELECT+=(
-			tests/test_pytest_plugin.py::test_plugin
-			tests/test_pytest_plugin.py::test_autouse_async_fixture
-			tests/test_pytest_plugin.py::test_cancel_scope_in_asyncgen_fixture
-		)
-	fi
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest -m 'not network' "${filter[@]}"
-}

diff --git a/dev-python/anyio/files/anyio-4.4.0-py313.patch b/dev-python/anyio/files/anyio-4.4.0-py313.patch
deleted file mode 100644
index ebd3763f7544..000000000000
--- a/dev-python/anyio/files/anyio-4.4.0-py313.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 8a4d651610abb71da66cef58f350788eab6b0bd1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
-Date: Tue, 28 May 2024 01:00:49 +0300
-Subject: [PATCH 1/3] Added missing Path properties from Python 3.13
-
-Fixes #737.
----
- src/anyio/_core/_fileio.py | 24 ++++++++++++++++++++++--
- tests/test_fileio.py       | 18 ++++++++++++++++++
- 4 files changed, 47 insertions(+), 4 deletions(-)
-
-diff --git a/src/anyio/_core/_fileio.py b/src/anyio/_core/_fileio.py
-index df2057fe..8053dce5 100644
---- a/src/anyio/_core/_fileio.py
-+++ b/src/anyio/_core/_fileio.py
-@@ -358,8 +358,28 @@ def as_posix(self) -> str:
-     def as_uri(self) -> str:
-         return self._path.as_uri()
- 
--    def match(self, path_pattern: str) -> bool:
--        return self._path.match(path_pattern)
-+    if sys.version_info >= (3, 13):
-+        parser = pathlib.Path.parser  # type: ignore[attr-defined]
-+
-+        @classmethod
-+        def from_uri(cls, uri: str) -> Path:
-+            return Path(pathlib.Path.from_uri(uri))  # type: ignore[attr-defined]
-+
-+        def full_match(
-+            self, path_pattern: str, *, case_sensitive: bool | None = None
-+        ) -> bool:
-+            return self._path.full_match(  # type: ignore[attr-defined]
-+                path_pattern, case_sensitive=case_sensitive
-+            )
-+
-+        def match(
-+            self, path_pattern: str, *, case_sensitive: bool | None = None
-+        ) -> bool:
-+            return self._path.match(path_pattern, case_sensitive=case_sensitive)
-+    else:
-+
-+        def match(self, path_pattern: str) -> bool:
-+            return self._path.match(path_pattern)
- 
-     def is_relative_to(self, other: str | PathLike[str]) -> bool:
-         try:
-diff --git a/tests/test_fileio.py b/tests/test_fileio.py
-index bcd7fe1d..ff9178e0 100644
---- a/tests/test_fileio.py
-+++ b/tests/test_fileio.py
-@@ -186,6 +186,15 @@ def test_as_uri(self) -> None:
-         else:
-             assert Path("/foo/bar").as_uri() == "file:///foo/bar"
- 
-+    @pytest.mark.skipif(
-+        sys.version_info < (3, 13),
-+        reason="Path.from_uri() is only available on Python 3.13+",
-+    )
-+    def test_from_uri(self) -> None:
-+        path = Path.from_uri("file:///foo/bar")
-+        assert isinstance(path, Path)
-+        assert path.as_uri() == "file:///foo/bar"
-+
-     async def test_cwd(self) -> None:
-         result = await Path.cwd()
-         assert isinstance(result, Path)
-@@ -269,6 +278,7 @@ async def test_is_mount(self) -> None:
-         assert not await Path("/gfobj4ewiotj").is_mount()
-         assert await Path("/").is_mount()
- 
-+    @pytest.mark.filterwarnings("ignore::DeprecationWarning")
-     def test_is_reserved(self) -> None:
-         expected_result = platform.system() == "Windows"
-         assert Path("nul").is_reserved() == expected_result
-@@ -339,6 +349,14 @@ def test_joinpath(self) -> None:
-         path = Path("/foo").joinpath("bar")
-         assert path == Path("/foo/bar")
- 
-+    @pytest.mark.skipif(
-+        sys.version_info < (3, 13),
-+        reason="Path.full_match() is only available on Python 3.13+",
-+    )
-+    def test_fullmatch(self) -> None:
-+        assert Path("/foo/bar").full_match("/foo/*")
-+        assert not Path("/foo/bar").full_match("/baz/*")
-+
-     def test_match(self) -> None:
-         assert Path("/foo/bar").match("/foo/*")
-         assert not Path("/foo/bar").match("/baz/*")
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-12  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12  7:28 [gentoo-commits] repo/gentoo:master commit in: dev-python/anyio/, dev-python/anyio/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2022-06-16  9:18 Michał Górny
2022-04-06 19:41 Michał Górny
2022-02-17 21:48 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox