Skip to content

Commit

Permalink
Merge pull request #1 from readthedocs/humitos/cleanup
Browse files Browse the repository at this point in the history
Small cleanup
  • Loading branch information
ericholscher committed Oct 6, 2021
2 parents fcbc627 + 7df06c7 commit e8dfc94
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,26 +263,3 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

TOKEN = 'https://readthedocs-ops.readthedocs-hosted.com/_/sharing/2ri9ae9m0dky11yk0kwq42eq8'

import requests
s = requests.Session()
s.get(TOKEN)

import sphinx.ext.intersphinx
import functools

def _read_from_url(url, config=None):
r = s.get(url, stream=True, timeout=config.intersphinx_timeout)
import ipdb; ipdb.set_trace()
r.raise_for_status()
r.raw.url = r.url
# decode content-body based on the header.
# ref: https://github.com/kennethreitz/requests/issues/2155
r.raw.read = functools.partial(r.raw.read, decode_content=True)
return r.raw

sphinx.ext.intersphinx._read_from_url = _read_from_url

intersphinx_mapping = {'ops': ('https://readthedocs-ops.readthedocs-hosted.com/en/latest/', None)}
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
sphinx==4.0.1
sphinx-rtd-theme==0.5.2
sphinx-notfound-page==0.6

0 comments on commit e8dfc94

Please sign in to comment.