Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on Python 3.11 and PostgreSQL 15, fix workflow deprecations #968

Merged
merged 1 commit into from Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Expand Up @@ -37,7 +37,7 @@ jobs:
mkdir -p dist/
echo "${VERSION}" > dist/VERSION

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
Expand All @@ -50,7 +50,7 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true
Expand All @@ -63,7 +63,7 @@ jobs:
pip install -U setuptools wheel pip
python setup.py sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.*
Expand All @@ -74,7 +74,7 @@ jobs:
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install cibuildwheel==2.10.2
- id: set-matrix
Expand All @@ -86,7 +86,7 @@ jobs:
&& cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo ::set-output name=include::"$MATRIX_INCLUDE"
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT

build-wheels:
needs: build-wheels-matrix
Expand All @@ -106,11 +106,11 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
Expand All @@ -123,7 +123,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*.whl
Expand All @@ -137,7 +137,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: true
Expand All @@ -153,7 +153,7 @@ jobs:
make htmldocs

- name: Checkout gh-pages
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 5
ref: gh-pages
Expand All @@ -179,12 +179,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: false

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
Expand All @@ -193,7 +193,7 @@ jobs:
id: relver
run: |
set -e
echo ::set-output name=version::$(cat dist/VERSION)
echo "version=$(cat dist/VERSION)" >> $GITHUB_OUTPUT
rm dist/VERSION

- name: Merge and tag the PR
Expand All @@ -219,7 +219,7 @@ jobs:
ls -al dist/

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
# job.
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc.2"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
loop: [asyncio, uvloop]
exclude:
Expand All @@ -35,7 +35,7 @@ jobs:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true
Expand All @@ -51,7 +51,7 @@ jobs:
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
if: steps.release.outputs.version == 0
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -76,15 +76,15 @@ jobs:
test-postgres:
strategy:
matrix:
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14"]
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15"]

runs-on: ubuntu-latest

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true
Expand All @@ -111,7 +111,7 @@ jobs:
>> "${GITHUB_ENV}"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
if: steps.release.outputs.version == 0

- name: Install Python Deps
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -14,7 +14,7 @@ framework. You can read more about asyncpg in an introductory
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.

asyncpg requires Python 3.7 or later and is supported for PostgreSQL
versions 9.5 to 14. Older PostgreSQL versions or other databases implementing
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.


Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -15,7 +15,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
framework.

**asyncpg** requires Python 3.7 or later and is supported for PostgreSQL
versions 9.5 to 14. Older PostgreSQL versions or other databases implementing
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.

Contents
Expand Down
4 changes: 3 additions & 1 deletion tests/test_connect.py
Expand Up @@ -1287,6 +1287,7 @@ def setUp(self):

create_script = []
create_script.append('CREATE ROLE ssl_user WITH LOGIN;')
create_script.append('GRANT ALL ON SCHEMA public TO ssl_user;')

self._add_hba_entry()

Expand All @@ -1301,6 +1302,7 @@ def tearDown(self):
self.cluster.trust_local_connections()

drop_script = []
drop_script.append('REVOKE ALL ON SCHEMA public FROM ssl_user;')
drop_script.append('DROP ROLE ssl_user;')
drop_script = '\n'.join(drop_script)
self.loop.run_until_complete(self.con.execute(drop_script))
Expand Down Expand Up @@ -1461,7 +1463,7 @@ async def test_executemany_uvloop_ssl_issue_700(self):
)
finally:
try:
await con.execute('DROP TABLE test_many')
await con.execute('DROP TABLE IF EXISTS test_many')
finally:
await con.close()

Expand Down