Skip to content

1.10.0

Latest

Choose a tag to compare

@AnthonyBloomer AnthonyBloomer released this 26 Oct 09:11
· 10 commits to master since this release

Fixed

  • Empty results no longer iterate over dictionary keys. An empty results list was being replaced by {}, so len(), iteration and indexing fell back to the response's keys and results[0] raised TypeError: attribute name must be string, not 'int'. An empty search now gives len() == 0, list(results) == [] and a normal IndexError. (#128, #119)
  • AsObj now supports slices, so results[0:5] and del results[9:] work instead of raising TypeError: attribute name must be string, not 'slice'. (#124)
  • The request cache is no longer unbounded. It was an lru_cache with maxsize=None, which kept every response in memory for the life of the process; it now holds the most recent 128 requests and can be changed with the TMDB_REQUEST_CACHE_MAXSIZE environment variable. (#120)

Added

  • Provider is included in this release. (#117)

Docs

  • The search example now uses Search().movies('Mad Max') and makes it explicit that search takes arguments rather than a dict, which was the cause of the quote_from_bytes() expected bytes error. (#129, #49)
  • New Pagination section covering TMDb's 20-results-per-page and 500-page limits, with a loop example. (#126)
  • New Caching section covering cache size, cache_clear() and disabling the cache.