Skip to content

Commit

Permalink
Merge pull request #97 from vapier/master
Browse files Browse the repository at this point in the history
fix working with newer requests-cache versions
  • Loading branch information
dbr committed Sep 3, 2021
2 parents d2705e6 + 637b2d2 commit f8db8e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
long_description_content_type='text/markdown',

py_modules=['tvdb_api'],
install_requires=['requests_cache<0.6.0', 'requests'],
install_requires=['requests_cache', 'requests'],

classifiers=[
"Intended Audience :: Developers",
Expand Down
6 changes: 5 additions & 1 deletion tvdb_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@

import requests
import requests_cache
from requests_cache.backends.base import _to_bytes, _DEFAULT_HEADERS

_DEFAULT_HEADERS = requests.utils.default_headers()

def _to_bytes(s, encoding='utf-8'):
return s if isinstance(s, bytes) else bytes(s, encoding)


IS_PY2 = sys.version_info[0] == 2
Expand Down

0 comments on commit f8db8e9

Please sign in to comment.