From a9bd0a75ceee5a64c22a14e578a4c7f13e04b184 Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Thu, 3 Aug 2023 18:11:36 +0200 Subject: [PATCH] add 3.11 and 3.12 to CI --- .github/workflows/ci.yml | 22 +++++++++++++++++++++- setup.py | 3 +++ tlslite/api.py | 10 +++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c192fe4b..2ea3e0b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,12 @@ jobs: - name: py3.10 os: ubuntu-latest python-version: '3.10' + - name: py3.11 + os: ubuntu-latest + python-version: '3.11' + - name: py3.12 + os: ubuntu-latest + python-version: '3.12.0-beta.4' - name: py2.6 os: ubuntu-latest container: centos:6 @@ -70,6 +76,10 @@ jobs: os: ubuntu-latest python-version: '3.10' opt-deps: ['m2crypto'] + - name: py3.11 with m2crypto + os: ubuntu-latest + python-version: '3.11' + opt-deps: ['m2crypto'] - name: py2.7 with pycrypto os: ubuntu-20.04 python-version: 2.7 @@ -107,6 +117,7 @@ jobs: opt-deps: ['gmpy'] - name: py3.10 with gmpy os: ubuntu-latest + # 3.10 is the last version gmpy builds with python-version: '3.10' opt-deps: ['gmpy'] - name: py2.7 with gmpy2 @@ -133,6 +144,10 @@ jobs: os: ubuntu-latest python-version: '3.10' opt-deps: ['gmpy2'] + - name: py3.11 with gmpy2 + os: ubuntu-latest + python-version: '3.11' + opt-deps: ['gmpy2'] # finally test with multiple dependencies installed at the same time - name: py2.7 with m2crypto, pycrypto, gmpy, and gmpy2 os: ubuntu-20.04 @@ -157,8 +172,13 @@ jobs: - name: py3.10 with m2crypto, gmpy, and gmpy2 os: ubuntu-latest python-version: '3.10' + opt-deps: ['m2crypto', 'gmpy', 'gmpy2'] + - name: py3.11 with m2crypto, gmpy, and gmpy2 + os: ubuntu-latest + python-version: '3.11' + # gmpy doesn't build with 3.11 # coverage to codeclimate can be submitted just once - opt-deps: ['m2crypto', 'gmpy', 'gmpy2', 'codeclimate'] + opt-deps: ['m2crypto', 'gmpy2', 'codeclimate'] steps: - uses: actions/checkout@v2 if: ${{ !matrix.container }} diff --git a/setup.py b/setup.py index 28b97743..93389f61 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,9 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Security :: Cryptography', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Networking' diff --git a/tlslite/api.py b/tlslite/api.py index 2b5beed2..81e4eadf 100644 --- a/tlslite/api.py +++ b/tlslite/api.py @@ -2,6 +2,9 @@ # See the LICENSE file for legal information regarding use of this file. __version__ = "0.8.0-alpha45" +# the whole module is about importing most commonly used methods, for use +# by other applications +# pylint: disable=unused-import from .constants import AlertLevel, AlertDescription, Fault from .errors import * from .checker import Checker @@ -15,7 +18,12 @@ from .integration.httptlsconnection import HTTPTLSConnection from .integration.tlssocketservermixin import TLSSocketServerMixIn -from .integration.tlsasyncdispatchermixin import TLSAsyncDispatcherMixIn +try: + from .integration.tlsasyncdispatchermixin import TLSAsyncDispatcherMixIn +except ModuleNotFoundError: + # asyncore was removed in 3.12, I don't use use it, so don't know how + # to fix it + pass from .integration.pop3_tls import POP3_TLS from .integration.imap4_tls import IMAP4_TLS from .integration.smtp_tls import SMTP_TLS