RazerM / ratelimiter

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

fix for python 3.11 #19

Open brainysmurf opened 1 year ago

brainysmurf commented 1 year ago

backward behavior for python 3.5 - 3.10; no need for decorator if deprecated in python >= 3.11

jayaddison commented 1 year ago

Please note: this library may not be actively maintained (see #17).

The changes in #11 offer a similar solution that should (I think?) also be Python 3.11 compatible. A tradeoff is that #11 avoids conditional assignment to __aexit__ (nice), but drops compatibility with some older Python versions as a side-effect (less nice).