Make asyncore available for Python 3.12 onwards
Low maintenance activity. Last release 11 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pyasyncorePurpose
This package contains the asyncore module as found in Python versions prior to 3.12.
It is provided so that existing code relying on import asyncore is able to continue being used without significant refactoring.
The module's source code is taken directly from the Python standard library[1]. The specific version of asyncore that is provided is the last update before the addition of deprecation/removal warnings at import time, and is essentially equivalent to the version bundled with Python 3.9 (which was the last time the module was meaningfully updated).
Please note that new projects should prefer asyncio.
Installation
This version of asyncore is intended for Python 3.12 or later. Install the module using pip:
python -m pip install pyasyncore
The module can be installed for earlier Python versions, but it will have no effect, and the standard library version of asyncore will be used in its place.
Note that installing pyasyncore will not remove deprecation warnings in Python versions 3.10 and 3.11.
Instead, use the warnings package:
import warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
import asyncore
Usage
The module is imported in exactly the same way as the standard library component it replaces:
import asyncore
Note that the PyPI module is named pyasyncore because creating modules with the same name as those provided by the standard library is not permitted.
For guidance about using the asyncore module, see the .