mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
#4259: update the URL pattern for module documentation
This commit is contained in:
parent
6f5d3f326f
commit
2443efb7ed
1 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,7 @@ to a file named "<name>.html".
|
||||||
|
|
||||||
Module docs for core modules are assumed to be in
|
Module docs for core modules are assumed to be in
|
||||||
|
|
||||||
http://www.python.org/doc/current/lib/
|
http://www.python.org/doc/<version>/lib/
|
||||||
|
|
||||||
This can be overridden by setting the PYTHONDOCS environment variable
|
This can be overridden by setting the PYTHONDOCS environment variable
|
||||||
to a different URL or to a local directory containing the Library
|
to a different URL or to a local directory containing the Library
|
||||||
|
@ -345,8 +345,9 @@ class Doc:
|
||||||
except TypeError:
|
except TypeError:
|
||||||
file = '(built-in)'
|
file = '(built-in)'
|
||||||
|
|
||||||
|
version = '.'.join(str(v) for v in sys.version_info[:3])
|
||||||
docloc = os.environ.get("PYTHONDOCS",
|
docloc = os.environ.get("PYTHONDOCS",
|
||||||
"http://www.python.org/doc/current/lib")
|
"http://www.python.org/doc/%s/lib" % version)
|
||||||
basedir = os.path.join(sys.exec_prefix, "lib",
|
basedir = os.path.join(sys.exec_prefix, "lib",
|
||||||
"python"+sys.version[0:3])
|
"python"+sys.version[0:3])
|
||||||
if (isinstance(object, type(os)) and
|
if (isinstance(object, type(os)) and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue