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
9fe8ba12
Commit
9fe8ba12
authored
Dec 08, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coverage updates.
parent
6115e431
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
src/gevent/_abstract_linkable.py
src/gevent/_abstract_linkable.py
+7
-8
src/gevent/tests/test__semaphore.py
src/gevent/tests/test__semaphore.py
+7
-4
src/gevent/util.py
src/gevent/util.py
+3
-1
No files found.
src/gevent/_abstract_linkable.py
View file @
9fe8ba12
...
...
@@ -141,14 +141,13 @@ class AbstractLinkable(object):
link
=
self
.
_links
.
pop
(
0
)
# Cython optimizes using list internals
id_link
=
id
(
link
)
if
id_link
in
done
:
continue
done
.
add
(
id_link
)
try
:
link
(
self
)
except
:
# pylint:disable=bare-except
# We're running in the hub, errors must not escape.
self
.
hub
.
handle_error
((
link
,
self
),
*
sys
.
exc_info
())
if
id_link
not
in
done
:
done
.
add
(
id_link
)
try
:
link
(
self
)
except
:
# pylint:disable=bare-except
# We're running in the hub, errors must not escape.
self
.
hub
.
handle_error
((
link
,
self
),
*
sys
.
exc_info
())
if
link
is
final_link
:
break
...
...
src/gevent/tests/test__semaphore.py
View file @
9fe8ba12
...
...
@@ -96,17 +96,20 @@ class TestCExt(greentest.TestCase):
class
SwitchWithFixedHash
(
object
):
# Replaces greenlet.switch with a callable object
# with a hash code we control.
# with a hash code we control. This only matters if
# we're hashing this somewhere (which we used to), but
# that doesn't preserve order, so we don't do
# that anymore.
def
__init__
(
self
,
greenlet
,
hashcode
):
self
.
switch
=
greenlet
.
switch
self
.
hashcode
=
hashcode
def
__hash__
(
self
):
r
eturn
self
.
hashcode
r
aise
AssertionError
def
__eq__
(
self
,
other
):
r
eturn
self
is
othe
r
r
aise
AssertionErro
r
def
__call__
(
self
,
*
args
,
**
kwargs
):
return
self
.
switch
(
*
args
,
**
kwargs
)
...
...
@@ -143,7 +146,7 @@ def acquire_then_spawn(sem, should_quit):
def
release_then_spawn
(
sem
,
should_quit
):
sem
.
release
()
if
should_quit
:
if
should_quit
:
# pragma: no cover
return
g
=
FirstG
.
spawn
(
acquire_then_spawn
,
sem
,
should_quit
)
g
.
join
()
...
...
src/gevent/util.py
View file @
9fe8ba12
...
...
@@ -429,9 +429,11 @@ class GreenletTree(object):
self
.
__render_locals
(
tree
)
try
:
self
.
__render_children
(
tree
)
except
RuntimeError
:
except
RuntimeError
:
# pragma: no cover
# If the tree is exceptionally deep, we can hit the recursion error.
# Usually it's several levels down so we can make a print call.
# This came up in test__semaphore before TestSemaphoreFair
# was fixed.
print
(
"When rendering children"
,
*
sys
.
exc_info
())
return
tree
.
lines
...
...
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