RazerM / ratelimiter

Simple Python module providing rate limiting
Apache License 2.0
120 stars 29 forks source link

needs update for python3.11: module 'asyncio' has no attribute 'coroutine' #18

Open tillea opened 1 year ago

tillea commented 1 year ago

Hi, as reported in the Debian bug tracking system ratelimiter does not work with python3.11:

Python 3.11.1 (main, Dec  7 2022, 08:49:13) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ratelimiter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andreas/debian-maintain/salsa/python-team/packages/python-ratelimiter/ratelimiter.py", line 36, in <module>
    class RateLimiter(object):
  File "/home/andreas/debian-maintain/salsa/python-team/packages/python-ratelimiter/ratelimiter.py", line 127, in RateLimiter    
    __aexit__ = asyncio.coroutine(__exit__)
                ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

Kind regards, Andreas.

venkatamutyala commented 11 months ago

can we get a release?