Skip to content

Latest commit

 

History

History
681 lines (594 loc) · 22.6 KB

release_notes.rst

File metadata and controls

681 lines (594 loc) · 22.6 KB

Release notes

Unreleased

Fixed

  • Make available_markets of Show <model.Show>, LocalAlbum <model.LocalAlbum> and LocalTrack <model.LocalTrack> optional (323)

5.4.0 (2024-02-27)

Fixed

  • Add ep as a valid enum to AlbumType <model.AlbumType> for top tracks API responses (318)
  • Add undocumented smart_shuffle to CurrentlyPlayingContext <model.CurrentlyPlayingContext> (320)

Added

  • Support HTTPX 0.27 (317)

5.3.1 (2024-01-28)

Fixed

  • reference: remove methods playlist_remove_indices and playlist_remove_occurrences, which were removed from the API (315)

5.3.0 (2023-12-22)

Fixed

  • Make images optional in Playlist <model.Playlist> to fix getting empty playlists without an image (309)
  • Add undocumented dict to types of publisher in Show <model.Show> (310)
  • Make is_playable in Episode <model.Episode> optional despite API specifications (310)
  • Make deprecated language optional in Episode <model.Episode> pending removal (310)
  • Add undocumented dict to types of duration_ms in LocalTrack <model.LocalTrack> (310)
  • Add undocumented available_markets to FullPlaylistEpisode <model.FullPlaylistEpisode> (310)

Added

  • Add restrictions to FullEpisode <model.FullEpisode> (310)
  • Support HTTPX 0.26 (311)
  • Improve UnknownModelAttributeWarning to include model name (313)

5.2.1 (2023-11-22)

Fixed

  • Exclude Pydantic versions 2.5.0 and 2.5.1 (306)
  • Add missing available_markets to FullChapter <model.FullChapter> (308)

5.2.0 (2023-11-05)

Fixed

  • Add undocumented is_externally_hosted attribute to Audiobook <model.Audiobook> (302)
  • Make audio_preview_url of Episode <model.Device> optional (305)

Added

  • Add support for short URLs as is_short_link and follow_short_link <Spotify.follow_short_link> (301)

5.1.1 (2023-10-14)

Fixed

  • Make Album <model.Album> optional (300)

5.1.0 (2023-10-04)

Added

  • Support HTTPX 0.25 (294)

Fixed

  • Remove misleading documentation on models (295)
  • Add missing supports_volume to Device <model.Device> (296)
  • Exclude Pydantic version 2.4.0 (297)

5.0.1 (2023-07-06)

Fixed

  • Add missing Optional annotations to support Pydantic 2 (293)

5.0.0 (2023-06-18)

Tekore 5 comes with an overhauled response model system based on Pydantic. Although the underlying change is major, the primary usage of models remains unchanged. The new models are more robust and easier to maintain. However, with more careful data validation new issues may arise. Please submit them on GitHub.

Changed

  • Remove support for Python 3.7 (EOL) (292)
  • Use Pydantic in response models (279)
    • Many type hints are fixed and improved.
    • Instead of retaining unknown response attributes, they are now discarded. However, the same warning message is raised.
    • .json and .asbuiltin methods are replaced by Pydantic models' .json and .dict.
    • Models use the builtin datetime object directly.
    • .pprint and custom __repr__ are removed in favor of using Pydantic's own machinery.
    • The builtin list class is used everywhere instead of the old ModelList.

4.6.1 (2023-05-25)

Fixed

  • FullAlbum <model.FullAlbum> - remove "album_group" attribute introduced in version 4.6.0 (291)

4.6.0 (2023-04-12)

Added

  • Make enumerations case insensitive (285)
  • Support HTTPX 0.24 (289)

Fixed

  • FullChapter <model.FullChapter> / SimpleChapter <model.SimpleChapter> - change "restriction" to "restrictions" (286)
  • FullAlbum <model.FullAlbum> - add undocumented "album_group" attribute (287)

4.5.0 (2022-11-06)

Added

  • errors - carry scope information with Unauthorised (276)
  • client - add new audiobook (client-audiobook) and chapter client-chapter endpoints and "audiobook" as a valid search type. Note that audiobooks are currently only available in the US market. The APIs also seem to be unreliable. (277)
  • client - add new get queue endpoint playback_queue <Spotify.playback_queue>. Queue results seem inconsistent at this time. (278)

Fixed

  • models - add missing "minute" resolution to ReleaseDatePrecision <model.ReleaseDatePrecision> (277)
  • models - parse response models safely everywhere (280)
  • client - fix chunking of empty inputs (281)

4.4.1 (2022-10-08)

Fixed

  • Handle changed response to fix paging at search limit (275)

4.4.0 (2022-05-24)

Added

  • Dependency to HTTPX upgraded to include version 0.23.* (272)
  • Declare support for Python 3.10 (273)

4.3.0 (2022-03-11)

Added

  • Dependency to HTTPX upgraded to include version 0.22.* (267)
  • Expose the underlying credentials manager in RefreshingCredentials and RefreshingToken to facilitate closing their HTTP client, which is no longer closed by default as of HTTPX version 0.22 (267)

Fixed

  • Add missing context "collection" to ContextType <model.ContextType> for playing saved tracks (270)

4.2.0 (2022-01-19)

Added

  • conversions - add user as a valid ID type and URL-encode hashes of user IDs in to_url (266)

Fixed

  • URL-encode hashes in user IDs in user <Spotify.user> (266)

4.1.0 (2021-11-20)

  • Dependency to HTTPX upgraded to include versions 0.20.0-0.21.* (263, 265)

4.0.0 (2021-09-09)

Tekore 4.0 is a maintenance release to prepare for the nearly deprecated Python 3.6, update dependencies and improve backwards compatibility.

Changed

  • Removed Python 3.6 support and its conditional dependencies (252)
  • Dependency to HTTPX upgraded to include versions from 0.15 to 0.19.* (250, 261)
  • Add fields to Request and change their meaning to be in line with the new HTTPX interface (250)

Added

  • Improved documentation for type hints and response models (109)
  • Responses can now parse unknown attributes, greatly improving backwards compatibility. UnknownModelAttributeWarning <tekore.model.UnknownModelAttributeWarning> was introduced (247)

3.7.1 (2021-05-04)

Fixed

  • models - add missing but undocumented html_description field to FullShow <model.FullShow> and SimpleShow <model.SimpleShow> (251)
  • models - require the newly documented html_description field in FullEpisode <model.FullEpisode> and SimpleEpisode <model.SimpleEpisode> (251)

3.7.0 (2021-04-08)

Added

  • client - add the new market API (249)
  • client - add episode endpoints to library API, and the corresponding SavedEpisode <model.SavedEpisode> and SavedEpisodePaging <model.SavedEpisodePaging> models (249)

3.6.2 (2021-03-23)

Fixed

  • models - add missing but undocumented html_description field to FullEpisode <model.FullEpisode> and SimpleEpisode <model.SimpleEpisode> (246)

3.6.1 (2021-03-07)

Fixed

  • auth - allow missing scope in token responses and parse it to an empty Scope (245)

3.6.0 (2021-03-02)

Added

  • client - make context managers async safe on Python 3.7+, adds a dependency to the contextvars backport for Python 3.6 (242)
  • Dependency to HTTPX upgraded to include version 0.17.* (243)

3.5.1 (2021-02-12)

Fixed

  • client - document decreased limit of search <Spotify.search> total (241)

3.5.0 (2021-01-15)

Added

  • auth - add streaming <scope.streaming> and app-remote-control <scope.app_remote_control> as extra scopes (237)

Fixed

  • client - fix type hints for context managers (239)

3.4.2 (2020-12-14)

Fixed

  • models - fix model repr for optional lists (233)

3.4.1 (2020-12-04)

Fixed

  • client - document the need for at least one seed in recommendations <Spotify.recommendations> (229)
  • client - match new behavior of track markets (231)

3.4.0 (2020-11-24)

Added

  • conversions - ignore URL parameters in from_url (226)
  • conversions - from_uri, from_url raise proper errors with entirely invalid formats, error messages were improved (227)

Fixed

  • client - document new behavior of track markets (228)

3.3.0 (2020-10-22)

Added

  • config - warning messages for missing configuration now include the variable name which was missing (222)
  • models - improved type hints and documentation of potentially missing values (221)

Fixed

  • client - document new behavior of track markets (217)

3.2.0 (2020-10-16)

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 <Spotify.close> (220)

3.1.0 (2020-09-13)

Added

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

Fixed

  • PrivateUser <model.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 (2020-09-05)

Fixed

  • featured_playlists <Spotify.featured_playlists> - allow missing owner in Playlist <model.Playlist> models (212)

3.0.0 (2020-09-03)

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

  • auth - 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-playlist - 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)
  • auth - 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 (2020-08-04)

Fixed

  • client - correctly return ModelList <model.ModelList> when chunking input (196)
  • auth - fix error handling when response does not contain an error description (199)
  • playback <Spotify.playback> and playback_currently_playing <Spotify.playback_currently_playing> -correctly handle local tracks (200)

2.1.2 (2020-07-21)

Fixed

  • FullShow <model.FullShow> - add undocumented total_episodes parameter, mark total_episodes of SimpleShow <model.SimpleShow> undocumented (194)

2.1.1 (2020-07-02)

Fixed

  • SimpleShow <model.SimpleShow> - add optional total_episodes parameter (190)

2.1.0 (2020-05-31)

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 (2020-05-27)

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

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

Added

  • auth - a list of scopes <scope> and strings is accepted in scope arguments (81)
  • Scope operations were expanded to properly handle all combinations of str, scope and Scope (177)
  • client-playlist - 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 config are now set at the top level
  • AuthorisationScopes was renamed to scope, and its alias scopes is no longer available
  • Ready-made scopes <auth-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 <model.Serialisable.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 <model.Serialisable.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 <model.Serialisable.pprint> output is now compact by default

Playlist items

Boolean attributes of FullTrack <model.FullTrack> and FullEpisode <model.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 <model.FullPlaylistTrack> and FullPlaylistEpisode <model.FullPlaylistEpisode>. LocalPlaylistTrack <model.LocalPlaylistTrack> now also provides these booleans. (170)

Miscellaneous

  • Exceptions thrown in auth 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 <senders> changed from TransientSender to PersistentSender, also affects Client behavior (141)

Fixed

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

1.7.0 (2020-04-28)

Added

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

Deprecated

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

Fixed

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

1.6.0 (2020-04-07)

Added

  • client - Support for podcasts. New APIs for episodes <client-episode> and shows <client-show>. New scope user-read-playback-position for returning episode resume points. New endpoints for saving shows in a user's library <client-library>. playback_queue_add <Spotify.playback_queue_add> now accepts episodes. playback <Spotify.playback> and playback_currently_playing <Spotify.playback_currently_playing> can return currently playing episodes and shows. playlist <Spotify.playlist> and playlist_tracks <Spotify.playlist_tracks> can return episodes on playlists. search <Spotify.search> allows for searching episodes and shows. (164)
  • Dependency to HTTPX upgraded to include version 0.12.* (166)

Fixed

  • Errors are now correctly raised when parsing responses in playlist <Spotify.playlist> and playlist_tracks <Spotify.playlist_tracks> (164)
  • Conversions to_url now return URLs with prefix https instead of http, in line with API and application behavior. from_url now correctly accepts https addresses for conversion. (165)
  • models - The repr of local items can now be produced without errors (171)

1.5.0 (2020-03-11)

Added

  • RetryingSender -avoid unnecessary retries and reduce total wait time (163)

Fixed

  • category_playlists <Spotify.category_playlists> require category parameter (160)
  • AsyncPersistentSender -persist connections appropriately (161)
  • playback_queue_add <Spotify.playback_queue_add> match endpoint address to changed API (162)

1.4.0 (2020-03-02)

Added

  • playlist_tracks_clear <Spotify.playlist_tracks_clear> -convenience endpoint for deleting tracks from a playlist (155)
  • conversions - accept shows and episodes as valid types (159)

Fixed

  • playlist_tracks_add <Spotify.playlist_tracks_add> -insert tracks in correct order when chunking (156)

1.3.0 (2020-02-26)

Added

  • playback_queue_add <Spotify.playback_queue_add> -add tracks to queue (152)
  • models - readable repr for models (32911c3a)
  • CachingSender - option to specify maximum cache size (143)
  • client - optionally send long lists of resources as chunks circumventing API limits (153)

1.2.0 (2020-02-17)

Added

  • client - optionally use maximum limits in all paging calls (66)

Fixed

  • client-paging - respect API limits when retrieving all items or pages of a search <Spotify.search> (145)
  • client-paging - always return an awaitable when asynchronous (146)

1.1.0 (2020-02-02)

Added

  • Async support in authentication and API endpoints (131)
  • CachingSender - a sender for response caching (4)
  • config - reading missing values produces a warning (0fa61801)

Fixed

  • playlist <Spotify.playlist> -parse correctly when fields is specified (142)

1.0.1 (2020-01-17)

Fixed

  • PlaylistTrack <model.PlaylistTrack> -accept missing video thumbnail (132)

1.0.0 (2020-01-14)

  • Packaging improvements
  • Declare versioning scheme

0.1.0 (2020-01-14)

Initial release of Tekore!