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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
bfc54829
Commit
bfc54829
authored
Apr 25, 2021
by
Jeremy Kolbe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#165 more accurate asyncio.CancelledError handling
parent
d5f63832
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
CHANGES.rst
CHANGES.rst
+6
-0
setup.py
setup.py
+2
-0
src/ZEO/asyncio/client.py
src/ZEO/asyncio/client.py
+12
-2
tox.ini
tox.ini
+30
-0
No files found.
CHANGES.rst
View file @
bfc54829
...
...
@@ -10,6 +10,12 @@ Changelog
- Improve log message when client cache is out of sync with server.
See `issue 142 <https://github.com/zopefoundation/ZEO/issues/142>`_.
- Add support for Python 3.8 and Python 3.9.
- Add more accurate error handling for ``asyncio.CancelledError``.
See `issue 165 <https://github.com/zopefoundation/ZEO/issues/165>`_.
5.2.2 (2020-08-11)
------------------
...
...
setup.py
View file @
bfc54829
...
...
@@ -48,6 +48,8 @@ Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
...
...
src/ZEO/asyncio/client.py
View file @
bfc54829
...
...
@@ -410,7 +410,10 @@ class Client(object):
def
_clear_protocols
(
self
,
protocol
=
None
):
for
p
in
self
.
protocols
:
if
p
is
not
protocol
:
p
.
close
()
try
:
p
.
close
()
except
asyncio
.
CancelledError
:
continue
self
.
protocols
=
()
def
disconnected
(
self
,
protocol
=
None
):
...
...
@@ -483,7 +486,14 @@ class Client(object):
protocol
=
self
.
protocol
if
server_tid
is
None
:
server_tid
=
yield
protocol
.
fut
(
'lastTransaction'
)
try
:
server_tid
=
yield
protocol
.
fut
(
'lastTransaction'
)
except
ClientDisconnected
as
exc
:
# If needed, after consideration more exceptions can be
# caught here. Possibly you want to include this into the
# following try clause.
del
self
.
protocol
self
.
register_failed
(
protocol
,
exc
)
try
:
cache
=
self
.
cache
...
...
tox.ini
View file @
bfc54829
...
...
@@ -4,6 +4,8 @@ envlist =
py35
py36
py37
py38
py39
pypy
pypy3
simple
...
...
@@ -67,6 +69,34 @@ deps =
{
[testenv]
deps}
uvloop
[testenv:py38-mtacceptor]
setenv
=
ZEO_MTACCEPTOR
=
1
[testenv:py38-mtacceptor-msgpack1]
setenv
=
ZEO_MTACCEPTOR
=
1
ZEO_MSGPACK
=
1
[testenv:py38-uvloop]
deps
=
{
[testenv]
deps}
uvloop
[testenv:py39-mtacceptor]
setenv
=
ZEO_MTACCEPTOR
=
1
[testenv:py39-mtacceptor-msgpack1]
setenv
=
ZEO_MTACCEPTOR
=
1
ZEO_MSGPACK
=
1
[testenv:py39-uvloop]
deps
=
{
[testenv]
deps}
uvloop
[testenv:pypy3-mtacceptor]
setenv
=
ZEO_MTACCEPTOR
=
1
...
...
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