Skip to content

Commit 69eb29f

Browse files
author
Jussi Kukkonen
authored
Merge pull request #1628 from MVrachev/add-python3.10
Add python3.10 and fix test failures on python3.10
2 parents 0cf6ba2 + 2e94e39 commit 69eb29f

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# Run regular TUF tests on each OS/Python combination, plus special tests
1616
# (sslib master) and linters on Linux/Python3.x only.
1717
matrix:
18-
python-version: [3.6, 3.7, 3.8, 3.9]
18+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
1919
os: [ubuntu-latest, macos-latest, windows-latest]
2020
toxenv: [py]
2121
include:

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
'Programming Language :: Python :: 3.7',
102102
'Programming Language :: Python :: 3.8',
103103
'Programming Language :: Python :: 3.9',
104+
'Programming Language :: Python :: 3.10',
104105
'Programming Language :: Python :: Implementation :: CPython',
105106
'Topic :: Security',
106107
'Topic :: Software Development'

tests/simple_https_server.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
to verify that https downloads are permitted.
2323
2424
<Reference>
25-
ssl.wrap_socket:
26-
https://docs.python.org/2/library/ssl.html#functions-constants-and-exceptions
25+
ssl.SSLContext.wrap_socket:
26+
https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket
2727
2828
SimpleHTTPServer:
2929
http://docs.python.org/library/simplehttpserver.html#module-SimpleHTTPServer
@@ -44,8 +44,9 @@
4444
httpd = http.server.HTTPServer(('localhost', 0),
4545
http.server.SimpleHTTPRequestHandler)
4646

47-
httpd.socket = ssl.wrap_socket(
48-
httpd.socket, keyfile=keyfile, certfile=certfile, server_side=True)
47+
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
48+
context.load_cert_chain(certfile, keyfile)
49+
httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
4950

5051
port_message = 'bind succeeded, server port is: ' \
5152
+ str(httpd.server_address[1])

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = lint,py{36,37,38,39}
7+
envlist = lint,py{36,37,38,39,310}
88
skipsdist = true
99

1010
[testenv]

0 commit comments

Comments
 (0)