4 ms·
> smtpd has been removed according to the schedule in PEP 594 Damn! I guess it's time to cross out my snippet of running a debug smtp server in almost any Linu
by est 4y ago
> smtpd has been removed according to the schedule in PEP 594
Damn! I guess it's time to cross out my snippet of running a debug smtp server in almost any Linux distro & Mac:
python -m smtpd -n -c DebuggingServer localhost:25
> Remove the distutils package. It was deprecated in Python 3.10 by PEP 632
So apparently we need to replace
from distutils.version import StrictVersion
with
from pkg_resources import parse_version
A bit labor for my code but OK.
- masklinn 4y agoDarn the smtpd thing is going to be annoying next time I try to debug a mail sender. It was super convenient. Shame they didn’t leave just that.
- Luyt 4y agoI use that one too. An alternative might be https://aiosmtpd.readthedocs.io/en/latest/cli.html https://aiosmtpd.readthedocs.io/en/latest/cli.html
- remram 4y agopackaging.version.parse() might be the canonical replacement?