asyncprawcore follows semantic versioning.
Changed
- Drop support for Python 3.6, which is end-of-life on 2021-12-23.
DeviceIDAuthorizer
can be now used withTrustedAuthenticator
.- 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. Requestor
is now initialized with atimeout
parameter.ScriptAuthorizer
,ReadOnlyAuthorizer
, andDeviceIDAuthorizer
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
URITooLarge
exception. ScriptAuthorizer
has a new parametertwo_factor_callback
that supplies OTPs (One-Time Passcodes) when.ScriptAuthorizer.refresh
is called.- Add a
TooManyRequests
exception.
Fixed
- Fix
RuntimeWarning
when executing pre/post refresh token callbacks.
Added
Authorizer
optionally takes apre_refresh_callback
keyword argument. If provided, the function will called with the instance ofAuthorizer
prior to refreshing the access and refresh tokens.Authorizer
optionally takes apost_refresh_callback
keyword argument. If provided, the function will called with the instance ofAuthorizer
after refreshing the access and refresh tokens.
Changed
- The
refresh_token
argument toAuthorizer
must now be passed by keyword, and cannot be passed as a positional argument.
Changed
- Improved preprocessing for
data
andparams
inSession.request()
.
Added
.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
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