From a4fb46a35a94ab80bc17be48c10d701e112998e8 Mon Sep 17 00:00:00 2001 From: "classroomtechtools.ctt@gmail.com" Date: Sat, 31 Dec 2022 15:28:01 +0800 Subject: [PATCH 1/2] fix for python 3.11 --- ratelimiter/_async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ratelimiter/_async.py b/ratelimiter/_async.py index feb80ad..e8ad367 100644 --- a/ratelimiter/_async.py +++ b/ratelimiter/_async.py @@ -32,4 +32,5 @@ async def __aenter__(self): await asyncio.sleep(sleeptime) return self - __aexit__ = asyncio.coroutine(RateLimiter.__exit__) + # backward behavior for python 3.5 - 3.10; no need for decorator if deprecated in python > 3.11 + __aexit__ = asyncio.coroutine(RateLimiter.__exit__) if hasattr(asyncio, 'coroutine') else RateLimiter.__exit__ From 4201b21eb4756ac73add3802896b97833541cc15 Mon Sep 17 00:00:00 2001 From: Adam Morris Date: Sun, 7 Dec 2025 14:10:59 +0800 Subject: [PATCH 2/2] added pyproject --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..92a8191 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.poetry] +name = "ratelimiter" +version = "1.2.0" +description = "A rate-limiting library" +authors = ["Frazer McLean "]