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
33b82936
Commit
33b82936
authored
Apr 06, 2022
by
Jens Vagelpohl
Committed by
GitHub
Apr 06, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #189 from zopefoundation/py310
Python 3.10 support
parents
8d687bbd
2c17b942
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
15 deletions
+25
-15
.github/workflows/tests.yml
.github/workflows/tests.yml
+3
-0
CHANGES.rst
CHANGES.rst
+3
-2
setup.py
setup.py
+1
-0
src/ZEO/tests/testssl.py
src/ZEO/tests/testssl.py
+15
-12
src/ZEO/zconfig.py
src/ZEO/zconfig.py
+2
-1
tox.ini
tox.ini
+1
-0
No files found.
.github/workflows/tests.yml
View file @
33b82936
...
...
@@ -28,6 +28,9 @@ jobs:
-
[
"
3.9"
,
"
py39"
]
-
[
"
3.9"
,
"
py39-msgpack1"
]
-
[
"
3.9"
,
"
py39-uvloop"
]
-
[
"
3.10"
,
"
py310"
]
-
[
"
3.10"
,
"
py310-msgpack1"
]
-
[
"
3.10"
,
"
py310-uvloop"
]
-
[
"
pypy2"
,
"
pypy"
]
-
[
"
pypy3"
,
"
pypy3"
]
-
[
"
pypy3"
,
"
pypy3-msgpack1"
]
...
...
CHANGES.rst
View file @
33b82936
Changelog
=========
5.
3.1
(unreleased)
5.
4.0
(unreleased)
------------------
- Add support for Python 3.10.
- Add ``ConflictError`` to the list of unlogged server exceptions
(the client/its application should determine whether it wants
them logged).
...
...
@@ -20,7 +22,6 @@ Changelog
See `issue 156 <https://github.com/zopefoundation/ZEO/issues/156>`_.
5.3.0 (2022-03-24)
------------------
...
...
setup.py
View file @
33b82936
...
...
@@ -50,6 +50,7 @@ Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
...
...
src/ZEO/tests/testssl.py
View file @
33b82936
...
...
@@ -133,14 +133,17 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
.
close
()
def
assert_context
(
self
,
factory
,
context
,
self
,
server
,
factory
,
context
,
cert
=
(
server_cert
,
server_key
,
None
),
verify_mode
=
ssl
.
CERT_REQUIRED
,
check_hostname
=
False
,
cafile
=
None
,
capath
=
None
,
):
factory
.
assert_called_with
(
ssl
.
Purpose
.
CLIENT_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
ssl
.
Purpose
.
CLIENT_AUTH
if
server
else
ssl
.
Purpose
.
SERVER_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
context
.
load_cert_chain
.
assert_called_with
(
*
cert
)
self
.
assertEqual
(
context
,
factory
.
return_value
)
self
.
assertEqual
(
context
.
verify_mode
,
verify_mode
)
...
...
@@ -157,7 +160,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
=
create_server
(
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
__file__
)
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
factory
,
context
,
cafile
=
__file__
)
self
.
assert_context
(
True
,
factory
,
context
,
cafile
=
__file__
)
server
.
close
()
@
mock
.
patch
(
'ssl.create_default_context'
)
...
...
@@ -165,7 +168,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
=
create_server
(
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
here
)
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
factory
,
context
,
capath
=
here
)
self
.
assert_context
(
True
,
factory
,
context
,
capath
=
here
)
server
.
close
()
@
mock
.
patch
(
'ssl.create_default_context'
)
...
...
@@ -177,7 +180,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
authenticate
=
here
,
)
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
self
.
assert_context
(
True
,
factory
,
context
,
(
server_cert
,
server_key
,
pwfunc
),
capath
=
here
)
server
.
close
()
...
...
@@ -197,7 +200,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
check_hostname
=
True
)
...
...
@@ -213,7 +216,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
capath
=
here
,
check_hostname
=
True
,
...
...
@@ -230,7 +233,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
check_hostname
=
True
,
...
...
@@ -249,7 +252,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
pwfunc
),
cafile
=
server_cert
,
check_hostname
=
True
,
...
...
@@ -266,7 +269,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
'example.com'
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
check_hostname
=
True
,
...
...
@@ -283,7 +286,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
check_hostname
=
False
,
...
...
@@ -362,7 +365,7 @@ def client_ssl(cafile=server_key,
client_key
=
client_key
,
):
context
=
ssl
.
create_default_context
(
ssl
.
Purpose
.
CLIENT
_AUTH
,
cafile
=
server_cert
)
ssl
.
Purpose
.
SERVER
_AUTH
,
cafile
=
server_cert
)
context
.
load_cert_chain
(
client_cert
,
client_key
)
context
.
verify_mode
=
ssl
.
CERT_REQUIRED
...
...
src/ZEO/zconfig.py
View file @
33b82936
...
...
@@ -15,7 +15,8 @@ def ssl_config(section, server):
cafile
=
auth
context
=
ssl
.
create_default_context
(
ssl
.
Purpose
.
CLIENT_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
ssl
.
Purpose
.
CLIENT_AUTH
if
server
else
ssl
.
Purpose
.
SERVER_AUTH
,
cafile
=
cafile
,
capath
=
capath
)
if
not
auth
:
assert
not
server
...
...
tox.ini
View file @
33b82936
...
...
@@ -6,6 +6,7 @@ envlist =
py37
py38
py39
py310
pypy
pypy3
simple
...
...
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