Update package to version 1.4.4

This commit is contained in:
jxy_git 2023-03-20 17:11:16 +08:00
parent 3ef0745445
commit ac650c4aee
8 changed files with 8 additions and 4956 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
From b50563035ebf72502e25488367b46fccce5d6991 Mon Sep 17 00:00:00 2001
From: Pandu E POLUAN <pepoluan@gmail.com>
Date: Wed, 24 Mar 2021 11:03:53 +0700
Subject: [PATCH 3/4] URGENT: Fix RTD docs gen
---
aiosmtpd/docs/RTD-requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/aiosmtpd/docs/RTD-requirements.txt b/aiosmtpd/docs/RTD-requirements.txt
index 42c1f7b..cfdaa48 100644
--- a/aiosmtpd/docs/RTD-requirements.txt
+++ b/aiosmtpd/docs/RTD-requirements.txt
@@ -4,6 +4,7 @@ sphinx-autofixture
sphinx_rtd_theme
# Required by Sphinx.autodoc
pytest>=6.0
+pytest-mock
# aiosmtpd deps
atpublic
--
2.32.0

View File

@ -1,120 +0,0 @@
From 215b854447e2567bbc5e3665d9a648d7b1fa2c82 Mon Sep 17 00:00:00 2001
From: Pandu POLUAN <pepoluan@gmail.com>
Date: Wed, 24 Mar 2021 12:14:03 +0700
Subject: [PATCH 4/4] Make Sphinx/RTD deps SSOT
Previously we can accidentally forgot to sync between tox.ini, GA yml,
and RTD-requirements.txt.
Now tox.ini and GA yml actually refers to RTD-requirements.txt, so we
have achieved SSOT (Single Source Of Truth) for Sphinx/RTD deps.
---
.github/workflows/unit-testing-and-coverage.yml | 7 +++++--
aiosmtpd/docs/RTD-requirements.txt | 11 +++++++----
aiosmtpd/docs/conf.py | 7 ++++---
tox.ini | 11 +----------
4 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/unit-testing-and-coverage.yml b/.github/workflows/unit-testing-and-coverage.yml
index ebc2248..eb8daa1 100644
--- a/.github/workflows/unit-testing-and-coverage.yml
+++ b/.github/workflows/unit-testing-and-coverage.yml
@@ -37,6 +37,8 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python setup.py develop
+ # Common deps
+ pip install colorama
- name: "flake8 Style Checking"
shell: bash
# language=bash
@@ -48,12 +50,13 @@ jobs:
"config.read('tox.ini');"
"print(config['flake8_plugins']['deps']);"
)
- pip install colorama flake8 $(python -c "${grab_f8_plugins[*]}")
+ pip install flake8 $(python -c "${grab_f8_plugins[*]}")
python -m flake8 aiosmtpd setup.py housekeep.py release.py
- name: "Docs Checking"
# language=bash
run: |
- pip install colorama pytest pytest-mock sphinx sphinx-autofixture sphinx_rtd_theme
+ # Prepare sphinx and the deps for sphinx extensions
+ pip install -r aiosmtpd/docs/RTD-requirements.txt
sphinx-build --color -b doctest -d build/.doctree aiosmtpd/docs build/doctest
sphinx-build --color -b html -d build/.doctree aiosmtpd/docs build/html
sphinx-build --color -b man -d build/.doctree aiosmtpd/docs build/man
diff --git a/aiosmtpd/docs/RTD-requirements.txt b/aiosmtpd/docs/RTD-requirements.txt
index cfdaa48..e26dc75 100644
--- a/aiosmtpd/docs/RTD-requirements.txt
+++ b/aiosmtpd/docs/RTD-requirements.txt
@@ -1,11 +1,14 @@
-# Sphinx deps
-sphinx>=2.1
+### Sphinx deps
+pickle5 ; python_version < '3.8'
+# Sync the ver limit below with conf.py
+sphinx>=3.2
sphinx-autofixture
sphinx_rtd_theme
-# Required by Sphinx.autodoc
+
+### Required by Sphinx.autodoc
pytest>=6.0
pytest-mock
-# aiosmtpd deps
+### aiosmtpd deps
atpublic
attrs
diff --git a/aiosmtpd/docs/conf.py b/aiosmtpd/docs/conf.py
index d3273f1..689e4a7 100644
--- a/aiosmtpd/docs/conf.py
+++ b/aiosmtpd/docs/conf.py
@@ -50,6 +50,8 @@ syspath_insert(repo_root / "aiosmtpd")
# :classmethod: needs Sphinx>=2.1
# :noindex: needs Sphinx>=3.2
needs_sphinx = "3.2"
+# If you change the above, don't forget to change the version limit in
+# `RTD-requirements.txt`
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -62,9 +64,8 @@ extensions = [
"autoprogramm",
"sphinx_rtd_theme"
]
-# IMPORTANT: If you edit this, also edit the following:
-# - aiosmtpd/docs/RTD-requirements.txt
-# - tox.ini
+# IMPORTANT: If you edit the above list, check if you need to edit the deps list
+# in `RTD-requirements.txt`
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
diff --git a/tox.ini b/tox.ini
index eb2f4f6..e5ac6a3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -124,17 +124,8 @@ commands =
sphinx-build --color -b html -d build/.doctree aiosmtpd/docs build/html
sphinx-build --color -b man -d build/.doctree aiosmtpd/docs build/man
deps:
- # IMPORTANT: If you edit this, also edit the files:
- # - .github/workflows/unit-testing-and-coverage.yml
- # - aiosmtpd/docs/RTD-requirements.txt
colorama
- sphinx
- sphinx-autofixture
- sphinx_rtd_theme
- pickle5 ; python_version < '3.8'
- # The below used as deps, need to be installed so autofixture work properly
- pytest
- pytest-mock
+ -raiosmtpd/docs/RTD-requirements.txt
[testenv:static]
basepython = python3
--
2.32.0

Binary file not shown.

View File

@ -1,46 +0,0 @@
From e302182240ea59f4cf65c7d4b128be29417f33a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 23 Sep 2021 15:55:02 +0200
Subject: [PATCH] Avoid SSLError: Cannot create a client socket with a
PROTOCOL_TLS_SERVER context
When we build mailman3 in Fedora with Python 3.10.0rc2,
we see the following problem:
Traceback (most recent call last):
File "/builddir/build/BUILD/mailman-3.3.4/src/mailman/testing/layers.py", line 297, in setUp
cls.smtpd.start()
File "/builddir/build/BUILD/mailman-3.3.4/src/mailman/testing/mta.py", line 177, in start
super().start()
File "/usr/lib/python3.10/site-packages/aiosmtpd/controller.py", line 288, in start
self._trigger_server()
File "/usr/lib/python3.10/site-packages/aiosmtpd/controller.py", line 481, in _trigger_server
InetMixin._trigger_server(self)
File "/usr/lib/python3.10/site-packages/aiosmtpd/controller.py", line 428, in _trigger_server
s = stk.enter_context(self.ssl_context.wrap_socket(s))
File "/usr/lib64/python3.10/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib64/python3.10/ssl.py", line 1061, in _create
self._sslobj = self._context._wrap_socket(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)
This makes the problem go away.
Disclaimer: I have no idea what I'm doing here.
---
aiosmtpd/controller.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aiosmtpd/controller.py b/aiosmtpd/controller.py
index 79bdbd04..30fd4a11 100644
--- a/aiosmtpd/controller.py
+++ b/aiosmtpd/controller.py
@@ -424,7 +424,7 @@ def _trigger_server(self):
hostname = self.hostname or self._localhost
with ExitStack() as stk:
s = stk.enter_context(create_connection((hostname, self.port), 1.0))
- if self.ssl_context:
+ if self.ssl_context and self.ssl_context.protocol != ssl.PROTOCOL_TLS_SERVER:
s = stk.enter_context(self.ssl_context.wrap_socket(s))
s.recv(1024)

BIN
aiosmtpd-1.4.4.tar.gz Normal file

Binary file not shown.

View File

@ -1,19 +1,14 @@
%global _empty_manifest_terminate_build 0
Name: python-aiosmtpd
Version: 1.4.2
Version: 1.4.4
Release: 1
Summary: aiosmtpd - asyncio based SMTP server
License: Apache 2.0
URL: https://github.com/aio-libs/aiosmtpd
Source0: https://github.com/aio-libs/aiosmtpd/archive/%{version}.tar.gz
Patch0001: 0001-Implement-Unthreaded-Controller-256.patch
Patch0002: 0002-Code-Hygiene-259.patch
Patch0003: 0003-URGENT-Fix-RTD-docs-gen.patch
Patch0004: 0004-Make-Sphinx-RTD-deps-SSOT.patch
Patch0005: %{url}/pull/284.patch
Source0: https://github.com/aio-libs/aiosmtpd/archive/%{version}.tar.gz#/aiosmtpd-%{version}.tar.gz
BuildArch: noarch
%description
This is a server for SMTP and related protocols, similar in utility to the
standard library's smtpd.py module, but rewritten to be based on asyncio for
@ -21,10 +16,9 @@ Python 3.
%package -n python3-aiosmtpd
Summary: aiosmtpd - asyncio based SMTP server
Provides: python-aiosmtpd
Provides: python-aiosmtpd = %{version}-%{release}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-aiosmtpd
This is a server for SMTP and related protocols, similar in utility to the
standard library's smtpd.py module, but rewritten to be based on asyncio for
@ -33,12 +27,11 @@ Python 3.
%package help
Summary: Development documents and examples for aiosmtpd
Provides: python3-aiosmtpd-doc
%description help
Development documents and examples for aiosmtpd.
%prep
%autosetup -p1 -n aiosmtpd-%{version}
%autosetup -n aiosmtpd-%{version}
%build
%py3_build
@ -78,6 +71,9 @@ mv %{buildroot}/doclist.lst .
%{_pkgdocdir}
%changelog
* Mon Mar 20 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.4-1
- Update package to version 1.4.4
* Tue Jun 07 2022 SimpleUpdate Robot <tc@openeuler.org> - 1.4.2-1
- Upgrade to version 1.4.2