Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
ZEO
Commits
f7a7c6a7
Commit
f7a7c6a7
authored
Aug 08, 2016
by
Jim Fulton
Committed by
GitHub
Aug 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70 from zopefoundation/uvloop
Uvloop
parents
772221b8
417b4b61
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
.travis.yml
.travis.yml
+3
-3
buildout.cfg
buildout.cfg
+3
-3
setup.py
setup.py
+1
-1
src/ZEO/asyncio/client.py
src/ZEO/asyncio/client.py
+6
-1
src/ZEO/tests/testssl.py
src/ZEO/tests/testssl.py
+1
-0
No files found.
.travis.yml
View file @
f7a7c6a7
...
@@ -18,14 +18,14 @@ matrix:
...
@@ -18,14 +18,14 @@ matrix:
python
:
2.7
python
:
2.7
env
:
ZEO4_SERVER=1
env
:
ZEO4_SERVER=1
-
os
:
linux
-
os
:
linux
python
:
3.
4
python
:
3.
5
env
:
ZEO4_SERVER=1
env
:
ZEO4_SERVER=1
-
os
:
linux
-
os
:
linux
python
:
3.5
python
:
3.5
env
:
ZEO4_SERVER=1
env
:
BUILOUT_OPTIONS=extra=,uvloop
install
:
install
:
-
pip install zc.buildout
-
pip install zc.buildout
-
buildout
-
buildout
$BUILOUT_OPTIONS
cache
:
cache
:
directories
:
directories
:
-
eggs
-
eggs
...
...
buildout.cfg
View file @
f7a7c6a7
...
@@ -4,6 +4,7 @@ parts =
...
@@ -4,6 +4,7 @@ parts =
test
test
scripts
scripts
versions = versions
versions = versions
extra =
[versions]
[versions]
...
@@ -11,7 +12,7 @@ versions = versions
...
@@ -11,7 +12,7 @@ versions = versions
[test]
[test]
recipe = zc.recipe.testrunner
recipe = zc.recipe.testrunner
eggs =
eggs =
ZEO [test]
ZEO [test
${buildout:extra}
]
initialization =
initialization =
import os, tempfile
import os, tempfile
try: os.mkdir('tmp')
try: os.mkdir('tmp')
...
@@ -21,6 +22,5 @@ defaults = ['--all']
...
@@ -21,6 +22,5 @@ defaults = ['--all']
[scripts]
[scripts]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs =
eggs = ${test:eggs}
ZEO [test]
interpreter = py
interpreter = py
setup.py
View file @
f7a7c6a7
...
@@ -128,7 +128,7 @@ setup(name="ZEO",
...
@@ -128,7 +128,7 @@ setup(name="ZEO",
classifiers
=
classifiers
,
classifiers
=
classifiers
,
test_suite
=
"__main__.alltests"
,
# to support "setup.py test"
test_suite
=
"__main__.alltests"
,
# to support "setup.py test"
tests_require
=
tests_require
,
tests_require
=
tests_require
,
extras_require
=
dict
(
test
=
tests_require
),
extras_require
=
dict
(
test
=
tests_require
,
uvloop
=
[
'uvloop'
]
),
install_requires
=
install_requires
,
install_requires
=
install_requires
,
zip_safe
=
False
,
zip_safe
=
False
,
entry_points
=
"""
entry_points
=
"""
...
...
src/ZEO/asyncio/client.py
View file @
f7a7c6a7
...
@@ -2,8 +2,13 @@ from .._compat import PY3
...
@@ -2,8 +2,13 @@ from .._compat import PY3
if
PY3
:
if
PY3
:
import
asyncio
import
asyncio
try
:
from
uvloop
import
new_event_loop
except
ImportError
:
from
asyncio
import
new_event_loop
else
:
else
:
import
trollius
as
asyncio
import
trollius
as
asyncio
from
trollius
import
new_event_loop
from
ZEO.Exceptions
import
ClientDisconnected
,
ServerException
from
ZEO.Exceptions
import
ClientDisconnected
,
ServerException
import
concurrent.futures
import
concurrent.futures
...
@@ -836,7 +841,7 @@ class ClientThread(ClientRunner):
...
@@ -836,7 +841,7 @@ class ClientThread(ClientRunner):
def
run
(
self
):
def
run
(
self
):
loop
=
None
loop
=
None
try
:
try
:
loop
=
asyncio
.
new_event_loop
()
loop
=
new_event_loop
()
self
.
setup_delegation
(
loop
)
self
.
setup_delegation
(
loop
)
self
.
started
.
set
()
self
.
started
.
set
()
loop
.
run_forever
()
loop
.
run_forever
()
...
...
src/ZEO/tests/testssl.py
View file @
f7a7c6a7
...
@@ -120,6 +120,7 @@ class SSLConfigTest(ZEOConfigTestBase):
...
@@ -120,6 +120,7 @@ class SSLConfigTest(ZEOConfigTestBase):
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.async'
)
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.async'
)
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.set_event_loop'
)
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.set_event_loop'
)
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.new_event_loop'
)
@
mock
.
patch
((
'asyncio'
if
PY3
else
'trollius'
)
+
'.new_event_loop'
)
@
mock
.
patch
(
'ZEO.asyncio.client.new_event_loop'
)
class
SSLConfigTestMockiavellian
(
ZEOConfigTestBase
):
class
SSLConfigTestMockiavellian
(
ZEOConfigTestBase
):
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
...
...
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