Make asynchat available for Python 3.12 onwards
Project description
Purpose
This package contains the asynchat module as found in Python versions prior to 3.12.
It is provided so that existing code relying on import asynchat
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 asynchat that is provided is the last update before the addition of deprecation/removal warnings at import time, and is identical 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 asynchat
is intended for Python 3.12 or later. Install the module using pip
:
python -m pip install pyasynchat
The module can be installed for earlier Python versions, but it will have no effect, and the standard library version of asynchat
will be used in its place.
Note that installing pyasynchat
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 asynchat
Usage
The module is imported in exactly the same way as the standard library component it replaces:
import asynchat
Note that the PyPI module is named pyasynchat
because creating modules with the same name as those provided by the standard library is not permitted.
For guidance about using the asynchat
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 asynchat 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/3.9/Lib/asynchat.py) <(curl --location https://github.com/simonrob/pyasynchat/raw/master/asynchat/__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 pyasynchat-1.0.4.tar.gz
.
File metadata
- Download URL: pyasynchat-1.0.4.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f5333df649e46c56d48c57e6a4b7163fd07f626bfd884e22ef373ab3c3a4670 |
|
MD5 | 9fa7e3822f689b1236ca59c5f1b71415 |
|
BLAKE2b-256 | 8afdaacc6309abcc5a388c66915829cd8175daccac583828fde40a1eea5768e4 |
File details
Details for the file pyasynchat-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pyasynchat-1.0.4-py3-none-any.whl
- Upload date:
- Size: 7.8 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 | 167feb25d635a01b61338e17e9ab1e3372cd9274005af4083dcda52d51f64a76 |
|
MD5 | c675b53ed00533d12778f47fd9f6a280 |
|
BLAKE2b-256 | c24fb4a7aa2a35858d40f970bdb63ab3e9deda35d0d2116b9175f929f37d764d |