aiosmtpd icon indicating copy to clipboard operation
aiosmtpd copied to clipboard

Fixes for Python 3.10

Open foutrelis opened this issue 2 years ago • 7 comments

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
  • [ ] Documentation reflects the changes
  • [ ] Add a news fragment into the NEWS.rst file

foutrelis avatar Dec 05 '21 22:12 foutrelis

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

lgtm-com[bot] avatar Dec 05 '21 22:12 lgtm-com[bot]

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.

waynew avatar Feb 13 '22 22:02 waynew

For anyone else skimming this, I was initially sceptical when I saw several context.verify_mode = ssl.CERT_NONE, but those are in:

  1. Test-connections to ourself, after spinning up a server, to fully initialize it.
  2. Tests.

stefanor avatar Mar 25 '22 18:03 stefanor

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

lgtm-com[bot] avatar Mar 25 '22 19:03 lgtm-com[bot]

I see that #303 addresses a part of the problem, and its solution seems to be simpler.

mgorny avatar May 06 '22 07:05 mgorny

#303 was rejected. Is this one here a better approach?

bnavigator avatar Jul 03 '22 21:07 bnavigator

I don't think so. It's basically the same (wrong?) solution, just done in a more verbose way.

mgorny avatar Jul 04 '22 03:07 mgorny