mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3234: intersphinx failed for encoded inventories
This commit is contained in:
parent
4116c8424f
commit
cea72ddbc4
1
CHANGES
1
CHANGES
@ -40,6 +40,7 @@ Bugs fixed
|
|||||||
:dudir:`parsed-literal` LaTeX output (ref #3342)
|
:dudir:`parsed-literal` LaTeX output (ref #3342)
|
||||||
* LaTeX writer: leave ``"`` character inside :dudir:`parsed-literal` as is
|
* LaTeX writer: leave ``"`` character inside :dudir:`parsed-literal` as is
|
||||||
(ref #3341)
|
(ref #3341)
|
||||||
|
* #3234: intersphinx failed for encoded inventories
|
||||||
|
|
||||||
|
|
||||||
Release 1.5.1 (released Dec 13, 2016)
|
Release 1.5.1 (released Dec 13, 2016)
|
||||||
|
@ -29,6 +29,7 @@ from __future__ import print_function
|
|||||||
import time
|
import time
|
||||||
import zlib
|
import zlib
|
||||||
import codecs
|
import codecs
|
||||||
|
import functools
|
||||||
import posixpath
|
import posixpath
|
||||||
from os import path
|
from os import path
|
||||||
import re
|
import re
|
||||||
@ -164,6 +165,9 @@ def _read_from_url(url, config=None):
|
|||||||
r = requests.get(url, stream=True, config=config, timeout=config.intersphinx_timeout)
|
r = requests.get(url, stream=True, config=config, timeout=config.intersphinx_timeout)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
r.raw.url = r.url
|
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
|
return r.raw
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user