The next major iteration of Tekore brings fewer breaking changes than in 2.0, but packs a number of improvements to authorisation and senders. Most notably, PKCE is now provided as an option for user authorisation and Requests is no longer used to perform web requests. HTTPX, which was already in use with async, is used exclusively instead.
Added
- Authorisation - PKCE can be used in user authorisation, providing added security for public clients by removing the need to use a client secret (189)
- `UserAuth` - implement user authorisation with security checks, the caller simply provides the resulting URI after redirection (207)
- Senders - Tekore's own `Request` and `Response` wrappers are now used in the sender interface (139)
- Classes now have a readable `repr` (191)
- Dependency to HTTPX upgraded to include version `0.14.*` (202)
- `gen_state` - generate state for user authorisation (207)
- `parse_state_from_url` - parse state from URL parameters (207)
Removed
- Client - methods for playlist tracks and `episodes_as_tracks` argument of `Spotify.playlist` deprecated in 2.0 (178, 202)
- Dependency to Requests dropped in favor of HTTPX (139)
- Senders - `TransientSender` and `SingletonSender` along with their asynchronous variants were removed (139)
- Senders - default sender and keyword argument options were removed (139)
Changed
- Errors - web exceptions now inherit from `Exception` rather than the underlying HTTP library's top-level exception. They always contain the relevant `Request` and `Response` (139)
- Senders - as the only concrete senders, `PersistentSender` and `AsyncPersistentSender` are now implemented in `SyncSender` and `AsyncSender`, respectively (139)
- `CachingSender` - argument order is now in line with `RetryingSender` (139)
- Senders - clients (`Spotify` and `Credentials`) now inherit from `ExtendingSender` (139)
- Authorisation - raise a more descriptive error if secret is required but not provided (210)
Fixed
- Client - fix chunking errors that occurred when passing certain parameters as positional arguments (205)