aiosmtpd
aiosmtpd copied to clipboard
Fixes for Python 3.10
What do these changes do?
Allow the test suite to pass on Python 3.10.
Due to limited knowledge of the code and to avoid breaking anything, I have xfailed test_warn_authreqnotls
instead of addressing the underlying cause of its failure (asyncio.get_event_loop raising DeprecationWarning: There is no current event loop
).
Are there changes in behavior for the user?
No user-visible changes made.
Related issue number
Fixes #277.
Checklist
- [X] I think the code is well written
- [X] Unit tests for the changes exist
- [ ] tox testenvs have been executed in the following environments:
- [ ] Linux (Ubuntu 18.04, Ubuntu 20.04, Arch):
{py36,py37,py38,py39}-{nocov,cov,diffcov}, qa, docs
- [ ] Windows (7, 10):
{py36,py37,py38,py39}-{nocov,cov,diffcov}
- [ ] WSL 1.0 (Ubuntu 18.04):
{py36,py37,py38,py39}-{nocov,cov,diffcov}, pypy3-{nocov,cov}, qa, docs
- [ ] FreeBSD (12.2, 12.1, 11.4):
{py36,pypy3}-{nocov,cov,diffcov}, qa
- [ ] Cygwin:
py36-{nocov,cov,diffcov}, qa, docs
- [ ] Linux (Ubuntu 18.04, Ubuntu 20.04, Arch):
- [ ] Documentation reflects the changes
- [ ] Add a news fragment into the
NEWS.rst
file
This pull request introduces 2 alerts when merging 37ff296815895b8ab27520f2f8f493b3ae923aad into 215b854447e2567bbc5e3665d9a648d7b1fa2c82 - view on LGTM.com
new alerts:
- 2 for Use of insecure SSL/TLS version
I was recently running some Python 3.10 code with asyncio and saw that failure message. I might take some time and investigate a fix for that.
For anyone else skimming this, I was initially sceptical when I saw several context.verify_mode = ssl.CERT_NONE
, but those are in:
- Test-connections to ourself, after spinning up a server, to fully initialize it.
- Tests.
This pull request introduces 2 alerts when merging e3321f474c0d8f63a17186a6e727f490d943f624 into 215b854447e2567bbc5e3665d9a648d7b1fa2c82 - view on LGTM.com
new alerts:
- 2 for Use of insecure SSL/TLS version
I see that #303 addresses a part of the problem, and its solution seems to be simpler.
#303 was rejected. Is this one here a better approach?
I don't think so. It's basically the same (wrong?) solution, just done in a more verbose way.