Skip to content

Commit c44e782

Browse files
tkumor3dependabot[bot]ddoktorski
authored
Add support for Python 3.12 (#1272)
* Bump the dev-dependencies group with 13 updates Bumps the dev-dependencies group with 13 updates: | Package | From | To | | --- | --- | --- | | [pytest](https://github.com/pytest-dev/pytest) | `7.4.0` | `7.4.4` | | [black](https://github.com/psf/black) | `23.7.0` | `23.12.1` | | [poethepoet](https://github.com/nat-n/poethepoet) | `0.22.0` | `0.24.4` | | [coverage](https://github.com/nedbat/coveragepy) | `7.3.0` | `7.4.0` | | [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) | `0.21.1` | `0.23.3` | | [pylint](https://github.com/pylint-dev/pylint) | `2.17.5` | `3.0.3` | | [setuptools](https://github.com/pypa/setuptools) | `68.1.2` | `69.0.3` | | [pytest-mock](https://github.com/pytest-dev/pytest-mock) | `3.11.1` | `3.12.0` | | [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) | `3.3.1` | `3.5.0` | | [pyright](https://github.com/RobertCraigie/pyright-python) | `1.1.325` | `1.1.345` | | [isort](https://github.com/pycqa/isort) | `5.12.0` | `5.13.2` | | [pytest-rerunfailures](https://github.com/pytest-dev/pytest-rerunfailures) | `12.0` | `13.0` | | [cairo-lang](https://github.com/starkware-libs/cairo-lang) | `0.12.2` | `0.13.0` | Updates `pytest` from 7.4.0 to 7.4.4 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.4.0...7.4.4) Updates `black` from 23.7.0 to 23.12.1 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.7.0...23.12.1) Updates `poethepoet` from 0.22.0 to 0.24.4 - [Release notes](https://github.com/nat-n/poethepoet/releases) - [Commits](nat-n/poethepoet@v0.22.0...v0.24.4) Updates `coverage` from 7.3.0 to 7.4.0 - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.3.0...7.4.0) Updates `pytest-asyncio` from 0.21.1 to 0.23.3 - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.21.1...v0.23.3) Updates `pylint` from 2.17.5 to 3.0.3 - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](pylint-dev/pylint@v2.17.5...v3.0.3) Updates `setuptools` from 68.1.2 to 69.0.3 - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](pypa/setuptools@v68.1.2...v69.0.3) Updates `pytest-mock` from 3.11.1 to 3.12.0 - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest-mock@v3.11.1...v3.12.0) Updates `pytest-xdist` from 3.3.1 to 3.5.0 - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases) - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest-xdist@v3.3.1...v3.5.0) Updates `pyright` from 1.1.325 to 1.1.345 - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](RobertCraigie/pyright-python@v1.1.325...v1.1.345) Updates `isort` from 5.12.0 to 5.13.2 - [Release notes](https://github.com/pycqa/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](PyCQA/isort@5.12.0...5.13.2) Updates `pytest-rerunfailures` from 12.0 to 13.0 - [Changelog](https://github.com/pytest-dev/pytest-rerunfailures/blob/master/CHANGES.rst) - [Commits](pytest-dev/pytest-rerunfailures@12.0...13.0) Updates `cairo-lang` from 0.12.2 to 0.13.0 - [Release notes](https://github.com/starkware-libs/cairo-lang/releases) - [Commits](starkware-libs/cairo-lang@v0.12.2...v0.13.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: poethepoet dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: pytest-asyncio dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: pytest-mock dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: pytest-xdist dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: pyright dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: isort dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: pytest-rerunfailures dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: cairo-lang dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * revert pytest-asyncio to ^0.21.1 beacause of changes in the context of event_loop * update hash * fix lint * fix linter * Add issue id to TODO * fix imports * format * downgrade pyright version * Update pyproject.toml Co-authored-by: ddoktorski <45050160+ddoktorski@users.noreply.github.com> * fix * Add support for python 3.12* * adds to many arguments * remove v3.8 python * fix * revert version 3.8 * linter * test * test * test * use python 3.11 to build * fix * update * try version 3.12 * test * update pyproject * fix * feedback * remove --without py312-dev * update * test * simplyfy install cairo-lang * remove cairo-lang from deps * feedback * remove istall cairo-lang * Update docs/development.rst Co-authored-by: ddoktorski <45050160+ddoktorski@users.noreply.github.com> * Update .github/workflows/checks.yml Co-authored-by: ddoktorski <45050160+ddoktorski@users.noreply.github.com> * feedback * clean up * clean up code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ddoktorski <45050160+ddoktorski@users.noreply.github.com>
1 parent 976f1fd commit c44e782

File tree

6 files changed

+989
-1942
lines changed

6 files changed

+989
-1942
lines changed

.github/workflows/checks.yml

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ jobs:
3232
pip install poetry
3333
poetry config installer.modern-installation false
3434
35-
- name: Set up Python 3.9
35+
- name: Set up Python 3.12
3636
uses: actions/setup-python@v4
3737
with:
38-
python-version: "3.9"
38+
python-version: "3.12"
3939
cache: 'poetry'
4040

4141
- name: Install dependencies
4242
run: |
43-
poetry install --without py39-dev
43+
poetry install
4444
4545
- name: Check poetry.lock
4646
run: |
@@ -67,7 +67,7 @@ jobs:
6767
runs-on: ubuntu-latest
6868
strategy:
6969
matrix:
70-
python-version: [ "3.9" ]
70+
python-version: [ "3.12" ]
7171
steps:
7272

7373
# ====================== SETUP ====================== #
@@ -76,7 +76,7 @@ jobs:
7676

7777
- uses: actions/setup-python@v4
7878
with:
79-
python-version: "3.9"
79+
python-version: "3.12"
8080
cache: 'pip'
8181

8282
- name: Install poetry
@@ -85,10 +85,10 @@ jobs:
8585
pip install poetry
8686
poetry config installer.modern-installation false
8787
88-
- name: Install python 3.9 requirements
88+
- name: Install deprecated cairo compiler
8989
run: |
90-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
91-
pip install -r requirements.txt
90+
pip install --upgrade setuptools
91+
pip install cairo-lang==0.13.0
9292
9393
- name: Set up Python ${{ matrix.python-version }}
9494
uses: actions/setup-python@v4
@@ -98,7 +98,7 @@ jobs:
9898

9999
- name: Install dependencies
100100
run: |
101-
poetry install --without py39-dev
101+
poetry install
102102
103103
# ====================== CONTRACTS v0 ====================== #
104104

@@ -131,7 +131,7 @@ jobs:
131131
strategy:
132132
fail-fast: false
133133
matrix:
134-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
134+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
135135
steps:
136136
- uses: actions/checkout@v3
137137
- uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -145,7 +145,7 @@ jobs:
145145

146146
- uses: actions/setup-python@v4
147147
with:
148-
python-version: "3.9"
148+
python-version: "3.12"
149149
cache: 'pip'
150150

151151
# ====================== SETUP PYTHON ====================== #
@@ -156,11 +156,6 @@ jobs:
156156
pip install poetry
157157
poetry config installer.modern-installation false
158158
159-
- name: Install python 3.9 requirements
160-
run: |
161-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
162-
pip install -r requirements.txt
163-
164159
- name: Set up Python ${{ matrix.python-version }}
165160
uses: actions/setup-python@v4
166161
with:
@@ -169,7 +164,7 @@ jobs:
169164

170165
- name: Install dependencies
171166
run: |
172-
poetry install --without py39-dev
167+
poetry install
173168
174169
# ====================== SETUP DEVNET ====================== #
175170

@@ -227,7 +222,7 @@ jobs:
227222

228223
- uses: actions/setup-python@v4
229224
with:
230-
python-version: "3.9"
225+
python-version: "3.12"
231226
cache: 'pip'
232227

233228
# ====================== SETUP PYTHON ====================== #
@@ -238,20 +233,15 @@ jobs:
238233
pip install poetry
239234
poetry config installer.modern-installation false
240235
241-
- name: Install python 3.9 requirements
242-
run: |
243-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
244-
pip install -r requirements.txt
245-
246-
- name: Set up Python 3.9
236+
- name: Set up Python 3.12
247237
uses: actions/setup-python@v4
248238
with:
249-
python-version: "3.9"
239+
python-version: "3.12"
250240
cache: 'poetry'
251241

252242
- name: Install dependencies
253243
run: |
254-
poetry install --without py39-dev
244+
poetry install
255245
256246
# ====================== RUN TESTS ====================== #
257247

@@ -282,7 +272,7 @@ jobs:
282272
strategy:
283273
fail-fast: false
284274
matrix:
285-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
275+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
286276
steps:
287277
- uses: actions/checkout@v3
288278
- uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -296,7 +286,7 @@ jobs:
296286

297287
- uses: actions/setup-python@v4
298288
with:
299-
python-version: "3.9"
289+
python-version: "3.12"
300290
cache: 'pip'
301291

302292
# ====================== SETUP DEVNET ====================== #
@@ -312,11 +302,6 @@ jobs:
312302
pip install poetry
313303
poetry config installer.modern-installation false
314304
315-
- name: Install python 3.9 requirements
316-
run: |
317-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
318-
pip install -r requirements.txt
319-
320305
- name: Set up Python ${{ matrix.python-version }}
321306
uses: actions/setup-python@v4
322307
with:
@@ -325,7 +310,7 @@ jobs:
325310

326311
- name: Install dependencies
327312
run: |
328-
poetry install --without py39-dev
313+
poetry install
329314
330315
# ====================== RUN TESTS ====================== #
331316

@@ -356,7 +341,7 @@ jobs:
356341
strategy:
357342
fail-fast: false
358343
matrix:
359-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
344+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
360345
steps:
361346
- uses: actions/checkout@v3
362347
- uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -370,7 +355,7 @@ jobs:
370355

371356
- uses: actions/setup-python@v4
372357
with:
373-
python-version: "3.9"
358+
python-version: "3.12"
374359
cache: 'pip'
375360

376361
# ====================== SETUP PYTHON ====================== #
@@ -381,11 +366,6 @@ jobs:
381366
pip install poetry
382367
poetry config installer.modern-installation false
383368
384-
- name: Install python 3.9 requirements
385-
run: |
386-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
387-
pip install -r requirements.txt
388-
389369
- name: Set up Python ${{ matrix.python-version }}
390370
uses: actions/setup-python@v4
391371
with:
@@ -394,7 +374,7 @@ jobs:
394374

395375
- name: Install dependencies
396376
run: |
397-
poetry install --without py39-dev
377+
poetry install
398378
399379
# ====================== SETUP DEVNET ====================== #
400380

@@ -430,7 +410,7 @@ jobs:
430410
strategy:
431411
fail-fast: false
432412
matrix:
433-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
413+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
434414
steps:
435415
- uses: actions/checkout@v3
436416
- uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -444,7 +424,7 @@ jobs:
444424

445425
- uses: actions/setup-python@v4
446426
with:
447-
python-version: "3.9"
427+
python-version: "3.12"
448428
cache: 'pip'
449429

450430
# ====================== SETUP PYTHON ====================== #
@@ -455,11 +435,6 @@ jobs:
455435
pip install poetry
456436
poetry config installer.modern-installation false
457437
458-
- name: Install python 3.9 requirements
459-
run: |
460-
poetry export -f requirements.txt --only=py39-dev --without-hashes --output requirements.txt
461-
pip install -r requirements.txt
462-
463438
- name: Set up Python ${{ matrix.python-version }}
464439
uses: actions/setup-python@v4
465440
with:
@@ -468,7 +443,7 @@ jobs:
468443

469444
- name: Install dependencies
470445
run: |
471-
poetry install --without py39-dev
446+
poetry install
472447
473448
# ====================== SETUP DEVNET ====================== #
474449

.github/workflows/manual_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- '3.9'
1818
- '3.10'
1919
- '3.11'
20+
- '3.12'
2021

2122
jobs:
2223
setup:

docs/development.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Development dependencies
99
------------------------
1010
- `poetry <https://python-poetry.org/>`_ - dependency manager.
1111
- `pyenv <https://github.com/pyenv/pyenv>`_ - recommended for installing and switching python versions locally.
12-
13-
Make sure running ``poetry run python --version`` returns ``Python 3.9.x``.
12+
- `cairo-lang <https://pypi.org/project/cairo-lang/>`_ - required to compile contracts (`poe compile_contracts`)
1413

1514
Setup
1615
-----

0 commit comments

Comments
 (0)