Skip to content

Commit 12b07c9

Browse files
committed
Add 3.14. Fix test breakage with new repoze.sendmail. Pin to old setuptools because pyramid still requires it..
1 parent 9ff2c77 commit 12b07c9

6 files changed

Lines changed: 28 additions & 24 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- "3.11"
1717
- "3.12"
1818
- "3.13"
19+
- "3.14"
1920
extras:
2021
- "[test,docs]"
2122
# include:
@@ -35,15 +36,15 @@ jobs:
3536
run: |
3637
python -m pip install -U pip setuptools wheel
3738
python -m pip install -U coverage
38-
python -m pip install -v -U -e ".${{ matrix.extras }}"
39+
python -m pip install -v -U ".${{ matrix.extras }}"
3940
- name: Test
4041
run: |
4142
coverage run -m zope.testrunner -v --test-path=src --color --auto-progress --slow-test=3
4243
coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests
4344
coverage combine || true
4445
coverage report -i || true
4546
- name: Lint
46-
if: matrix.python-version == '3.12'
47+
if: matrix.python-version == '3.14'
4748
run: |
4849
python -m pip install -U pylint
4950
pylint src

CHANGES.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Changes
33
=========
44

5-
1.0.1 (unreleased)
5+
1.1.0 (unreleased)
66
==================
77

8-
- Nothing changed yet.
9-
8+
- Add support for Python 3.14.
9+
- Pin our ``setuptools`` runtime dependency at < 82, because our
10+
``pyramide`` dependency still depends on ``pkg_resources`` which was
11+
removed at that version.
1012

1113
1.0.0 (2024-11-12)
1214
==================

docs/conf.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
# sys.path.insert(0, os.path.abspath('.'))
2222
import os
2323
import sys
24-
import pkg_resources
24+
from importlib.metadata import version as meta_version
2525
sys.path.append(os.path.abspath('../src'))
26-
rqmt = pkg_resources.require('nti.mailer')[0]
27-
26+
nt_ver = meta_version('nti.mailer')
2827
# -- General configuration ------------------------------------------------
2928

3029
# If your documentation needs a minimal Sphinx version, state it here.
@@ -75,16 +74,16 @@
7574
# built documents.
7675
#
7776
# The short X.Y version.
78-
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
77+
version = '%s.%s' % tuple(map(int, nt_ver.split('.')[:2]))
7978
# The full version, including alpha/beta/rc tags.
80-
release = rqmt.version
79+
release = nt_ver
8180

8281
# The language for content autogenerated by Sphinx. Refer to documentation
8382
# for a list of supported languages.
8483
#
8584
# This is also used if you do content translation via gettext catalogs.
8685
# Usually you set "language" from the command line for these cases.
87-
language = None
86+
language = "en"
8887

8988
# List of patterns, relative to source directory, that match files and
9089
# directories to ignore when looking for source files.
@@ -216,9 +215,7 @@
216215
'site': ('https://zopesite.readthedocs.io/en/latest/', None,),
217216
'testing': ('https://ntitesting.readthedocs.io/en/latest/', None),
218217
'traversing': ('https://zopetraversing.readthedocs.io/en/latest/', None),
219-
'zodb': ('http://www.zodb.org/en/latest/', None),
220218
'external': ('https://ntiexternalization.readthedocs.io/en/latest/', None),
221-
'acquisition': ('https://acquisition.readthedocs.io/en/latest', None,),
222219
'zcintid': ('https://zcintid.readthedocs.io/en/latest', None),
223220
'zopeintid': ('https://zopeintid.readthedocs.io/en/latest', None,),
224221
'location': ('https://zopelocation.readthedocs.io/en/latest', None,),

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def _read(fname):
5050
'Programming Language :: Python :: 3.11',
5151
'Programming Language :: Python :: 3.12',
5252
'Programming Language :: Python :: 3.13',
53+
'Programming Language :: Python :: 3.14',
5354
'Programming Language :: Python :: Implementation :: CPython',
5455
'Programming Language :: Python :: Implementation :: PyPy',
5556
],
@@ -60,7 +61,9 @@ def _read(fname):
6061
include_package_data=True,
6162
install_requires=[
6263
'gevent',
63-
'setuptools',
64+
# Need older setuptools because pyramid relies on
65+
# pkg_resources, which was removed in 82.
66+
'setuptools < 82',
6467
'boto3',
6568
'BTrees',
6669
'itsdangerous',

src/nti/mailer/tests/test_queue.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
from repoze.sendmail.delivery import QueuedMailDelivery
2727
from repoze.sendmail.maildir import Maildir
2828

29-
# pylint:disable-next=import-private-name
30-
from repoze.sendmail.tests.test_delivery import _makeMailerStub
31-
3229
from nti.mailer.queue import SESMailer
3330
from nti.mailer.queue import MailerWatcher
3431

@@ -37,6 +34,16 @@
3734

3835
MSG_BYTES = MSG_STRING if isinstance(MSG_STRING, bytes) else MSG_STRING.encode('ascii')
3936

37+
def _makeMailerStub(*args, **kw):
38+
class MailerStub:
39+
def __init__(self, *args, **kw):
40+
self.sent_messages = []
41+
42+
def send(self, fromaddr, toaddrs, message):
43+
self.sent_messages.append((fromaddr, toaddrs, message))
44+
45+
return MailerStub(*args, **kw)
46+
4047
class TestMailer(unittest.TestCase):
4148

4249
def setUp(self):

tox.ini

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
[tox]
2-
envlist = pypy,py27,py36,pypy3,py37,py38,py39,coverage,docs
2+
envlist = py310,py311,py312,py313,py314,py315,coverage,docs
33

44
[testenv]
5-
usedevelop = true
65
extras = test
76
commands =
87
zope-testrunner --test-path=src --auto-color --auto-progress [] # substitute with tox positional args
98
setenv =
109
ZOPE_INTERFACE_STRICT_IRO=1
1110

1211
[testenv:coverage]
13-
usedevelop = true
14-
basepython =
15-
python3.9
1612
commands =
1713
coverage run -m zope.testrunner --test-path=src []
1814
coverage html
@@ -21,8 +17,6 @@ deps =
2117
coverage
2218

2319
[testenv:docs]
24-
basepython =
25-
python3.9
2620
commands =
2721
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
2822
extras = docs

0 commit comments

Comments
 (0)