Skip to content

ansible: mail integration tests uses the asyncore module which has been removed in Python 3.11 #4656

Open
@vstinner

Description

@vstinner

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 ansible/ansible#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

$ ansible-galaxy collection list community.general

Configuration

$ ansible-config dump --only-changed

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 python/cpython#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

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue/PR relates to a bughas_prteststests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions