diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c9a366d..31af4d27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,13 +50,14 @@ jobs: PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 50 submodules: true + persist-credentials: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.x" @@ -76,18 +77,20 @@ jobs: outputs: include: ${{ steps.set-matrix.outputs.include }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + with: + persist-credentials: false + - uses: actions/setup-python@v6 with: python-version: "3.x" - - run: pip install cibuildwheel==2.21.3 + - run: pip install cibuildwheel==3.2.1 - id: set-matrix run: | MATRIX_INCLUDE=$( { - cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ - && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + cibuildwheel --print-build-identifiers --platform linux --archs x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --archs x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT @@ -110,16 +113,17 @@ jobs: PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 50 submodules: true + persist-credentials: false - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - - uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3 + - uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1 with: only: ${{ matrix.only }} env: @@ -149,13 +153,14 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 5 submodules: true + persist-credentials: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.x" @@ -165,11 +170,12 @@ jobs: make htmldocs - name: Checkout gh-pages - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 5 ref: gh-pages path: docs/gh-pages + persist-credentials: false - name: Sync docs run: | @@ -200,10 +206,11 @@ jobs: deployments: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 5 submodules: false + persist-credentials: false - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a4869312..1c55524a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: # job. strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest, macos-latest, windows-latest] loop: [asyncio, uvloop] exclude: @@ -27,6 +27,8 @@ jobs: runs-on: ${{ matrix.os }} + permissions: {} + defaults: run: shell: bash @@ -35,10 +37,11 @@ jobs: PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 50 submodules: true + persist-credentials: false - name: Check if release PR. uses: edgedb/action-release/validate-pr@master @@ -56,7 +59,7 @@ jobs: brew install postgresql - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 if: "!steps.release.outputs.is_release" with: python-version: ${{ matrix.python-version }} @@ -86,14 +89,17 @@ jobs: runs-on: ubuntu-latest + permissions: {} + env: PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 50 submodules: true + persist-credentials: false - name: Check if release PR. uses: edgedb/action-release/validate-pr@master @@ -117,7 +123,7 @@ jobs: >> "${GITHUB_ENV}" - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 if: "!steps.release.outputs.is_release" with: python-version: "3.x" @@ -142,6 +148,7 @@ jobs: name: "Regression Tests" needs: [test-platforms, test-postgres] runs-on: ubuntu-latest + permissions: {} steps: - run: echo OK diff --git a/README.rst b/README.rst index 32fd1693..70751b50 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio`` framework. You can read more about asyncpg in an introductory `blog post `_. -asyncpg requires Python 3.8 or later and is supported for PostgreSQL +asyncpg requires Python 3.9 or later and is supported for PostgreSQL versions 9.5 to 17. Other PostgreSQL versions or other databases implementing the PostgreSQL protocol *may* work, but are not being actively tested. diff --git a/docs/index.rst b/docs/index.rst index e0f91813..bbad4397 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,7 +15,7 @@ PostgreSQL and Python/asyncio. asyncpg is an efficient, clean implementation of PostgreSQL server binary protocol for use with Python's ``asyncio`` framework. -**asyncpg** requires Python 3.8 or later and is supported for PostgreSQL +**asyncpg** requires Python 3.9 or later and is supported for PostgreSQL versions 9.5 to 17. Other PostgreSQL versions or other databases implementing the PostgreSQL protocol *may* work, but are not being actively tested. diff --git a/pyproject.toml b/pyproject.toml index dabb7d8b..9bdcc378 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ description = "An asyncio PostgreSQL driver" authors = [{name = "MagicStack Inc", email = "hello@magic.io"}] requires-python = '>=3.8.0' readme = "README.rst" -license = {text = "Apache License, Version 2.0"} +license = "Apache-2.0" +license-files = ["LICENSE"] dynamic = ["version"] keywords = [ "database", @@ -14,16 +15,15 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3 :: Only", - "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", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Database :: Front-Ends", ] @@ -56,8 +56,7 @@ docs = [ [build-system] requires = [ - "setuptools>=60", - "wheel", + "setuptools>=77.0.3", "Cython(>=0.29.24,<4.0.0)" ] build-backend = "setuptools.build_meta" @@ -74,6 +73,7 @@ include = ["asyncpg", "asyncpg.*"] [tool.cibuildwheel] build-frontend = "build" test-extras = "test" +skip = "cp38-*" [tool.cibuildwheel.macos] before-all = ".github/workflows/install-postgres.sh" diff --git a/setup.py b/setup.py index 5f2709d7..29e9d612 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ import sys -if sys.version_info < (3, 8): - raise RuntimeError('asyncpg requires Python 3.8 or greater') +if sys.version_info < (3, 9): + raise RuntimeError('asyncpg requires Python 3.9 or greater') import os import os.path