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
3f2e6f15
Commit
3f2e6f15
authored
Feb 26, 2018
by
Serhiy Storchaka
Committed by
GitHub
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
parent
6f600ff1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
Lib/logging/config.py
Lib/logging/config.py
+2
-2
Lib/pstats.py
Lib/pstats.py
+1
-1
Lib/turtle.py
Lib/turtle.py
+1
-1
Lib/urllib/request.py
Lib/urllib/request.py
+2
-1
No files found.
Lib/logging/config.py
View file @
3f2e6f15
...
...
@@ -460,7 +460,7 @@ class BaseConfigurator(object):
c = self.resolve(c)
props = config.pop('
.
', None)
# Check for valid identifiers
kwargs =
dict((k, config[k]) for k in config if valid_ident(k))
kwargs =
{k: config[k] for k in config if valid_ident(k)}
result = c(**kwargs)
if props:
for name, value in props.items():
...
...
@@ -723,7 +723,7 @@ class DictConfigurator(BaseConfigurator):
config['address'] = self.as_tuple(config['address'])
factory = klass
props = config.pop('.', None)
kwargs =
dict((k, config[k]) for k in config if valid_ident(k))
kwargs =
{k: config[k] for k in config if valid_ident(k)}
try:
result = factory(**kwargs)
except TypeError as te:
...
...
Lib/pstats.py
View file @
3f2e6f15
...
...
@@ -530,7 +530,7 @@ def add_callers(target, source):
if
func
in
new_callers
:
if
isinstance
(
caller
,
tuple
):
# format used by cProfile
new_callers
[
func
]
=
tuple
(
i
[
0
]
+
i
[
1
]
for
i
in
zip
(
caller
,
new_callers
[
func
]))
new_callers
[
func
]
=
tuple
(
i
+
j
for
i
,
j
in
zip
(
caller
,
new_callers
[
func
]))
else
:
# format used by profile
new_callers
[
func
]
+=
caller
...
...
Lib/turtle.py
View file @
3f2e6f15
...
...
@@ -3839,7 +3839,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
docsdict
[
key
]
=
eval
(
key
).
__doc__
with
open
(
"%s.py"
%
filename
,
"w"
)
as
f
:
keys
=
sorted
(
x
for
x
in
docsdict
.
keys
()
keys
=
sorted
(
x
for
x
in
docsdict
if
x
.
split
(
'.'
)[
1
]
not
in
_alias_list
)
f
.
write
(
'docsdict = {
\
n
\
n
'
)
for
key
in
keys
[:
-
1
]:
...
...
Lib/urllib/request.py
View file @
3f2e6f15
...
...
@@ -1286,7 +1286,8 @@ class AbstractHTTPHandler(BaseHandler):
h
.
set_debuglevel
(
self
.
_debuglevel
)
headers
=
dict
(
req
.
unredirected_hdrs
)
headers
.
update
((
k
,
v
)
for
k
,
v
in
req
.
headers
.
items
()
if
k
not
in
headers
)
headers
.
update
({
k
:
v
for
k
,
v
in
req
.
headers
.
items
()
if
k
not
in
headers
})
# TODO(jhylton): Should this be redesigned to handle
# persistent connections?
...
...
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