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
e258a08e
Commit
e258a08e
authored
Jan 31, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20452: Remove debug code, no more needed
parent
479df8ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
Lib/asyncio/base_events.py
Lib/asyncio/base_events.py
+1
-9
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_events.py
+1
-13
No files found.
Lib/asyncio/base_events.py
View file @
e258a08e
...
...
@@ -620,18 +620,10 @@ class BaseEventLoop(events.AbstractEventLoop):
timeout
=
min
(
timeout
,
deadline
)
# TODO: Instrumentation only in debug mode?
# FIXME: don't force log (issue #20452)
if
True
:
#logger.isEnabledFor(logging.INFO):
if
logger
.
isEnabledFor
(
logging
.
INFO
):
t0
=
self
.
time
()
event_list
=
self
.
_selector
.
select
(
timeout
)
t1
=
self
.
time
()
# FIXME: remove these debug info (issue #20452)
dt
=
t1
-
t0
if
timeout
is
not
None
and
dt
<
timeout
and
not
event_list
:
print
(
"WARNING: selector.select(timeout=%.20f) took dt=%.20f sec (dt-timeout=%+.20f)"
%
(
timeout
,
dt
,
dt
-
timeout
),
file
=
sys
.
__stdout__
)
print
(
"WARNING: dt+%.20f > timeout? %s"
%
(
self
.
_granularity
,
(
dt
+
self
.
_granularity
)
>
timeout
),
file
=
sys
.
__stdout__
)
if
t1
-
t0
>=
1
:
level
=
logging
.
INFO
else
:
...
...
Lib/test/test_asyncio/test_events.py
View file @
e258a08e
...
...
@@ -28,15 +28,6 @@ from asyncio import events
from
asyncio
import
selector_events
from
asyncio
import
test_utils
# FIXME: remove these info, used for debug purpose (issue #20452)
print
(
"time.monotonic() info: %r"
%
(
time
.
get_clock_info
(
'monotonic'
),))
try
:
SC_CLK_TCK
=
os
.
sysconf
(
'SC_CLK_TCK'
)
print
(
"os.sysconf('SC_CLK_TCK') = %s"
%
SC_CLK_TCK
)
except
Exception
:
pass
# FIXME: remove these info, used for debug purpose (issue #20452)
def
data_file
(
filename
):
if
hasattr
(
support
,
'TEST_HOME_DIR'
):
...
...
@@ -1186,10 +1177,7 @@ class EventLoopTestsMixin:
self
.
loop
.
run_until_complete
(
wait
())
calls
.
append
(
self
.
loop
.
_run_once_counter
)
self
.
assertEqual
(
calls
,
[
1
,
3
,
5
,
6
],
# FIXME: remove these info, used for debug purpose (issue #20452)
(
self
.
loop
.
_granularity
,
self
.
loop
.
_selector
.
resolution
))
self
.
assertEqual
(
calls
,
[
1
,
3
,
5
,
6
])
class
SubprocessTestsMixin
:
...
...
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