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
0d12a273
Commit
0d12a273
authored
Feb 28, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better CFFI exception handling due to an issue seen in 3.7b2.
parent
908e74a8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
12 deletions
+22
-12
Makefile
Makefile
+2
-1
ci-requirements.txt
ci-requirements.txt
+1
-1
src/gevent/_ffi/loop.py
src/gevent/_ffi/loop.py
+4
-1
src/gevent/event.py
src/gevent/event.py
+1
-4
src/gevent/libuv/watcher.py
src/gevent/libuv/watcher.py
+10
-5
src/greentest/tests_that_dont_use_resolver.txt
src/greentest/tests_that_dont_use_resolver.txt
+4
-0
No files found.
Makefile
View file @
0d12a273
...
...
@@ -108,7 +108,7 @@ leaktest: test_prelim
@
${PYTHON}
scripts/travis.py fold_end default
bench
:
${PYTHON}
benchmarks/bench_sendall.py
--loops
3
--processes
2
--values
2
--warmups
2
${PYTHON}
benchmarks/bench_sendall.py
--loops
3
--processes
2
--values
2
--warmups
2
--quiet
travis_test_linters
:
make lint
...
...
@@ -180,6 +180,7 @@ develop:
# We need wheel>=0.26 on Python 3.5. See previous revisions.
time
${PYTHON}
-m
pip
install
-U
-r
ci-requirements.txt
GEVENTSETUP_EV_VERIFY
=
3
time
${PYTHON}
-m
pip
install
-U
-e
.
${PYTHON}
-m
pip
freeze
ccache
-s
@${PYTHON}
scripts/travis.py
fold_end
install
...
...
ci-requirements.txt
View file @
0d12a273
...
...
@@ -16,7 +16,7 @@ prospector[with_pyroma] ; python_version < '3.7'
coverage
>=4.0
coveralls
>=1.0
# See version requirements in setup.py
cffi
; platform_python_implementation == "CPython"
cffi
>= 1.11.5
; platform_python_implementation == "CPython"
futures
dnspython
idna
...
...
src/gevent/_ffi/loop.py
View file @
0d12a273
...
...
@@ -208,7 +208,10 @@ class AbstractCallbacks(object):
watcher
.
loop
.
handle_error
(
None
,
t
,
v
,
tb
)
return
1
else
:
raise
v
# Raising it causes a lot of noise from CFFI
print
(
"WARNING: gevent: Unhandled error with no watcher"
,
file
=
sys
.
stderr
)
traceback
.
print_exception
(
t
,
v
,
tb
)
def
python_stop
(
self
,
handle
):
if
not
handle
:
# pragma: no cover
...
...
src/gevent/event.py
View file @
0d12a273
...
...
@@ -100,8 +100,7 @@ class _AbstractLinkable(object):
switch
=
getcurrent
().
switch
self
.
rawlink
(
switch
)
try
:
timer
=
Timeout
.
_start_new_or_dummy
(
timeout
)
try
:
with
Timeout
.
_start_new_or_dummy
(
timeout
)
as
timer
:
try
:
result
=
self
.
hub
.
switch
()
if
result
is
not
self
:
# pragma: no cover
...
...
@@ -113,8 +112,6 @@ class _AbstractLinkable(object):
# test_set_and_clear and test_timeout in test_threading
# rely on the exact return values, not just truthish-ness
return
False
finally
:
timer
.
close
()
finally
:
self
.
unlink
(
switch
)
...
...
src/gevent/libuv/watcher.py
View file @
0d12a273
...
...
@@ -725,16 +725,21 @@ class idle(_base.IdleMixin, watcher):
class
check
(
_base
.
CheckMixin
,
watcher
):
pass
class
OneShotCheck
(
check
):
_watcher_skip_ffi
=
True
def
__make_cb
(
self
,
func
):
stop
=
self
.
stop
@
functools
.
wraps
(
func
)
def
cb
(
*
args
,
_stop
=
stop
):
_stop
()
return
func
(
*
args
)
return
cb
def
start
(
self
,
callback
,
*
args
):
@
functools
.
wraps
(
callback
)
def
_callback
(
*
args
):
self
.
stop
()
return
callback
(
*
args
)
return
check
.
start
(
self
,
_callback
,
*
args
)
return
check
.
start
(
self
,
self
.
__make_cb
(
callback
),
*
args
)
class
prepare
(
_base
.
PrepareMixin
,
watcher
):
pass
src/greentest/tests_that_dont_use_resolver.txt
View file @
0d12a273
...
...
@@ -128,3 +128,7 @@ test___config.py
test__destroy_default_loop.py
test__util.py
test___ident.py
test__issue639.py
test__issue_728.py
test__refcount_core.py
test__api.py
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