Skip to content

Commit a98f660

Browse files
sentrivanarominf
andauthored
feat: Preliminary support for Python 3.13 (#3200)
Adding preliminary support for Python 3.13. The `_partialmethod` attribute of methods wrapped with `partialmethod()` was renamed to `__partialmethod__` in CPython 3.13: python/cpython#16600 Starting from Python 3.13, `frame.f_locals` is not `dict` anymore, but `FrameLocalsProxy`, that cannot be copied using `copy.copy()`. In Python 3.13 and later, it should be copied using a method `.copy()`. The new way of copying works the same as the old one for versions of Python prior to 3.13, according to the documentation (both copying methods produce a shallow copy). Since Python 3.13, `FrameLocalsProxy` skips items of `locals()` that have non-`str` keys; this is a CPython implementation detail, so we hence disable `test_non_string_variables` test on Python 3.13. See: https://peps.python.org/pep-0667/ python/cpython#118921 python/cpython#118923 https://docs.python.org/3.13/whatsnew/3.13.html#porting-to-python-3-13 https://docs.python.org/3/library/copy.html https://github.com/python/cpython/blame/7b413952e817ae87bfda2ac85dd84d30a6ce743b/Objects/frameobject.c#L148 --------- Co-authored-by: Roman Inflianskas <[email protected]>
1 parent cf8e37f commit a98f660

15 files changed

+43
-11
lines changed

.github/workflows/test-integrations-ai.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox
@@ -96,6 +97,7 @@ jobs:
9697
- uses: actions/setup-python@v5
9798
with:
9899
python-version: ${{ matrix.python-version }}
100+
allow-prereleases: true
99101
- name: Setup Test Env
100102
run: |
101103
pip install coverage tox

.github/workflows/test-integrations-aws-lambda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
- uses: actions/setup-python@v5
7272
with:
7373
python-version: ${{ matrix.python-version }}
74+
allow-prereleases: true
7475
- name: Setup Test Env
7576
run: |
7677
pip install coverage tox

.github/workflows/test-integrations-cloud-computing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox
@@ -92,6 +93,7 @@ jobs:
9293
- uses: actions/setup-python@v5
9394
with:
9495
python-version: ${{ matrix.python-version }}
96+
allow-prereleases: true
9597
- name: Setup Test Env
9698
run: |
9799
pip install coverage tox

.github/workflows/test-integrations-common.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
28+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
2929
# python3.6 reached EOL and is no longer being supported on
3030
# new versions of hosted runners on Github Actions
3131
# ubuntu-20.04 is the last version that supported python3.6
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox

.github/workflows/test-integrations-data-processing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Start Redis
4041
uses: supercharge/[email protected]
4142
- name: Setup Test Env
@@ -102,6 +103,7 @@ jobs:
102103
- uses: actions/setup-python@v5
103104
with:
104105
python-version: ${{ matrix.python-version }}
106+
allow-prereleases: true
105107
- name: Start Redis
106108
uses: supercharge/[email protected]
107109
- name: Setup Test Env

.github/workflows/test-integrations-databases.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- uses: actions/setup-python@v5
5555
with:
5656
python-version: ${{ matrix.python-version }}
57+
allow-prereleases: true
5758
- uses: getsentry/action-clickhouse-in-ci@v1
5859
- name: Setup Test Env
5960
run: |
@@ -137,6 +138,7 @@ jobs:
137138
- uses: actions/setup-python@v5
138139
with:
139140
python-version: ${{ matrix.python-version }}
141+
allow-prereleases: true
140142
- uses: getsentry/action-clickhouse-in-ci@v1
141143
- name: Setup Test Env
142144
run: |

.github/workflows/test-integrations-graphql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox
@@ -92,6 +93,7 @@ jobs:
9293
- uses: actions/setup-python@v5
9394
with:
9495
python-version: ${{ matrix.python-version }}
96+
allow-prereleases: true
9597
- name: Setup Test Env
9698
run: |
9799
pip install coverage tox

.github/workflows/test-integrations-miscellaneous.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox
@@ -96,6 +97,7 @@ jobs:
9697
- uses: actions/setup-python@v5
9798
with:
9899
python-version: ${{ matrix.python-version }}
100+
allow-prereleases: true
99101
- name: Setup Test Env
100102
run: |
101103
pip install coverage tox

.github/workflows/test-integrations-networking.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
39+
allow-prereleases: true
3940
- name: Setup Test Env
4041
run: |
4142
pip install coverage tox
@@ -92,6 +93,7 @@ jobs:
9293
- uses: actions/setup-python@v5
9394
with:
9495
python-version: ${{ matrix.python-version }}
96+
allow-prereleases: true
9597
- name: Setup Test Env
9698
run: |
9799
pip install coverage tox

.github/workflows/test-integrations-web-frameworks-1.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- uses: actions/setup-python@v5
5555
with:
5656
python-version: ${{ matrix.python-version }}
57+
allow-prereleases: true
5758
- name: Setup Test Env
5859
run: |
5960
pip install coverage tox
@@ -128,6 +129,7 @@ jobs:
128129
- uses: actions/setup-python@v5
129130
with:
130131
python-version: ${{ matrix.python-version }}
132+
allow-prereleases: true
131133
- name: Setup Test Env
132134
run: |
133135
pip install coverage tox

0 commit comments

Comments
 (0)