Skip to content

Commit

Permalink
Remove version check at build time; add tests; rename to __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrob committed Feb 28, 2024
1 parent f87b2c1 commit 9b5e373
Show file tree
Hide file tree
Showing 7 changed files with 1,496 additions and 657 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ celerybeat.pid

# Environments
.env
.venv
.venv*
env/
venv/
ENV/
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This package contains the [asyncore](https://docs.python.org/3.11/library/asynco
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](https://github.com/python/cpython/blob/c4d45ee670c09d4f6da709df072ec80cb7dfad22/Lib/asyncore.py)<sup id="a1">[[1]](#f1)</sup>.
The specific version of [`asyncore.py`](https://github.com/simonrob/pyasyncore/blob/master/asyncore/asyncore.py) 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](https://github.com/python/cpython/blob/3.9/Lib/asyncore.py).
The [specific version of asyncore that is provided](https://github.com/simonrob/pyasyncore/blob/master/asyncore/__init__.py) 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](https://github.com/python/cpython/blob/3.9/Lib/asyncore.py) (which was the last time the module was meaningfully updated).

Please note that new projects should prefer [asyncio](https://docs.python.org/3/library/asyncio.html).

Expand Down Expand Up @@ -39,8 +39,16 @@ Note that the [PyPI module](https://pypi.org/project/pyasyncore/) is named `pyas
For guidance about using the `asyncore` module, see the [official documentation](https://docs.python.org/3.11/library/asyncore.html).


## Testing
The [previous standard library tests](https://github.com/python/cpython/blob/3.11/Lib/test/test_asyncore.py) have also been replicated into this module.
Run them using:
```shell
python -m unittest
```


## Maintenance
Due to the fact that this previously built-in module is [no-longer supported](https://peps.python.org/pep-0594/) by the Python core development team, no further maintenance of the code in [`asyncore.py`](https://github.com/simonrob/pyasyncore/blob/master/asyncore/asyncore.py) is intended.
Due to the fact that this previously built-in module is [no-longer supported](https://peps.python.org/pep-0594/) by the Python core development team, no further maintenance of the [asyncore code](https://github.com/simonrob/pyasyncore/blob/master/asyncore/__init__.py) is intended.
This project is only intended to be updated to make changes or improvements to the module packaging.


Expand All @@ -49,4 +57,4 @@ This project is only intended to be updated to make changes or improvements to t


### Footnotes
<sub id="f1">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/asyncore.py)` [](#a1)</sub>
<sub id="f1">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)` [](#a1)</sub>
Loading

0 comments on commit 9b5e373

Please sign in to comment.