Skip to content

Releases: felix-hilden/tekore

3.2.0 - Quality of life improvements

16 Oct 20:15
Compare
Choose a tag to compare

Added

  • Support Python 3.9 (#219)
  • Dependency to HTTPX upgraded to include versions 0.15.* and 0.16.* (#216)
  • Error messages for parse_code_from_url, parse_state_from_url and Credentials.pkce_user_authorisation were improved (#218)
  • Spotify and senders, both synchronous and asynchronous, can now be closed directly with close (#220)

3.1.0 - Small improvements

13 Sep 09:35
Compare
Choose a tag to compare

Added

  • StrEnum - model enumerations now inherit from str, making e.g. using it as a key for sorting possible (#214)

Fixed

  • PrivateUser - a birthday attribute was added. It is not obtainable with new tokens but is returned for old tokens that have the now-invalid user-read-birthday scope (#52, #197)

3.0.1 - Bugfix

05 Sep 17:30
Compare
Choose a tag to compare

Fixed

  • featured_playlists - allow missing owner in Playlist models (#212)

3.0.0 - The next level

03 Sep 16:06
Compare
Choose a tag to compare

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)

2.1.3 - Bugfixes

04 Aug 15:08
Compare
Choose a tag to compare

Fixed

  • Client - correctly return ModelList when chunking input (#196)
  • Authorisation - fix error handling when response does not contain an error description (#199)
  • playback and playback_currently_playing - correctly handle local tracks (#200)

2.1.2 - Bugfix

21 Jul 07:44
Compare
Choose a tag to compare

Fixed

  • FullShow - add undocumented total_episodes parameter, mark total_episodes of SimpleShow undocumented (#194)

2.1.1 - Bugfix

02 Jul 19:40
Compare
Choose a tag to compare

Fixed

SimpleShow - add optional total_episodes parameter (#190)

2.1.0 - Small improvements

31 May 18:09
Compare
Choose a tag to compare

Added

  • Client - required and optional scopes can now be determined in code for any endpoint of the client (#180)
  • Dependency to HTTPX upgraded to include version 0.13.* (#186)

Fixed

  • Errors - correctly fall back to ClientError and ServerError when encountering an unknown status code (#185)

2.0.0 - The future is here

27 May 15:35
Compare
Choose a tag to compare

This release significantly improves the overall structure of the library and provides quality of life enhancements to various tasks. Most notably, submodules were removed in favor of a flat structure. Everything is now imported from the top level with the exception of models.

Removed

  • Importing from submodules (#81)
  • OAuthError in auth - see below for details (#154)

Deprecated

  • Playlist API - methods specifically for playlist tracks and episodes_as_tracks argument of Spotify.playlist (#178)

Added

  • Authentication - a list of scopes and strings is accepted in scope arguments (#81)
  • Scope operations were expanded to properly handle all combinations of str, scope and Scope (#177)
  • Playlist API - new methods to fully support episodes in playlists. The new endpoints are direct counterparts to playlist_tracks_* methods. (#178)

Changed

Import structure

Submodules were removed in favor of a flat structure. In addition to simply relocating objects, some changes were made as well. (#81)

  • Options for senders and configuration are now set at the top level
  • AuthorisationScopes was renamed toscope, and its alias scopes is no longer available
  • Ready-made scopes read, write and every are now accessed via the scope enumeration

Response models

These changes aim to make models consistent and serialisation clear. (#149)

  • The JSON encoder used internally was made private
  • Hierarchies and names of model base classes and member types changed
  • Instead of using str, models are now converted to JSON using their json method
  • As a result of the change above, the repr of models can be viewed simply with print. The repr of model lists was significantly improved. Viewing attributes of models produces consistent results.
  • The asbuiltin method replaces asdict for models and was also added for lists of models. Enumerations and timestamps are no longer preserved in the conversion.
  • pprint output is now compact by default

Playlist items

Boolean attributes of FullTrack and FullEpisode on a playlist were previously also available elsewhere, but had None values. They were removed. The booleans are still available in playlist-related calls with the new FullPlaylistTrack and FullPlaylistEpisode. LocalPlaylistTrack now also provides these booleans. (#170)

Miscellaneous

  • Exceptions thrown in authentication now match client. Because of that, OAuthError was removed. Errors now inherit from a common base class. (#154)
  • Token.scope and RefreshingToken.scope now return a Scope instead of a string. (#177)
  • Default sender changed from TransientSender to PersistentSender, also affects Client behavior (#141)

Fixed

  • Properly close sessions in PersistentSender (#179)
  • Members of AlbumGroup are now strings as intended, rather than one-element tuples (#181)
  • Include readme to source distributions to fix setup (#182)

API improvements

27 Apr 21:51
Compare
Choose a tag to compare

This is the first release to feature a streamlined import structure (only top level imports). All old-style imports (from submodules) are still available, a few still needed, but they will be removed in the next major release of Tekore, version 2.0.

Added

  • Most imports can be done directly at the top level (#174)

Deprecated

  • Importing from submodules, removed in Tekore 2.0 (#81)

Fixed

  • recommendations documentation changed to reflect that only IDs are accepted as seeds, not URIs or URLs (#173)
  • track_audio_analysis allow for missing attributes in analysis (#175)