Merge pull request #1628 from MVrachev/add-python3.10

Add python3.10 and fix test failures on python3.10
This commit is contained in:
Jussi Kukkonen 2021-10-21 14:40:43 +03:00 committed by GitHub
commit 69eb29fc80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View file

@ -15,7 +15,7 @@ jobs:
# Run regular TUF tests on each OS/Python combination, plus special tests
# (sslib master) and linters on Linux/Python3.x only.
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
toxenv: [py]
include:

View file

@ -101,6 +101,7 @@
'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',
'Topic :: Security',
'Topic :: Software Development'

View file

@ -22,8 +22,8 @@
to verify that https downloads are permitted.
<Reference>
ssl.wrap_socket:
https://docs.python.org/2/library/ssl.html#functions-constants-and-exceptions
ssl.SSLContext.wrap_socket:
https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket
SimpleHTTPServer:
http://docs.python.org/library/simplehttpserver.html#module-SimpleHTTPServer
@ -44,8 +44,9 @@
httpd = http.server.HTTPServer(('localhost', 0),
http.server.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(
httpd.socket, keyfile=keyfile, certfile=certfile, server_side=True)
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.load_cert_chain(certfile, keyfile)
httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
port_message = 'bind succeeded, server port is: ' \
+ str(httpd.server_address[1])

View file

@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = lint,py{36,37,38,39}
envlist = lint,py{36,37,38,39,310}
skipsdist = true
[testenv]