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
0924a16f
Commit
0924a16f
authored
Jul 13, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test under PyPy
parent
3841f613
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
gevent/builtins.py
gevent/builtins.py
+12
-5
greentest/test__import_blocking_in_greenlet.py
greentest/test__import_blocking_in_greenlet.py
+2
-0
known_failures.py
known_failures.py
+4
-4
No files found.
gevent/builtins.py
View file @
0924a16f
...
...
@@ -37,16 +37,23 @@ def __import__(*args, **kwargs):
# however, so this is necessary.
args
=
args
[
1
:]
imp
.
acquire_lock
()
try
:
try
:
_g_import_lock
.
acquire
()
except
RuntimeError
:
# we've seen this under PyPy, a recursion error
# importing 'platform'
return
_import
(
*
args
,
**
kwargs
)
try
:
result
=
_import
(
*
args
,
**
kwargs
)
finally
:
_g_import_lock
.
release
()
finally
:
imp
.
release_lock
()
return
result
if
sys
.
version_info
[:
2
]
<
(
3
,
3
):
if
sys
.
version_info
[:
2
]
>=
(
3
,
3
):
__implements__
=
[]
else
:
__implements__
=
[
'__import__'
]
...
...
greentest/test__import_blocking_in_greenlet.py
View file @
0924a16f
...
...
@@ -2,6 +2,7 @@
# See https://github.com/gevent/gevent/issues/108
import
gevent
from
gevent
import
monkey
monkey
.
patch_all
()
import_errors
=
[]
...
...
@@ -13,6 +14,7 @@ def some_func():
assert
x
==
'done'
except
ImportError
as
e
:
import_errors
.
append
(
e
)
raise
gs
=
[
gevent
.
spawn
(
some_func
)
for
i
in
range
(
2
)]
gevent
.
joinall
(
gs
)
...
...
known_failures.py
View file @
0924a16f
...
...
@@ -59,13 +59,13 @@ if LEAKTEST:
if
PYPY
:
FAILING_TESTS
+=
[
# Different in PyPy:
#
#
Different in PyPy:
# Not implemented:
#
#
Not implemented:
# ---
#
#
---
# BUGS:
#
#
BUGS:
]
...
...
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