forked from pool/python-aiosmtpd
- Switch to pyproject macros.
- Add patch support-python-313.patch:
* With Python 3.13, the listening asyncio Unix socket is removed
on close
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiosmtpd?expand=0&rev=32
This commit is contained in:
26
support-python-313.patch
Normal file
26
support-python-313.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/aiosmtpd/tests/test_server.py b/aiosmtpd/tests/test_server.py
|
||||
index 443c0833..d2251d4a 100644
|
||||
--- a/aiosmtpd/tests/test_server.py
|
||||
+++ b/aiosmtpd/tests/test_server.py
|
||||
@@ -448,10 +448,17 @@ def test_unixsocket(self, safe_socket_dir, autostop_loop, runner):
|
||||
# Stop the task
|
||||
cont.end()
|
||||
catchup_delay()
|
||||
- # Now the listener has gone away
|
||||
- # noinspection PyTypeChecker
|
||||
- with pytest.raises((socket.timeout, ConnectionError)):
|
||||
- assert_smtp_socket(cont)
|
||||
+ if sys.version_info < (3, 13):
|
||||
+ # Now the listener has gone away
|
||||
+ # noinspection PyTypeChecker
|
||||
+ with pytest.raises((socket.timeout, ConnectionError)):
|
||||
+ assert_smtp_socket(cont)
|
||||
+ else:
|
||||
+ # Starting from Python 3.13, listening asyncio Unix socket is
|
||||
+ # removed on close, see:
|
||||
+ # https://github.com/python/cpython/issues/111246
|
||||
+ # https://github.com/python/cpython/pull/111483
|
||||
+ assert not Path(cont.unix_socket).exists()
|
||||
|
||||
@pytest.mark.filterwarnings(
|
||||
"ignore::pytest.PytestUnraisableExceptionWarning"
|
||||
Reference in New Issue
Block a user