-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michele Simionato
committed
Feb 22, 2025
1 parent
eac33cb
commit 2e1d155
Showing
7 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include README.rst LICENSE.txt CHANGES.md performance.sh documentation.pdf | ||
recursive-include src/tests *.py | ||
include src/decorator.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
md: src/tests/documentation.py | ||
python $(S)/ms/tools/py2md.py src/tests/documentation.py docs | ||
md: tests/documentation.py | ||
python $(S)/ms/tools/py2md.py tests/documentation.py docs | ||
|
||
upload: README.rst | ||
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload dist/* | ||
rm -rf build/* dist/* && python setup.py sdist bdist_wheel && twine upload -r testpypi dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
|Author | Michele Simionato| | ||
|---|---| | ||
|E-mail | [email protected]| | ||
|Version| 5.1.1 (2022-01-07)| | ||
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13| | ||
|Download page| https://pypi.org/project/decorator/5.1.1| | ||
|Version| 5.2.0 (2025-02-22)| | ||
|Supports| Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12| | ||
|Download page| https://pypi.org/project/decorator/5.2.0| | ||
|Installation| ``pip install decorator``| | ||
|License | BSD license| | ||
|
||
|
@@ -1042,7 +1042,7 @@ write code like the following: | |
```python | ||
import time | ||
import logging | ||
from asyncio import get_event_loop, sleep, wait | ||
from asyncio import run, sleep, wait | ||
from decorator import decorator | ||
|
||
@decorator | ||
|
@@ -1061,7 +1061,7 @@ async def make_task(n): | |
if __name__ == '__main__': | ||
logging.basicConfig(level=logging.INFO) | ||
tasks = [make_task(3), make_task(2), make_task(1)] | ||
get_event_loop().run_until_complete(wait(tasks)) | ||
run(wait(tasks)) | ||
``` | ||
|
||
and you will get an output like this: | ||
|
@@ -1090,7 +1090,7 @@ into regular functions, such as the following: | |
@decorator | ||
def coro_to_func(coro, *args, **kw): | ||
"Convert a coroutine into a function" | ||
return get_event_loop().run_until_complete(coro(*args, **kw)) | ||
return run(coro(*args, **kw)) | ||
``` | ||
|
||
Notice the difference: the caller in ``log_start_stop`` was a coroutine | ||
|
@@ -1663,7 +1663,7 @@ penalty in your specific use case is to measure it. | |
|
||
## LICENSE (2-clause BSD) | ||
|
||
Copyright (c) 2005-2020, Michele Simionato | ||
Copyright (c) 2005-2025, Michele Simionato | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
|
@@ -1692,4 +1692,4 @@ DAMAGE. | |
|
||
If you use this software and you are happy with it, consider sending me a | ||
note, just to gratify my ego. On the other hand, if you use this software and | ||
you are unhappy with it, send me a patch! | ||
you are unhappy with it, send me a patch! |
File renamed without changes.
File renamed without changes.
File renamed without changes.