17
0

Compare commits

4 Commits

Author SHA256 Message Date
9d30ea2112 Accepting request 1286096 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1286096
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-aiosmtpd?expand=0&rev=17
2025-06-17 16:21:15 +00:00
3e70a3872a - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiosmtpd?expand=0&rev=34
2025-06-16 12:17:10 +00:00
c2d003bccd Accepting request 1226979 from devel:languages:python
- 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/request/show/1226979
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-aiosmtpd?expand=0&rev=16
2024-11-28 21:42:44 +00:00
469accceca - 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
2024-11-27 23:08:56 +00:00
4 changed files with 1 additions and 77 deletions

View File

@@ -1,47 +0,0 @@
From 533ed1304c57bc7179bf88e5f5f81f4bb329b1dd Mon Sep 17 00:00:00 2001
From: John Bucy <bucy@gloop.org>
Date: Wed, 18 Jun 2025 11:05:23 -0700
Subject: [PATCH 1/2] migrate config_test from pkg_resources to
importlib_resources
pkg_resources is now throwing a deprecation warning
this is only used to get the cert filenames
https://setuptools.pypa.io/en/latest/pkg_resources.html
https://importlib-resources.readthedocs.io/en/latest/migration.html
---
aiosmtpd/tests/conftest.py | 13 ++++++++++---
requirements-dev.txt | 1 +
2 files changed, 11 insertions(+), 3 deletions(-)
Index: aiosmtpd-1.4.6/aiosmtpd/tests/conftest.py
===================================================================
--- aiosmtpd-1.4.6.orig/aiosmtpd/tests/conftest.py
+++ aiosmtpd-1.4.6/aiosmtpd/tests/conftest.py
@@ -12,7 +12,7 @@ from smtplib import SMTP as SMTPClient
from typing import Any, Callable, Generator, NamedTuple, Optional, Type, TypeVar
import pytest
-from pkg_resources import resource_filename
+import importlib.resources
from pytest_mock import MockFixture
from aiosmtpd.controller import Controller
@@ -73,8 +73,15 @@ class Global:
# If less than 1.0, might cause intermittent error if test system
# is too busy/overloaded.
AUTOSTOP_DELAY = 1.5
-SERVER_CRT = resource_filename("aiosmtpd.tests.certs", "server.crt")
-SERVER_KEY = resource_filename("aiosmtpd.tests.certs", "server.key")
+# https://importlib-resources.readthedocs.io/en/latest/migration.html
+# this assumes these files are already present in the filesystem so
+# it doesn't need to extract a tempfile for the context manager to clean up
+ref = importlib.resources.files("aiosmtpd.tests.certs") / "server.crt"
+with importlib.resources.as_file(ref) as path:
+ SERVER_CRT = str(path)
+ref = importlib.resources.files("aiosmtpd.tests.certs") / "server.key"
+with importlib.resources.as_file(ref) as path:
+ SERVER_KEY = str(path)
# endregion

View File

@@ -1,15 +1,3 @@
-------------------------------------------------------------------
Fri Jan 2 12:16:00 UTC 2026 - Ben Greiner <code@bnavigator.de>
- Add aiosmtpd-pr557-pkg_resources.patch gh#aio-libs/aiosmtpd#557
for setuptools 80
-------------------------------------------------------------------
Mon Nov 10 04:59:40 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python-314.patch:
* Use inspect.iscoroutine, rather than asyncio.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 16 12:16:45 UTC 2025 - Markéta Machová <mmachova@suse.com> Mon Jun 16 12:16:45 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-aiosmtpd # spec file for package python-aiosmtpd
# #
# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -27,10 +27,6 @@ URL: https://aiosmtpd.readthedocs.io/
Source: https://github.com/aio-libs/aiosmtpd/archive/v%{version}.tar.gz#/aiosmtpd-%{version}.tar.gz 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 # PATCH-FIX-UPSTREAM Based on gh#aio-libs/aiosmtpd#473
Patch0: support-python-313.patch Patch0: support-python-313.patch
# PATCH-FIX-OPENSUSE Use inspect.iscorountine
Patch1: support-python-314.patch
# PATCH-FIX-UPSTREAM aiosmtpd-pr557-pkg_resources.patch gh#aio-libs/aiosmtpd#557
Patch2: aiosmtpd-pr557-pkg_resources.patch
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}

View File

@@ -1,13 +0,0 @@
Index: aiosmtpd-1.4.6/aiosmtpd/smtp.py
===================================================================
--- aiosmtpd-1.4.6.orig/aiosmtpd/smtp.py
+++ aiosmtpd-1.4.6/aiosmtpd/smtp.py
@@ -1526,7 +1526,7 @@ class SMTP(asyncio.StreamReaderProtocol)
assert self.session is not None
args = (self.session.peer, self.envelope.mail_from,
self.envelope.rcpt_tos, self.envelope.content)
- if asyncio.iscoroutinefunction(
+ if inspect.iscoroutinefunction(
self.event_handler.process_message):
status = await self.event_handler.process_message(*args)
else: