Open vstinner opened 2 years ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
!component =tests/integration/targets/mail/files/smtpserver.py
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Thanks for this report! Instead of vendoring that module, I think we should better adjust the test.
The same test also depends on the smtpd module, which will be removed from Python 3.12.
I was about to suggest the following route:
Right now I'm more thinking of installing and configuring something like postfix instead? That's probably more work, but seems less painful to maintain.
No activity for 2 years, I close the issue.
It's not resolved, so it should be kept open until someone wants to work on this.
Summary
The ansible_collections/community/general/tests/integration/targets/mail/files/smtpserver.py uses import asyncore whereas this module has been removed in Python 3.11, after being deprecated since Python 3.6.
One option is to copy Python 3.10 asyncore.py file in ansible test suite. Another is that someone should maintain an asyncore module on PyPI.
First, I reported the issue at https://github.com/ansible/ansible/issues/76452 but I got rejected there.
Issue Type
Bug Report
Component Name
tests
Ansible Version
ansible-5.0.0 source code from PyPI.
Community.general Version
Configuration
OS / Environment
Any operating system.
Steps to Reproduce
Run the ansible integration test suite on Python 3.11: it emits a deprecation warning. The module will be removed from Python 3.12: see https://github.com/python/cpython/issues/72719
Expected Results
ansible-5.0.0/ansible_collections/community/general/tests/integration/targets/mail/files/smtpserver.py must not fail.
Actual Results
I didn't try to run the Ansible test suite. I only noticed that "import asyncore" is used.
Code of Conduct