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
e5b896ea
Commit
e5b896ea
authored
May 12, 2020
by
Jason Madden
Committed by
GitHub
May 12, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1610 from gevent/issue1569
Update PyPy on Travis
parents
e0252d12
8d3ce476
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
3 deletions
+70
-3
docs/changes/1569.feature
docs/changes/1569.feature
+1
-0
scripts/install.sh
scripts/install.sh
+2
-2
src/gevent/libuv/_corecffi_cdef.c
src/gevent/libuv/_corecffi_cdef.c
+1
-0
src/gevent/libuv/_corecffi_source.c
src/gevent/libuv/_corecffi_source.c
+48
-0
src/gevent/testing/__init__.py
src/gevent/testing/__init__.py
+8
-0
src/gevent/testing/patched_tests_setup.py
src/gevent/testing/patched_tests_setup.py
+10
-1
No files found.
docs/changes/1569.feature
0 → 100644
View file @
e5b896ea
Update
tested
PyPy
version
from
7.3.0
to
7.3.1
on
Linux.
scripts/install.sh
View file @
e5b896ea
...
...
@@ -115,10 +115,10 @@ for var in "$@"; do
install
3.8.2 python3.8 3.8.d
;;
pypy2.7
)
install
pypy2.7-7.3.
0
pypy2.7 pypy2.7.d
install
pypy2.7-7.3.
1
pypy2.7 pypy2.7.d
;;
pypy3.6
)
install
pypy3.6-7.3.
0
pypy3.6 pypy3.6.d
install
pypy3.6-7.3.
1
pypy3.6 pypy3.6.d
;;
esac
done
src/gevent/libuv/_corecffi_cdef.c
View file @
e5b896ea
...
...
@@ -395,3 +395,4 @@ static void gevent_zero_prepare(uv_prepare_t* handle);
static
void
gevent_zero_check
(
uv_check_t
*
handle
);
static
void
gevent_zero_loop
(
uv_loop_t
*
handle
);
static
void
gevent_set_uv_alloc
();
static
void
gevent_test_setup
();
src/gevent/libuv/_corecffi_source.c
View file @
e5b896ea
...
...
@@ -132,6 +132,10 @@ static void gevent_zero_loop(uv_loop_t* handle)
memset
(
handle
,
0
,
sizeof
(
uv_loop_t
));
}
/***
* Allocation functions
*/
#include "_ffi/alloc.c"
static
void
*
_gevent_uv_malloc
(
size_t
size
)
...
...
@@ -169,6 +173,50 @@ static void gevent_set_uv_alloc()
_gevent_uv_free
);
}
/***
* Utility Functions
*/
#ifdef __APPLE__
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <pthread.h>
// based on code from libuv
static
void
gevent_move_pthread_to_realtime_scheduling_class
(
pthread_t
pthread
)
{
mach_timebase_info_data_t
timebase_info
;
mach_timebase_info
(
&
timebase_info
);
const
uint64_t
NANOS_PER_MSEC
=
1000000ULL
;
double
clock2abs
=
((
double
)
timebase_info
.
denom
/
(
double
)
timebase_info
.
numer
)
*
NANOS_PER_MSEC
;
thread_time_constraint_policy_data_t
policy
;
policy
.
period
=
0
;
policy
.
computation
=
(
uint32_t
)(
5
*
clock2abs
);
// 5 ms of work
policy
.
constraint
=
(
uint32_t
)(
10
*
clock2abs
);
policy
.
preemptible
=
FALSE
;
int
kr
=
thread_policy_set
(
pthread_mach_thread_np
(
pthread
),
THREAD_TIME_CONSTRAINT_POLICY
,
(
thread_policy_t
)
&
policy
,
THREAD_TIME_CONSTRAINT_POLICY_COUNT
);
if
(
kr
!=
KERN_SUCCESS
)
{
mach_error
(
"thread_policy_set:"
,
kr
);
exit
(
1
);
}
}
static
void
gevent_test_setup
()
{
gevent_move_pthread_to_realtime_scheduling_class
(
pthread_self
());
}
#else
static
void
gevent_test_setup
()
{}
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#pragma clang diagnostic push
...
...
src/gevent/testing/__init__.py
View file @
e5b896ea
...
...
@@ -44,6 +44,14 @@ else:
# for the same reasons as above.
faulthandler
.
enable
()
try
:
from
gevent.libuv
import
_corecffi
except
ImportError
:
pass
else
:
_corecffi
.
lib
.
gevent_test_setup
()
# pylint:disable=no-member
del
_corecffi
from
.sysinfo
import
VERBOSE
from
.sysinfo
import
WIN
from
.sysinfo
import
LINUX
...
...
src/gevent/testing/patched_tests_setup.py
View file @
e5b896ea
...
...
@@ -601,7 +601,7 @@ if PY2:
'test_ssl.ContextTests.test_options'
,
]
if
PYPY
and
sys
.
pypy_version_info
[:
3
]
==
(
7
,
3
,
0
):
# pylint:disable=no-member
if
PYPY
and
sys
.
pypy_version_info
[:
2
]
==
(
7
,
3
):
# pylint:disable=no-member
if
OSX
:
disabled_tests
+=
[
...
...
@@ -613,6 +613,15 @@ if PYPY and sys.pypy_version_info[:3] == (7, 3, 0): # pylint:disable=no-member
'test_ssl.ThreadedTests.test_default_ecdh_curve'
,
]
if
PYPY3
and
TRAVIS
:
disabled_tests
+=
[
# If socket.SOCK_CLOEXEC is defined, this creates a socket
# and tests its type with ``sock.type & socket.SOCK_CLOEXEC``
# We have a ``@property`` for ``type`` that takes care of
# ``SOCK_NONBLOCK`` on Linux, but otherwise it's just a pass-through.
# This started failing with PyPy 7.3.1 and it's not clear why.
'test_socket.InheritanceTest.test_SOCK_CLOEXEC'
,
]
def
_make_run_with_original
(
mod_name
,
func_name
):
@
contextlib
.
contextmanager
...
...
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