diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97fb371ebd..e4367a04b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/setup.py b/setup.py index b5b3ad746e..0716124e07 100755 --- a/setup.py +++ b/setup.py @@ -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' diff --git a/tests/simple_https_server.py b/tests/simple_https_server.py index 29b6e40ab7..68d0512f93 100755 --- a/tests/simple_https_server.py +++ b/tests/simple_https_server.py @@ -22,8 +22,8 @@ to verify that https downloads are permitted. - 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]) diff --git a/tox.ini b/tox.ini index 48475539be..b8359b7772 100644 --- a/tox.ini +++ b/tox.ini @@ -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]