Make asyncore available for Python 3.12 onwards
Project description
Purpose
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 official documentation.
Testing
The previous standard library tests have also been replicated into this module. Run them using:
python -m unittest
Maintenance
Due to the fact that this previously built-in module is no-longer supported by the Python core development team, no further maintenance of the asyncore code is intended. This project is only intended to be updated to make changes or improvements to the module packaging.
License
Python Software Foundation License Version 2
Footnotes
1. Verify this if needed via: diff <(curl --location https://github.com/python/cpython/raw/c4d45ee670c09d4f6da709df072ec80cb7dfad22/Lib/asyncore.py) <(curl --location https://github.com/simonrob/pyasyncore/raw/master/asyncore/__init__.py)
⏎
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyasyncore-1.0.4.tar.gz
.
File metadata
- Download URL: pyasyncore-1.0.4.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c7a8b9b750ba6260f1e5a061456d61320a80579c6a43d42183417da89c7d5d6 |
|
MD5 | f97e2b69f1fa11470867b395c2fabf84 |
|
BLAKE2b-256 | 256e956e2bc9b47e3310cd524036f506b779a77788c2a1eb732e544240ad346f |
File details
Details for the file pyasyncore-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pyasyncore-1.0.4-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5f6dc9dc057c56370b7a5cdb4c4670fd4b0556de2913ed1f428cd6a5366895 |
|
MD5 | c7d5e77766f488a4e8f8e823cf89aaa3 |
|
BLAKE2b-256 | 3846aaa0999302d7a584a033ec23b6ca21a452cf9c7f6d8dce8d174ac407eb3f |