Skip to content

Commit eab7fdf

Browse files
authored
Test on Python 3.11 and PostgreSQL 15, fix workflow deprecations (#968)
1 parent bb0cb39 commit eab7fdf

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

Diff for: .github/workflows/release.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
mkdir -p dist/
3838
echo "${VERSION}" > dist/VERSION
3939
40-
- uses: actions/upload-artifact@v2
40+
- uses: actions/upload-artifact@v3
4141
with:
4242
name: dist
4343
path: dist/
@@ -50,7 +50,7 @@ jobs:
5050
PIP_DISABLE_PIP_VERSION_CHECK: 1
5151

5252
steps:
53-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
5454
with:
5555
fetch-depth: 50
5656
submodules: true
@@ -63,7 +63,7 @@ jobs:
6363
pip install -U setuptools wheel pip
6464
python setup.py sdist
6565
66-
- uses: actions/upload-artifact@v2
66+
- uses: actions/upload-artifact@v3
6767
with:
6868
name: dist
6969
path: dist/*.tar.*
@@ -74,7 +74,7 @@ jobs:
7474
outputs:
7575
include: ${{ steps.set-matrix.outputs.include }}
7676
steps:
77-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v3
7878
- uses: actions/setup-python@v4
7979
- run: pip install cibuildwheel==2.10.2
8080
- id: set-matrix
@@ -86,7 +86,7 @@ jobs:
8686
&& cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": inputs, "os": "windows-latest"}'
8787
} | jq -sc
8888
)
89-
echo ::set-output name=include::"$MATRIX_INCLUDE"
89+
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
9090
9191
build-wheels:
9292
needs: build-wheels-matrix
@@ -106,11 +106,11 @@ jobs:
106106
PIP_DISABLE_PIP_VERSION_CHECK: 1
107107

108108
steps:
109-
- uses: actions/checkout@v2
109+
- uses: actions/checkout@v3
110110
with:
111111
fetch-depth: 50
112112
submodules: true
113-
113+
114114
- name: Set up QEMU
115115
if: runner.os == 'Linux'
116116
uses: docker/setup-qemu-action@v2
@@ -123,7 +123,7 @@ jobs:
123123
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
124124
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
125125

126-
- uses: actions/upload-artifact@v2
126+
- uses: actions/upload-artifact@v3
127127
with:
128128
name: dist
129129
path: wheelhouse/*.whl
@@ -137,7 +137,7 @@ jobs:
137137

138138
steps:
139139
- name: Checkout source
140-
uses: actions/checkout@v2
140+
uses: actions/checkout@v3
141141
with:
142142
fetch-depth: 5
143143
submodules: true
@@ -153,7 +153,7 @@ jobs:
153153
make htmldocs
154154
155155
- name: Checkout gh-pages
156-
uses: actions/checkout@v2
156+
uses: actions/checkout@v3
157157
with:
158158
fetch-depth: 5
159159
ref: gh-pages
@@ -179,12 +179,12 @@ jobs:
179179
runs-on: ubuntu-latest
180180

181181
steps:
182-
- uses: actions/checkout@v2
182+
- uses: actions/checkout@v3
183183
with:
184184
fetch-depth: 5
185185
submodules: false
186186

187-
- uses: actions/download-artifact@v2
187+
- uses: actions/download-artifact@v3
188188
with:
189189
name: dist
190190
path: dist/
@@ -193,7 +193,7 @@ jobs:
193193
id: relver
194194
run: |
195195
set -e
196-
echo ::set-output name=version::$(cat dist/VERSION)
196+
echo "version=$(cat dist/VERSION)" >> $GITHUB_OUTPUT
197197
rm dist/VERSION
198198
199199
- name: Merge and tag the PR
@@ -219,7 +219,7 @@ jobs:
219219
ls -al dist/
220220
221221
- name: Upload to PyPI
222-
uses: pypa/gh-action-pypi-publish@master
222+
uses: pypa/gh-action-pypi-publish@release/v1
223223
with:
224224
user: __token__
225225
password: ${{ secrets.PYPI_TOKEN }}

Diff for: .github/workflows/tests.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# job.
1818
strategy:
1919
matrix:
20-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc.2"]
20+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
loop: [asyncio, uvloop]
2323
exclude:
@@ -35,7 +35,7 @@ jobs:
3535
PIP_DISABLE_PIP_VERSION_CHECK: 1
3636

3737
steps:
38-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v3
3939
with:
4040
fetch-depth: 50
4141
submodules: true
@@ -51,7 +51,7 @@ jobs:
5151
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
5252
5353
- name: Set up Python ${{ matrix.python-version }}
54-
uses: actions/setup-python@v2
54+
uses: actions/setup-python@v4
5555
if: steps.release.outputs.version == 0
5656
with:
5757
python-version: ${{ matrix.python-version }}
@@ -76,15 +76,15 @@ jobs:
7676
test-postgres:
7777
strategy:
7878
matrix:
79-
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14"]
79+
postgres-version: ["9.5", "9.6", "10", "11", "12", "13", "14", "15"]
8080

8181
runs-on: ubuntu-latest
8282

8383
env:
8484
PIP_DISABLE_PIP_VERSION_CHECK: 1
8585

8686
steps:
87-
- uses: actions/checkout@v2
87+
- uses: actions/checkout@v3
8888
with:
8989
fetch-depth: 50
9090
submodules: true
@@ -111,7 +111,7 @@ jobs:
111111
>> "${GITHUB_ENV}"
112112
113113
- name: Set up Python ${{ matrix.python-version }}
114-
uses: actions/setup-python@v2
114+
uses: actions/setup-python@v4
115115
if: steps.release.outputs.version == 0
116116

117117
- name: Install Python Deps

Diff for: README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ framework. You can read more about asyncpg in an introductory
1414
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.
1515

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

2020

Diff for: docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
1515
framework.
1616

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

2121
Contents

Diff for: tests/test_connect.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@ def setUp(self):
12871287

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

12911292
self._add_hba_entry()
12921293

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

13031304
drop_script = []
1305+
drop_script.append('REVOKE ALL ON SCHEMA public FROM ssl_user;')
13041306
drop_script.append('DROP ROLE ssl_user;')
13051307
drop_script = '\n'.join(drop_script)
13061308
self.loop.run_until_complete(self.con.execute(drop_script))
@@ -1461,7 +1463,7 @@ async def test_executemany_uvloop_ssl_issue_700(self):
14611463
)
14621464
finally:
14631465
try:
1464-
await con.execute('DROP TABLE test_many')
1466+
await con.execute('DROP TABLE IF EXISTS test_many')
14651467
finally:
14661468
await con.close()
14671469

0 commit comments

Comments
 (0)