Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 9d30ea2112 | |||
| 3e70a3872a | |||
| c2d003bccd | |||
| 469accceca |
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 16 12:16:45 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 27 23:07:53 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to pyproject macros.
|
||||
- Add patch support-python-313.patch:
|
||||
* With Python 3.13, the listening asyncio Unix socket is removed
|
||||
on close
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 20 11:20:49 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-aiosmtpd
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,25 +16,28 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without libalternatives
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-aiosmtpd
|
||||
Version: 1.4.6
|
||||
Release: 0
|
||||
Summary: SMTP server based on asyncio
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://aiosmtpd.readthedocs.io/
|
||||
Source: https://github.com/aio-libs/aiosmtpd/archive/v%{version}.tar.gz#/aiosmtpd-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM Based on gh#aio-libs/aiosmtpd#473
|
||||
Patch0: support-python-313.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: alts
|
||||
Requires: python-atpublic
|
||||
Requires: python-attrs
|
||||
Requires: (python-typing_extensions if python-base < 3.8)
|
||||
Requires: user(nobody)
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module atpublic}
|
||||
@@ -42,7 +45,6 @@ BuildRequires: %{python_module attrs}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module typing_extensions if %python-base < 3.8}
|
||||
BuildRequires: user(nobody)
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
@@ -68,10 +70,10 @@ This package provides such an implementation of both the SMTP and LMTP protocols
|
||||
sed -i '/--cov=/d' pytest.ini
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/aiosmtpd
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
@@ -86,18 +88,15 @@ ignore="--ignore aiosmtpd/tests/test_server.py"
|
||||
|
||||
%pytest $ignore
|
||||
|
||||
%post
|
||||
%python_install_alternative aiosmtpd
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative aiosmtpd
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative aiosmtpd
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/aiosmtpd
|
||||
%{python_sitelib}/aiosmtpd
|
||||
%{python_sitelib}/aiosmtpd-%{version}*-info
|
||||
%{python_sitelib}/aiosmtpd-%{version}.dist-info
|
||||
%exclude %{python_sitelib}/aiosmtpd/docs
|
||||
|
||||
%changelog
|
||||
|
||||
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