diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8879d2b2..aba5e9c6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,9 +1,9 @@ name: docs on: - pull_request: ~ push: branches: - master + pull_request: concurrency: cancel-in-progress: true @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Build docs run: | cd docs && make check diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e65b5470..3b04a968 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,6 @@ on: branches: - master pull_request: - branches: - - master concurrency: cancel-in-progress: true @@ -19,7 +17,7 @@ jobs: strategy: matrix: python-version: - - '3.11' + - '3.12' steps: - name: Checkout uses: actions/checkout@v2 @@ -49,12 +47,14 @@ jobs: name: Tests with Python ${{ matrix.python-version }} runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: - '3.8' - '3.9' - '3.10' - '3.11' + - '3.12' steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3380d006..65e92755 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,13 +12,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install setuptools and wheel run: | - python -m pip install --upgrade pip setuptools wheel packaging + python -m pip install --upgrade build pip setuptools wheel packaging - name: Build sdist and wheel run: | - python setup.py sdist bdist_wheel + python -m build - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@v1.1.0 with: diff --git a/.readthedocs.yml b/.readthedocs.yml index a9437a2c..a63f4fd5 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: "ubuntu-22.04" tools: - python: "3.11" + python: "3.12" sphinx: builder: html diff --git a/CHANGES.rst b/CHANGES.rst index 6f613512..1494f4c4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ Changes for croud Unreleased ========== +- Added support for Python 3.12 + 1.12.0 - 2024/08/30 =================== diff --git a/setup.py b/setup.py index 618f2c9b..a44d8a21 100644 --- a/setup.py +++ b/setup.py @@ -87,5 +87,6 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) diff --git a/tests/util/fake_cloud.py b/tests/util/fake_cloud.py index 3081f218..da46e2bb 100644 --- a/tests/util/fake_cloud.py +++ b/tests/util/fake_cloud.py @@ -51,10 +51,16 @@ def __init__(self, *args, **kwargs): here = pathlib.Path(__file__) self.ssl_cert = here.parent / "server.crt" ssl_key = here.parent / "server.key" - self.socket = ssl.wrap_socket( # type: ignore[attr-defined] + + # Instances of SSLSocket must be created using the + # `SSLContext.wrap_socket()` method. + # https://docs.python.org/3.12/library/ssl.html#socket-creation + context = ssl.create_default_context() + context.check_hostname = False + context.load_cert_chain(certfile=str(self.ssl_cert), keyfile=str(ssl_key)) + + self.socket = context.wrap_socket( # type: ignore[attr-defined] self.socket, - keyfile=str(ssl_key), - certfile=str(self.ssl_cert), server_side=True, ) diff --git a/tox.ini b/tox.ini index 1a93b55d..e2a7bb13 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311 +envlist = py38,py39,py310,py311,py312 [testenv] deps = -e{toxinidir}[testing]