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
12f482e0
Commit
12f482e0
authored
Jun 08, 2018
by
Yury Selivanov
Committed by
GitHub
Jun 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-30805: Avoid race condition with debug logging (GH-7545)
Supersedes
https://github.com/python/cpython/pull/2490
parent
1cbdb220
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Lib/asyncio/base_events.py
Lib/asyncio/base_events.py
+4
-2
Misc/NEWS.d/next/Library/2018-06-08-17-34-16.bpo-30805.3qCWa0.rst
...S.d/next/Library/2018-06-08-17-34-16.bpo-30805.3qCWa0.rst
+1
-0
No files found.
Lib/asyncio/base_events.py
View file @
12f482e0
...
...
@@ -1476,6 +1476,7 @@ class BaseEventLoop(events.AbstractEventLoop):
if
bufsize
!=
0
:
raise
ValueError
(
"bufsize must be 0"
)
protocol
=
protocol_factory
()
debug_log
=
None
if
self
.
_debug
:
# don't log parameters: they may contain sensitive information
# (password) and may be too long
...
...
@@ -1483,7 +1484,7 @@ class BaseEventLoop(events.AbstractEventLoop):
self
.
_log_subprocess
(
debug_log
,
stdin
,
stdout
,
stderr
)
transport
=
await
self
.
_make_subprocess_transport
(
protocol
,
cmd
,
True
,
stdin
,
stdout
,
stderr
,
bufsize
,
**
kwargs
)
if
self
.
_debug
:
if
self
.
_debug
and
debug_log
is
not
None
:
logger
.
info
(
'%s: %r'
,
debug_log
,
transport
)
return
transport
,
protocol
...
...
@@ -1504,6 +1505,7 @@ class BaseEventLoop(events.AbstractEventLoop):
f"program arguments must be a bytes or text string, "
f"not
{
type
(
arg
).
__name__
}
"
)
protocol
=
protocol_factory
()
debug_log
=
None
if
self
.
_debug
:
# don't log parameters: they may contain sensitive information
# (password) and may be too long
...
...
@@ -1512,7 +1514,7 @@ class BaseEventLoop(events.AbstractEventLoop):
transport
=
await
self
.
_make_subprocess_transport
(
protocol
,
popen_args
,
False
,
stdin
,
stdout
,
stderr
,
bufsize
,
**
kwargs
)
if
self
.
_debug
:
if
self
.
_debug
and
debug_log
is
not
None
:
logger
.
info
(
'%s: %r'
,
debug_log
,
transport
)
return
transport
,
protocol
...
...
Misc/NEWS.d/next/Library/2018-06-08-17-34-16.bpo-30805.3qCWa0.rst
0 → 100644
View file @
12f482e0
Avoid race condition with debug logging
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