Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
52855452
Commit
52855452
authored
Jun 12, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #16484: Merge pydoc Windows fixes from 3.5
parents
62bdea58
4f8aaf64
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
Lib/pydoc.py
Lib/pydoc.py
+3
-2
Lib/test/test_pydoc.py
Lib/test/test_pydoc.py
+1
-1
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/pydoc.py
View file @
52855452
...
...
@@ -28,7 +28,7 @@ to a file named "<name>.html".
Module docs for core modules are assumed to be in
http://docs.python.org/X.Y/library/
http
s
://docs.python.org/X.Y/library/
This can be overridden by setting the PYTHONDOCS environment variable
to a different URL or to a local directory containing the Library
...
...
@@ -407,6 +407,7 @@ class Doc:
docloc
=
os
.
environ
.
get
(
"PYTHONDOCS"
,
self
.
PYTHONDOCS
)
basedir
=
os
.
path
.
normcase
(
basedir
)
if
(
isinstance
(
object
,
type
(
os
))
and
(
object
.
__name__
in
(
'errno'
,
'exceptions'
,
'gc'
,
'imp'
,
'marshal'
,
'posix'
,
'signal'
,
'sys'
,
...
...
@@ -414,7 +415,7 @@ class Doc:
(
file
.
startswith
(
basedir
)
and
not
file
.
startswith
(
os
.
path
.
join
(
basedir
,
'site-packages'
))))
and
object
.
__name__
not
in
(
'xml.etree'
,
'test.pydoc_mod'
)):
if
docloc
.
startswith
(
"http://"
):
if
docloc
.
startswith
(
(
"http://"
,
"https://"
)
):
docloc
=
"%s/%s"
%
(
docloc
.
rstrip
(
"/"
),
object
.
__name__
.
lower
())
else
:
docloc
=
os
.
path
.
join
(
docloc
,
object
.
__name__
.
lower
()
+
".html"
)
...
...
Lib/test/test_pydoc.py
View file @
52855452
...
...
@@ -356,7 +356,7 @@ def get_pydoc_html(module):
def
get_pydoc_link
(
module
):
"Returns a documentation web link of a module"
dirname
=
os
.
path
.
dirname
basedir
=
os
.
path
.
join
(
dirname
(
dirname
(
__file__
)
))
basedir
=
dirname
(
dirname
(
__file__
))
doc
=
pydoc
.
TextDoc
()
loc
=
doc
.
getdocloc
(
module
,
basedir
=
basedir
)
return
loc
...
...
Misc/NEWS
View file @
52855452
...
...
@@ -225,6 +225,10 @@ IDLE
Documentation
-------------
-
Issue
#
16484
:
Change
the
default
PYTHONDOCS
URL
to
"https:"
,
and
fix
the
resulting
links
to
use
lowercase
.
Patch
by
Sean
Rodman
,
test
by
Kaushik
Nadikuditi
.
-
Issue
#
24136
:
Document
the
new
PEP
448
unpacking
syntax
of
3.5
.
-
Issue
#
22558
:
Add
remaining
doc
links
to
source
code
for
Python
-
coded
modules
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment