asyncprawcore follows semantic versioning.
Changed
- Drop support for Python 3.6, which is end-of-life on 2021-12-23.
- :class:`DeviceIDAuthorizer` can be now used with :class:`TrustedAuthenticator`.
- Updated rate limit algorithm to better handle Reddit's new rate limits.
- Drop support for Python 3.7, which is end-of-life on 2023-06-27.
Added
- 301 redirects result in a
Redirect
exception. - :class:`Requestor` is now initialized with a
timeout
parameter. - :class:`ScriptAuthorizer`, :class:`ReadOnlyAuthorizer`, and
:class:`DeviceIDAuthorizer` have a new parameter,
scopes
, which determines the scope of access requests. - Retry 408 "Request Timeout" HTTP responses.
Changed
- Cast non-string objects to string when preprocessing
data
andparams
.
Added
- Support 202 "Accepted" HTTP responses.
Fixed
- The expected HTTP response status code for a request made with the proper credentials to api/v1/revoke_token has been changed from 204 to 200.
Added
- Add a :class:`URITooLarge` exception.
- :class:`ScriptAuthorizer` has a new parameter
two_factor_callback
that supplies OTPs (One-Time Passcodes) when :meth:`.ScriptAuthorizer.refresh` is called. - Add a :class:`TooManyRequests` exception.
Fixed
- Fix
RuntimeWarning
when executing pre/post refresh token callbacks.
Added
- :class:`Authorizer` optionally takes a
pre_refresh_callback
keyword argument. If provided, the function will called with the instance of :class:`Authorizer` prior to refreshing the access and refresh tokens. - :class:`Authorizer` optionally takes a
post_refresh_callback
keyword argument. If provided, the function will called with the instance of :class:`Authorizer` after refreshing the access and refresh tokens.
Changed
- The
refresh_token
argument to :class:`Authorizer` must now be passed by keyword, and cannot be passed as a positional argument.
Changed
- Improved preprocessing for
data
andparams
inSession.request()
.
Added
- :meth:`.Requestor.request` can be given a timeout parameter to control the amount of time to wait for a request to succeed.
Changed
- Added preprocessing for
data
andparams
inasyncprawcore.Session.request()
for compatibility withaiohttp
.
Fixed
:class:`RateLimiter` will not sleep longer than next_request_timestamp
.
Fixed
- Keys with a
None
value in thedata
orparams
parameters forasyncprawcore.Session.request()
are now dropped asaiohttp.ClientSession.request()
does not acceptNone
values indata
andparams
. - Keys with a boolean value in the
params
parameter forasyncprawcore.Session.request()
are now casted to a string asaiohttp.ClientSession.request()
does not accept boolean values inparams
.
Fixed
- How files are handled.
data
is now able to be passed withfiles
since asyncpraw can make requests with both parameters. - Fixed
SpecialException
not able to getresponse.json()
since it is a coroutine.
Fixed
- Documentation errors.
authorize_url
will correctly return astr
instead ofyarl.URL()
.
- Converted from
requests
toaiohttp
for asynchronous operation. - Updated upto version 1.4.0 of prawcore.
- Forked from praw-dev/prawcore