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
2b8ecd9d
Commit
2b8ecd9d
authored
Jan 10, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pypy lock times sometimes come out slightly ahead on libuv
parent
baf7e221
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
14 deletions
+45
-14
Makefile
Makefile
+6
-2
scripts/install.sh
scripts/install.sh
+1
-1
src/gevent/hub.py
src/gevent/hub.py
+11
-4
src/greentest/2.7pypy/lock_tests.py
src/greentest/2.7pypy/lock_tests.py
+5
-1
src/greentest/greentest.py
src/greentest/greentest.py
+8
-6
src/greentest/patched_tests_setup.py
src/greentest/patched_tests_setup.py
+13
-0
src/greentest/test__subprocess.py
src/greentest/test__subprocess.py
+1
-0
No files found.
Makefile
View file @
2b8ecd9d
...
...
@@ -127,7 +127,7 @@ PY278=$(BUILD_RUNTIMES)/snakepit/python2.7.8
PY27
=
$(BUILD_RUNTIMES)
/snakepit/python2.7.14
PY34
=
$(BUILD_RUNTIMES)
/snakepit/python3.4.7
PY35
=
$(BUILD_RUNTIMES)
/snakepit/python3.5.4
PY36
=
$(BUILD_RUNTIMES)
/snakepit/python3.6.
3
PY36
=
$(BUILD_RUNTIMES)
/snakepit/python3.6.
4
PY37
=
$(BUILD_RUNTIMES)
/snakepit/python3.7.0a3
PYPY
=
$(BUILD_RUNTIMES)
/snakepit/pypy590
PYPY3
=
$(BUILD_RUNTIMES)
/snakepit/pypy3.5_590
...
...
@@ -196,9 +196,13 @@ test-py35: $(PY35)
PYTHON
=
python3.5.4
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.5.4/bin:
$(PATH)
make develop allbackendtest
test-py36
:
$(PY36)
PYTHON
=
python3.6.
3
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.6.3
/bin:
$(PATH)
make develop allbackendtest
PYTHON
=
python3.6.
4
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.6.4
/bin:
$(PATH)
make develop allbackendtest
test-py37
:
$(PY37)
# Locally I could produce odd failures with a miscompiled cffi. compiling from scratch with -g
# and no opts fixed it. This shouldn't be necessary post release. One hopes.
PYTHON
=
python3.7.0a3
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.7.0a3/bin:
$(PATH)
python
-m
pip uninstall
-y
cffi
CFLAGS
=
-g
PYTHON
=
python3.7.0a3
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.7.0a3/bin:
$(PATH)
python
-m
pip
install
-v
-U
--no-binary
cffi cffi
PYTHON
=
python3.7.0a3
PATH
=
$(BUILD_RUNTIMES)
/versions/python3.7.0a3/bin:
$(PATH)
make develop allbackendtest
test-pypy
:
$(PYPY)
...
...
scripts/install.sh
View file @
2b8ecd9d
...
...
@@ -94,7 +94,7 @@ for var in "$@"; do
install
3.5.4 python3.5.4
;;
3.6
)
install
3.6.
3 python3.6.3
install
3.6.
4 python3.6.4
;;
3.7
)
install
3.7.0a3 python3.7.0a3
...
...
src/gevent/hub.py
View file @
2b8ecd9d
...
...
@@ -405,6 +405,12 @@ def _import(path):
raise
ImportError
(
"Cannot import %r (required format: [path/][package.]module.class)"
%
path
)
if
'/'
in
path
:
# This is dangerous, subject to race conditions, and
# may not work properly for things like namespace packages
import
warnings
warnings
.
warn
(
"Absolute paths are deprecated. Please put the package "
"on sys.path first"
,
DeprecationWarning
)
package_path
,
path
=
path
.
rsplit
(
'/'
,
1
)
sys
.
path
=
[
package_path
]
+
sys
.
path
else
:
...
...
@@ -420,10 +426,11 @@ def _import(path):
raise
ImportError
(
'Cannot import %r from %r'
%
(
attr
,
oldx
))
return
x
finally
:
try
:
sys
.
path
.
remove
(
package_path
)
except
ValueError
:
pass
if
'/'
in
path
:
try
:
sys
.
path
.
remove
(
package_path
)
except
ValueError
:
pass
def
config
(
default
,
envvar
):
...
...
src/greentest/2.7pypy/lock_tests.py
View file @
2b8ecd9d
...
...
@@ -418,7 +418,11 @@ class ConditionTests(BaseTestCase):
Bunch
(
f
,
N
).
wait_for_finished
()
self
.
assertEqual
(
len
(
results
),
5
)
for
dt
in
results
:
self
.
assertTrue
(
dt
>=
0.2
,
dt
)
#self.assertTrue(dt >= 0.2, dt)
# gevent: With libuv, timers are slightly variable
# (and coalesce?). Sometimes the sleep is
# 0.00004 less than expected, e.g., 0.199996
self
.
assertTrue
(
dt
>=
0.18
,
dt
)
class
BaseSemaphoreTests
(
BaseTestCase
):
...
...
src/greentest/greentest.py
View file @
2b8ecd9d
...
...
@@ -152,15 +152,17 @@ skipIf = unittest.skipIf
EXPECT_POOR_TIMER_RESOLUTION
=
PYPY3
or
RUNNING_ON_APPVEYOR
skipOnLibuv
=
_do_not_skip
skipOnLibuvOnCI
=
_do_not_skip
skipOnLibuvOnCIOnPyPy
=
_do_not_skip
if
LIBUV
:
skipOnLibuv
=
unittest
.
skip
else
:
skipOnLibuv
=
_do_not_skip
if
LIBUV
and
RUNNING_ON_CI
:
skipOnLibuvOnCI
=
unittest
.
skip
else
:
skipOnLibuvOnCI
=
_do_not_
skip
if
RUNNING_ON_CI
:
skipOnLibuvOnCI
=
unittest
.
skip
if
PYPY
:
skipOnLibuvOnCIOnPyPy
=
unittest
.
skip
class
ExpectedException
(
Exception
):
"""An exception whose traceback should be ignored by the hub"""
...
...
src/greentest/patched_tests_setup.py
View file @
2b8ecd9d
...
...
@@ -13,6 +13,8 @@ import os
# import platform
import
re
# XXX: These are mainly repeats of what's in greentest. Extract these to a common module.
TRAVIS
=
os
.
environ
.
get
(
"TRAVIS"
)
==
"true"
APPVEYOR
=
os
.
environ
.
get
(
'APPVEYOR'
)
OSX
=
sys
.
platform
==
'darwin'
...
...
@@ -336,6 +338,17 @@ if LIBUV:
disabled_tests
+=
[
]
if
PYPY
:
if
TRAVIS
:
disabled_tests
+=
[
# This sometimes causes a segfault for no apparent reason.
# See https://travis-ci.org/gevent/gevent/jobs/327328704
# Can't reproduce locally.
'test_subprocess.ProcessTestCase.test_universal_newlines_communicate'
,
]
def
_make_run_with_original
(
mod_name
,
func_name
):
@
contextlib
.
contextmanager
def
with_orig
():
...
...
src/greentest/test__subprocess.py
View file @
2b8ecd9d
...
...
@@ -88,6 +88,7 @@ class Test(greentest.TestCase):
@
greentest
.
skipIf
(
subprocess
.
mswindows
,
"Windows does weird things here"
)
@
greentest
.
skipOnLibuvOnCIOnPyPy
(
"Sometimes segfaults"
)
def
test_communicate_universal
(
self
):
# Native string all the things. See https://github.com/gevent/gevent/issues/1039
p
=
subprocess
.
Popen
(
...
...
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