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
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:
...
@@ -28,6 +28,9 @@ jobs:
-
[
"
3.9"
,
"
py39"
]
-
[
"
3.9"
,
"
py39"
]
-
[
"
3.9"
,
"
py39-msgpack1"
]
-
[
"
3.9"
,
"
py39-msgpack1"
]
-
[
"
3.9"
,
"
py39-uvloop"
]
-
[
"
3.9"
,
"
py39-uvloop"
]
-
[
"
3.10"
,
"
py310"
]
-
[
"
3.10"
,
"
py310-msgpack1"
]
-
[
"
3.10"
,
"
py310-uvloop"
]
-
[
"
pypy2"
,
"
pypy"
]
-
[
"
pypy2"
,
"
pypy"
]
-
[
"
pypy3"
,
"
pypy3"
]
-
[
"
pypy3"
,
"
pypy3"
]
-
[
"
pypy3"
,
"
pypy3-msgpack1"
]
-
[
"
pypy3"
,
"
pypy3-msgpack1"
]
...
...
CHANGES.rst
View file @
33b82936
Changelog
Changelog
=========
=========
5.
3.1
(unreleased)
5.
4.0
(unreleased)
------------------
------------------
- Add support for Python 3.10.
- Add ``ConflictError`` to the list of unlogged server exceptions
- Add ``ConflictError`` to the list of unlogged server exceptions
(the client/its application should determine whether it wants
(the client/its application should determine whether it wants
them logged).
them logged).
...
@@ -20,7 +22,6 @@ Changelog
...
@@ -20,7 +22,6 @@ Changelog
See `issue 156 <https://github.com/zopefoundation/ZEO/issues/156>`_.
See `issue 156 <https://github.com/zopefoundation/ZEO/issues/156>`_.
5.3.0 (2022-03-24)
5.3.0 (2022-03-24)
------------------
------------------
...
...
setup.py
View file @
33b82936
...
@@ -50,6 +50,7 @@ Programming Language :: Python :: 3.6
...
@@ -50,6 +50,7 @@ Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
Topic :: Database
...
...
src/ZEO/tests/testssl.py
View file @
33b82936
...
@@ -133,14 +133,17 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -133,14 +133,17 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
.
close
()
server
.
close
()
def
assert_context
(
def
assert_context
(
self
,
factory
,
context
,
self
,
server
,
factory
,
context
,
cert
=
(
server_cert
,
server_key
,
None
),
cert
=
(
server_cert
,
server_key
,
None
),
verify_mode
=
ssl
.
CERT_REQUIRED
,
verify_mode
=
ssl
.
CERT_REQUIRED
,
check_hostname
=
False
,
check_hostname
=
False
,
cafile
=
None
,
capath
=
None
,
cafile
=
None
,
capath
=
None
,
):
):
factory
.
assert_called_with
(
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
)
context
.
load_cert_chain
.
assert_called_with
(
*
cert
)
self
.
assertEqual
(
context
,
factory
.
return_value
)
self
.
assertEqual
(
context
,
factory
.
return_value
)
self
.
assertEqual
(
context
.
verify_mode
,
verify_mode
)
self
.
assertEqual
(
context
.
verify_mode
,
verify_mode
)
...
@@ -157,7 +160,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -157,7 +160,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
=
create_server
(
server
=
create_server
(
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
__file__
)
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
__file__
)
context
=
server
.
acceptor
.
ssl_context
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
factory
,
context
,
cafile
=
__file__
)
self
.
assert_context
(
True
,
factory
,
context
,
cafile
=
__file__
)
server
.
close
()
server
.
close
()
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
...
@@ -165,7 +168,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -165,7 +168,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
server
=
create_server
(
server
=
create_server
(
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
here
)
certificate
=
server_cert
,
key
=
server_key
,
authenticate
=
here
)
context
=
server
.
acceptor
.
ssl_context
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
factory
,
context
,
capath
=
here
)
self
.
assert_context
(
True
,
factory
,
context
,
capath
=
here
)
server
.
close
()
server
.
close
()
@
mock
.
patch
(
'ssl.create_default_context'
)
@
mock
.
patch
(
'ssl.create_default_context'
)
...
@@ -177,7 +180,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -177,7 +180,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
authenticate
=
here
,
authenticate
=
here
,
)
)
context
=
server
.
acceptor
.
ssl_context
context
=
server
.
acceptor
.
ssl_context
self
.
assert_context
(
self
.
assert_context
(
True
,
factory
,
context
,
(
server_cert
,
server_key
,
pwfunc
),
capath
=
here
)
factory
,
context
,
(
server_cert
,
server_key
,
pwfunc
),
capath
=
here
)
server
.
close
()
server
.
close
()
...
@@ -197,7 +200,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -197,7 +200,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
check_hostname
=
True
)
check_hostname
=
True
)
...
@@ -213,7 +216,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -213,7 +216,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
capath
=
here
,
capath
=
here
,
check_hostname
=
True
,
check_hostname
=
True
,
...
@@ -230,7 +233,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -230,7 +233,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
cafile
=
server_cert
,
check_hostname
=
True
,
check_hostname
=
True
,
...
@@ -249,7 +252,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -249,7 +252,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
pwfunc
),
factory
,
context
,
(
client_cert
,
client_key
,
pwfunc
),
cafile
=
server_cert
,
cafile
=
server_cert
,
check_hostname
=
True
,
check_hostname
=
True
,
...
@@ -266,7 +269,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -266,7 +269,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
'example.com'
)
'example.com'
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
cafile
=
server_cert
,
check_hostname
=
True
,
check_hostname
=
True
,
...
@@ -283,7 +286,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
...
@@ -283,7 +286,7 @@ class SSLConfigTestMockiavellian(ZEOConfigTestBase):
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
context
=
ClientStorage
.
call_args
[
1
][
'ssl'
]
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
self
.
assertEqual
(
ClientStorage
.
call_args
[
1
][
'ssl_server_hostname'
],
None
)
None
)
self
.
assert_context
(
self
.
assert_context
(
False
,
factory
,
context
,
(
client_cert
,
client_key
,
None
),
factory
,
context
,
(
client_cert
,
client_key
,
None
),
cafile
=
server_cert
,
cafile
=
server_cert
,
check_hostname
=
False
,
check_hostname
=
False
,
...
@@ -362,7 +365,7 @@ def client_ssl(cafile=server_key,
...
@@ -362,7 +365,7 @@ def client_ssl(cafile=server_key,
client_key
=
client_key
,
client_key
=
client_key
,
):
):
context
=
ssl
.
create_default_context
(
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
.
load_cert_chain
(
client_cert
,
client_key
)
context
.
verify_mode
=
ssl
.
CERT_REQUIRED
context
.
verify_mode
=
ssl
.
CERT_REQUIRED
...
...
src/ZEO/zconfig.py
View file @
33b82936
...
@@ -15,7 +15,8 @@ def ssl_config(section, server):
...
@@ -15,7 +15,8 @@ def ssl_config(section, server):
cafile
=
auth
cafile
=
auth
context
=
ssl
.
create_default_context
(
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
:
if
not
auth
:
assert
not
server
assert
not
server
...
...
tox.ini
View file @
33b82936
...
@@ -6,6 +6,7 @@ envlist =
...
@@ -6,6 +6,7 @@ envlist =
py37
py37
py38
py38
py39
py39
py310
pypy
pypy
pypy3
pypy3
simple
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