giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.66k stars 266 forks source link

asyncore and asynchat may be removed from python 3.11 stdlib #560

Closed danifus closed 3 months ago

danifus commented 2 years ago

There's a discussion on the Python dev mailing list about removing asyncore and asynchat from Python 3.11: https://mail.python.org/archives/list/python-dev@python.org/thread/LZOOLX5EKOITW55TW7JQYKLXJUPCAJB4/#LVFBHVNV3INGKVVRONVRIA3Q6JIYXMZM

pyftpdlib would need to be migrated to asyncio (https://github.com/giampaolo/pyftpdlib/pull/310) or ship with a copy of asyncore and asynchat to continue to work if these modules are removed from the stdlib.

giampaolo commented 2 years ago

Yep. I'd say we can just copy latest version of both modules into pyftpdlib directory (pyftpdlib/_asyncore.py and pyftpdlib/_asynchat.py) and import them if we're on python 3.

danifus commented 2 years ago

Sounds like a good plan :)

akozyreva commented 2 years ago

Hi! Totally agree. I've got already deprecation warnings on Python 3.10.2 :

venv/lib/python3.10/site-packages/pyftpdlib/handlers.py:5
  /home/akozyreva/projects/......./pyftpdlib/handlers.py:5: DeprecationWarning: The asynchat module is deprecated. The recommended replacement is asyncio
    import asynchat
honglei commented 1 year ago

https://docs.python.org/3.12/whatsnew/3.12.html#summary-release-highlights

asynchat and asyncore have been removed according to the schedule in PEP 594, having been deprecated in Python 3.6. Use asyncio instead. (Contributed by Nikita Sobolev in gh-96580.)

giampaolo commented 3 months ago

asyncore and asynchat are now installed as third-party deps from PYPI. Closing.