Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
02eb41d9
Commit
02eb41d9
authored
Sep 08, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not print locals that have no values. Fixes #1275.
parent
1afdb093
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
CHANGES.rst
CHANGES.rst
+2
-1
src/gevent/util.py
src/gevent/util.py
+2
-0
src/greentest/test__util.py
src/greentest/test__util.py
+6
-0
No files found.
CHANGES.rst
View file @
02eb41d9
...
...
@@ -7,7 +7,8 @@
1.3.7 (unreleased)
==================
- Nothing changed yet.
- Formatting run info no longer includes ``gevent.local.local``
objects that have no value in the greenlet. See :issue:`1275`.
1.3.6 (2018-08-17)
...
...
src/gevent/util.py
View file @
02eb41d9
...
...
@@ -371,6 +371,8 @@ class GreenletTree(object):
if
gr_locals
:
tree
.
child_data
(
"Greenlet Locals:"
)
for
(
kind
,
idl
),
vals
in
gr_locals
:
if
not
vals
:
continue
# not set in this greenlet; ignore it.
tree
.
child_data
(
" Local %s at %s"
%
(
kind
,
hex
(
idl
)))
tree
.
child_multidata
(
" "
+
pprint
.
pformat
(
vals
))
...
...
src/greentest/test__util.py
View file @
02eb41d9
...
...
@@ -43,6 +43,9 @@ class TestFormat(greentest.TestCase):
def
root
():
l
=
MyLocal
(
42
)
assert
l
# And an empty local.
l2
=
local
.
local
()
assert
l2
gevent
.
getcurrent
().
spawn_tree_locals
[
'a value'
]
=
42
io
=
NativeStrIO
()
g
=
gevent
.
spawn
(
util
.
print_run_info
,
file
=
io
)
...
...
@@ -54,12 +57,15 @@ class TestFormat(greentest.TestCase):
g
.
join
()
value
=
g
.
value
self
.
assertIn
(
"Spawned at"
,
value
)
self
.
assertIn
(
"Parent:"
,
value
)
self
.
assertIn
(
"Spawn Tree Locals"
,
value
)
self
.
assertIn
(
"Greenlet Locals:"
,
value
)
self
.
assertIn
(
'MyLocal'
,
value
)
self
.
assertIn
(
"Printer"
,
value
)
# The name is printed
# Empty locals should not be printed
self
.
assertNotIn
(
'{}'
,
value
)
@
greentest
.
skipOnPyPy
(
"See TestFormat"
)
class
TestTree
(
greentest
.
TestCase
):
...
...
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