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
ec748c47
Commit
ec748c47
authored
Mar 17, 2016
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.5
parents
499d3654
5c13aa15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Lib/pyclbr.py
Lib/pyclbr.py
+5
-3
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/pyclbr.py
View file @
ec748c47
...
...
@@ -142,10 +142,10 @@ def _readmodule(module, path, inpackage=None):
search_path
=
path
+
sys
.
path
# XXX This will change once issue19944 lands.
spec
=
importlib
.
util
.
_find_spec_from_path
(
fullmodule
,
search_path
)
fname
=
spec
.
loader
.
get_filename
(
fullmodule
)
_modules
[
fullmodule
]
=
dict
if
spec
.
loader
.
is_package
(
fullmodule
):
dict
[
'__path__'
]
=
[
os
.
path
.
dirname
(
fname
)]
# is module a package?
if
spec
.
submodule_search_locations
is
not
None
:
dict
[
'__path__'
]
=
spec
.
submodule_search_locations
try
:
source
=
spec
.
loader
.
get_source
(
fullmodule
)
if
source
is
None
:
...
...
@@ -154,6 +154,8 @@ def _readmodule(module, path, inpackage=None):
# not Python source, can't do anything with this module
return
dict
fname
=
spec
.
loader
.
get_filename
(
fullmodule
)
f
=
io
.
StringIO
(
source
)
stack
=
[]
# stack of (class, indent) pairs
...
...
Misc/NEWS
View file @
ec748c47
...
...
@@ -226,6 +226,9 @@ Core and Builtins
Library
-------
-
Issue
#
26569
:
Fix
:
func
:`
pyclbr
.
readmodule
`
and
:
func
:`
pyclbr
.
readmodule_ex
`
to
support
importing
packages
.
-
Issue
#
26499
:
Account
for
remaining
Content
-
Length
in
HTTPResponse
.
readline
()
and
read1
().
Based
on
patch
by
Silent
Ghost
.
Also
document
that
HTTPResponse
now
supports
these
methods
.
...
...
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