diff --git a/requests_ratelimiter/requests_ratelimiter.py b/requests_ratelimiter/requests_ratelimiter.py index 6dfbacc..1086c1d 100644 --- a/requests_ratelimiter/requests_ratelimiter.py +++ b/requests_ratelimiter/requests_ratelimiter.py @@ -168,14 +168,14 @@ class LimiterSession(LimiterMixin, Session): per_host: Track request rate limits separately for each host limit_statuses: Alternative HTTP status codes that indicate a rate limit was exceeded """ - + __attrs__ = Session.__attrs__ + [ 'limiter', 'limit_statuses', 'max_delay', 'per_host', 'bucket_name', - '_default_bucket' + '_default_bucket', ] diff --git a/test/test_requests_ratelimiter.py b/test/test_requests_ratelimiter.py index b0050e7..3c9f84e 100644 --- a/test/test_requests_ratelimiter.py +++ b/test/test_requests_ratelimiter.py @@ -264,7 +264,7 @@ def test_pickling_and_unpickling(): assert pickled_session is not None unpickled_session = pickle.loads(pickled_session) assert unpickled_session is not None - + # Check that the unpickled instance has the same attributes assert unpickled_session.per_host == session.per_host assert unpickled_session.max_delay == session.max_delay