Skip to content
  • kiilerix's avatar
    tests: use simple mock smtp server instead of deprecated asyncore smtpd · b3a5af04da35
    kiilerix authored
    test-patchbomb-tls.t would fail with:
      .../hg/tests/dummysmtpd.py:6: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
        import asyncore
      .../hg/tests/dummysmtpd.py:8: DeprecationWarning: The smtpd module is deprecated and unmaintained and will be removed in Python 3.12.  Please see aiosmtpd (https://aiosmtpd.readthedocs.io/) for the recommended replacement.
        import smtpd
    
    The recommended migration path to the standalone asiosmtpd would be overkill.
    
    The tests do not need a full smtp server - we can just use a very simple mock
    hack to preserve the existing test coverage.
    b3a5af04da35