public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/asyncssh/, dev-python/asyncssh/files/
@ 2024-07-01 15:55 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-07-01 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     cc5a7572edcab682b5e2665439952ad6f246b5ea
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 15:42:33 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 15:55:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc5a7572

dev-python/asyncssh: Enable py3.13

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

 dev-python/asyncssh/asyncssh-2.14.2.ebuild         |   8 +-
 .../asyncssh/files/asyncssh-2.14.2-py313.patch     | 151 +++++++++++++++++++++
 2 files changed, 155 insertions(+), 4 deletions(-)

diff --git a/dev-python/asyncssh/asyncssh-2.14.2.ebuild b/dev-python/asyncssh/asyncssh-2.14.2.ebuild
index 1ad40f7b2969..f3f3d4abcd70 100644
--- a/dev-python/asyncssh/asyncssh-2.14.2.ebuild
+++ b/dev-python/asyncssh/asyncssh-2.14.2.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
 
 inherit distutils-r1 optfeature pypi
 
@@ -35,9 +35,9 @@ BDEPEND="
 	)
 "
 
-EPYTEST_DESELECT=(
-	# https://github.com/ronf/asyncssh/pull/578
-	tests/test_process.py::_TestAsyncFileRedirection::test_stdout_aiofile
+PATCHES=(
+	# https://github.com/ronf/asyncssh/issues/616
+	"${FILESDIR}/${P}-py313.patch"
 )
 
 distutils_enable_tests pytest

diff --git a/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch b/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch
new file mode 100644
index 000000000000..fa3752a2b516
--- /dev/null
+++ b/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch
@@ -0,0 +1,151 @@
+From 58168139adcaa4bf12448904137cd77812636b18 Mon Sep 17 00:00:00 2001
+From: Ron Frederick <ronf@timeheart.net>
+Date: Sat, 23 Dec 2023 10:25:14 -0800
+Subject: [PATCH] Guard against possible UNIX domain socket cleanup in Python
+ 3.13
+
+This commit adds guards around code which cleans up UNIX domain
+sockets, to protect against a change proposed at
+https://github.com/python/cpython/issues/111246
+which would cause the socket to clean itself up on close.
+---
+ tests/test_agent.py   |  5 ++++-
+ tests/test_forward.py | 50 +++++++++++++++++++++++++++++++++----------
+ 2 files changed, 43 insertions(+), 12 deletions(-)
+
+diff --git a/tests/test_agent.py b/tests/test_agent.py
+index 28ca730..2f0b83c 100644
+--- a/tests/test_agent.py
++++ b/tests/test_agent.py
+@@ -85,7 +85,10 @@ async def stop(self):
+         self._server.close()
+         await self._server.wait_closed()
+ 
+-        os.remove(self._path)
++        try:
++            os.remove(self._path)
++        except OSError:
++            pass
+ 
+ 
+ class _TestAgent(AsyncTestCase):
+diff --git a/tests/test_forward.py b/tests/test_forward.py
+index cae199d..4d30eda 100644
+--- a/tests/test_forward.py
++++ b/tests/test_forward.py
+@@ -651,7 +651,10 @@ async def test_forward_local_path_to_port(self):
+             async with conn.forward_local_path_to_port('local', '', 7):
+                 await self._check_local_unix_connection('local')
+ 
+-        os.remove('local')
++        try:
++            os.remove('local')
++        except OSError:
++            pass
+ 
+     @unittest.skipIf(sys.platform == 'win32',
+                      'skip UNIX domain socket tests on Windows')
+@@ -665,7 +668,10 @@ async def test_forward_local_path_to_port_failure(self):
+             with self.assertRaises(OSError):
+                 await conn.forward_local_path_to_port('local', '', 7)
+ 
+-        os.remove('local')
++        try:
++            os.remove('local')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_forward_local_port_pause(self):
+@@ -798,7 +804,11 @@ async def test_forward_remote_port_to_path(self):
+ 
+         server.close()
+         await server.wait_closed()
+-        os.remove('local')
++
++        try:
++            os.remove('local')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_forward_remote_specific_port(self):
+@@ -1020,7 +1030,10 @@ async def test_unix_server(self):
+             await listener.wait_closed()
+             listener.close()
+ 
+-        os.remove('echo')
++        try:
++            os.remove('echo')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_unix_server_open(self):
+@@ -1053,7 +1066,10 @@ async def test_unix_server_non_async(self):
+             async with conn.start_unix_server(_unix_listener_non_async, path):
+                 await self._check_local_unix_connection('echo')
+ 
+-        os.remove('echo')
++        try:
++            os.remove('echo')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_unix_server_failure(self):
+@@ -1071,7 +1087,10 @@ async def test_forward_local_path(self):
+             async with conn.forward_local_path('local', '/echo'):
+                 await self._check_local_unix_connection('local')
+ 
+-        os.remove('local')
++        try:
++            os.remove('local')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_forward_local_port_to_path_accept_handler(self):
+@@ -1149,8 +1168,11 @@ async def test_forward_remote_path(self):
+         server.close()
+         await server.wait_closed()
+ 
+-        os.remove('echo')
+-        os.remove('local')
++        try:
++            os.remove('echo')
++            os.remove('local')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_forward_remote_path_to_port(self):
+@@ -1167,11 +1189,14 @@ async def test_forward_remote_path_to_port(self):
+                     path, '127.0.0.1', server_port):
+                 await self._check_local_unix_connection('echo')
+ 
+-        os.remove('echo')
+-
+         server.close()
+         await server.wait_closed()
+ 
++        try:
++            os.remove('echo')
++        except OSError:
++            pass
++
+     @asynctest
+     async def test_forward_remote_path_failure(self):
+         """Test failure of forwarding a remote UNIX domain path"""
+@@ -1184,7 +1209,10 @@ async def test_forward_remote_path_failure(self):
+             with self.assertRaises(asyncssh.ChannelListenError):
+                 await conn.forward_remote_path(path, 'local')
+ 
+-        os.remove('echo')
++        try:
++            os.remove('echo')
++        except OSError:
++            pass
+ 
+     @asynctest
+     async def test_forward_remote_path_not_permitted(self):


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/asyncssh/, dev-python/asyncssh/files/
@ 2024-08-18  6:04 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-08-18  6:04 UTC (permalink / raw
  To: gentoo-commits

commit:     145b7c42ae28cb09aa3cec835c09afbfd4b3cfea
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 18 05:50:01 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug 18 06:04:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=145b7c42

dev-python/asyncssh: Remove old

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

 dev-python/asyncssh/Manifest                       |   1 -
 dev-python/asyncssh/asyncssh-2.14.2.ebuild         |  53 --------
 .../asyncssh/files/asyncssh-2.14.2-py313.patch     | 151 ---------------------
 3 files changed, 205 deletions(-)

diff --git a/dev-python/asyncssh/Manifest b/dev-python/asyncssh/Manifest
index 5286e46df645..9e003e473ce5 100644
--- a/dev-python/asyncssh/Manifest
+++ b/dev-python/asyncssh/Manifest
@@ -1,2 +1 @@
-DIST asyncssh-2.14.2.tar.gz 498190 BLAKE2B 66cc538322688d0782e203eb723c7c7a196fd5da725fe95df8b31e25e35e45b86bb01cb5c46f5516475614b9cf7b8076bc3994ec77daf552e030724b0734c2d1 SHA512 76952b8837832139274fbfc4ec4aa84841c66a4eb4c1bd09fd532727287574509fb2b94b684c14d6f76add80a1fe5c8236a3412ab6a71574c203706895b23f93
 DIST asyncssh-2.15.0.tar.gz 516935 BLAKE2B 0e67dc6c2d7814479241d81e06d6a5290a99802490c097769137673980b798122718a3af99c6d71a3fb08b37d4e3e0c4cfc2fb69523b2b76c88cdbf638fd42ee SHA512 51f43bfcf27dadd9e79d7b306b11f6dc196d2de65a60663aa6e59f1b1246a6467a6324209bfb0607a9d2902ef8dde51cd172f9e32e36168954c67b8fcd7e1dd6

diff --git a/dev-python/asyncssh/asyncssh-2.14.2.ebuild b/dev-python/asyncssh/asyncssh-2.14.2.ebuild
deleted file mode 100644
index 0c7015523b72..000000000000
--- a/dev-python/asyncssh/asyncssh-2.14.2.ebuild
+++ /dev/null
@@ -1,53 +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=( python3_{10..13} )
-
-inherit distutils-r1 optfeature pypi
-
-DESCRIPTION="Asynchronous SSHv2 client and server library"
-HOMEPAGE="
-	https://github.com/ronf/asyncssh
-	https://pypi.org/project/asyncssh/
-"
-
-LICENSE="EPL-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-RDEPEND="
-	virtual/openssh
-	>=dev-python/cryptography-39.0[${PYTHON_USEDEP}]
-	>=dev-python/typing-extensions-3.6[${PYTHON_USEDEP}]
-"
-
-BDEPEND="
-	test? (
-		dev-python/aiofiles[${PYTHON_USEDEP}]
-		>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
-		>=dev-python/fido2-0.9.2[${PYTHON_USEDEP}]
-		>=dev-python/gssapi-1.2.0[${PYTHON_USEDEP}]
-		>=dev-python/libnacl-1.4.2[${PYTHON_USEDEP}]
-		>=dev-python/pyopenssl-23.0.0[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	# https://github.com/ronf/asyncssh/issues/616
-	"${FILESDIR}/${P}-py313.patch"
-)
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-distutils_enable_sphinx docs
-
-pkg_postinst() {
-	optfeature "OpenSSH private key encryption support" ">=dev-python/bcrypt-3.1.3"
-	optfeature "key exchange and authentication with U2F/FIDO2 security keys support" ">=dev-python/fido2-0.9.2"
-	optfeature "GSSAPI key exchange and authentication support" ">=dev-python/gssapi-1.2.0"
-	optfeature "using asyncssh with dev-libs/libsodium" "dev-python/libnacl"
-	optfeature "X.509 certificate authentication support" ">=dev-python/pyopenssl-23.0.0"
-}

diff --git a/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch b/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch
deleted file mode 100644
index fa3752a2b516..000000000000
--- a/dev-python/asyncssh/files/asyncssh-2.14.2-py313.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 58168139adcaa4bf12448904137cd77812636b18 Mon Sep 17 00:00:00 2001
-From: Ron Frederick <ronf@timeheart.net>
-Date: Sat, 23 Dec 2023 10:25:14 -0800
-Subject: [PATCH] Guard against possible UNIX domain socket cleanup in Python
- 3.13
-
-This commit adds guards around code which cleans up UNIX domain
-sockets, to protect against a change proposed at
-https://github.com/python/cpython/issues/111246
-which would cause the socket to clean itself up on close.
----
- tests/test_agent.py   |  5 ++++-
- tests/test_forward.py | 50 +++++++++++++++++++++++++++++++++----------
- 2 files changed, 43 insertions(+), 12 deletions(-)
-
-diff --git a/tests/test_agent.py b/tests/test_agent.py
-index 28ca730..2f0b83c 100644
---- a/tests/test_agent.py
-+++ b/tests/test_agent.py
-@@ -85,7 +85,10 @@ async def stop(self):
-         self._server.close()
-         await self._server.wait_closed()
- 
--        os.remove(self._path)
-+        try:
-+            os.remove(self._path)
-+        except OSError:
-+            pass
- 
- 
- class _TestAgent(AsyncTestCase):
-diff --git a/tests/test_forward.py b/tests/test_forward.py
-index cae199d..4d30eda 100644
---- a/tests/test_forward.py
-+++ b/tests/test_forward.py
-@@ -651,7 +651,10 @@ async def test_forward_local_path_to_port(self):
-             async with conn.forward_local_path_to_port('local', '', 7):
-                 await self._check_local_unix_connection('local')
- 
--        os.remove('local')
-+        try:
-+            os.remove('local')
-+        except OSError:
-+            pass
- 
-     @unittest.skipIf(sys.platform == 'win32',
-                      'skip UNIX domain socket tests on Windows')
-@@ -665,7 +668,10 @@ async def test_forward_local_path_to_port_failure(self):
-             with self.assertRaises(OSError):
-                 await conn.forward_local_path_to_port('local', '', 7)
- 
--        os.remove('local')
-+        try:
-+            os.remove('local')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_forward_local_port_pause(self):
-@@ -798,7 +804,11 @@ async def test_forward_remote_port_to_path(self):
- 
-         server.close()
-         await server.wait_closed()
--        os.remove('local')
-+
-+        try:
-+            os.remove('local')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_forward_remote_specific_port(self):
-@@ -1020,7 +1030,10 @@ async def test_unix_server(self):
-             await listener.wait_closed()
-             listener.close()
- 
--        os.remove('echo')
-+        try:
-+            os.remove('echo')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_unix_server_open(self):
-@@ -1053,7 +1066,10 @@ async def test_unix_server_non_async(self):
-             async with conn.start_unix_server(_unix_listener_non_async, path):
-                 await self._check_local_unix_connection('echo')
- 
--        os.remove('echo')
-+        try:
-+            os.remove('echo')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_unix_server_failure(self):
-@@ -1071,7 +1087,10 @@ async def test_forward_local_path(self):
-             async with conn.forward_local_path('local', '/echo'):
-                 await self._check_local_unix_connection('local')
- 
--        os.remove('local')
-+        try:
-+            os.remove('local')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_forward_local_port_to_path_accept_handler(self):
-@@ -1149,8 +1168,11 @@ async def test_forward_remote_path(self):
-         server.close()
-         await server.wait_closed()
- 
--        os.remove('echo')
--        os.remove('local')
-+        try:
-+            os.remove('echo')
-+            os.remove('local')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_forward_remote_path_to_port(self):
-@@ -1167,11 +1189,14 @@ async def test_forward_remote_path_to_port(self):
-                     path, '127.0.0.1', server_port):
-                 await self._check_local_unix_connection('echo')
- 
--        os.remove('echo')
--
-         server.close()
-         await server.wait_closed()
- 
-+        try:
-+            os.remove('echo')
-+        except OSError:
-+            pass
-+
-     @asynctest
-     async def test_forward_remote_path_failure(self):
-         """Test failure of forwarding a remote UNIX domain path"""
-@@ -1184,7 +1209,10 @@ async def test_forward_remote_path_failure(self):
-             with self.assertRaises(asyncssh.ChannelListenError):
-                 await conn.forward_remote_path(path, 'local')
- 
--        os.remove('echo')
-+        try:
-+            os.remove('echo')
-+        except OSError:
-+            pass
- 
-     @asynctest
-     async def test_forward_remote_path_not_permitted(self):


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

end of thread, other threads:[~2024-08-18  6:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-18  6:04 [gentoo-commits] repo/gentoo:master commit in: dev-python/asyncssh/, dev-python/asyncssh/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-07-01 15:55 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