Skip to content

Commit e2f601f

Browse files
Upgrade Python version to 3.12 across all CI/CD workflows and package requirements
- Update all GitHub Actions workflows to use Python 3.12 (from 3.11, 3.9.x, 3.9, and 3.x) - Update pyproject.toml minimum Python version requirement from >=3.9 to >=3.12 - Update Python version check in test-json-schema-to-grammar.cpp from 3.8 to 3.12 - All tests passing (37/37) and build successful after upgrade Co-Authored-By: Priya Padmanabhan <[email protected]>
1 parent 2a03035 commit e2f601f

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Python
4848
uses: actions/setup-python@v5
4949
with:
50-
python-version: '3.11'
50+
python-version: '3.12'
5151

5252
- name: Install Python dependencies
5353
run: |

.github/workflows/gguf-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: '3.9.x'
31+
python-version: '3.12'
3232
- name: Install dependencies
3333
run: |
3434
cd gguf-py

.github/workflows/python-check-requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ jobs:
2828
- name: Set up Python environment
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: "3.11"
31+
python-version: "3.12"
3232
- name: Run check-requirements.sh script
3333
run: bash scripts/check-requirements.sh

.github/workflows/server.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
id: setup_python
7070
uses: actions/setup-python@v5
7171
with:
72-
python-version: '3.11'
72+
python-version: '3.12'
7373

7474
- name: Tests dependencies
7575
id: test_dependencies
@@ -255,7 +255,7 @@ jobs:
255255
id: setup_python
256256
uses: actions/setup-python@v5
257257
with:
258-
python-version: '3.11'
258+
python-version: '3.12'
259259

260260
- name: Tests dependencies
261261
id: test_dependencies
@@ -361,7 +361,7 @@ jobs:
361361
id: setup_python
362362
uses: actions/setup-python@v5
363363
with:
364-
python-version: '3.11'
364+
python-version: '3.12'
365365

366366
- name: Tests dependencies
367367
id: test_dependencies

.github/workflows/snyk-security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Python
3535
uses: actions/setup-python@v4
3636
with:
37-
python-version: '3.9'
37+
python-version: '3.12'
3838

3939
- name: Install dependencies
4040
run: |

.github/workflows/update-ops-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: '3.x'
26+
python-version: '3.12'
2727

2828
- name: Generate operations documentation to temporary file
2929
run: |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ classifiers = [
1515
]
1616

1717
[tool.poetry.dependencies]
18-
python = ">=3.9"
18+
python = ">=3.12"
1919
numpy = "^1.25.0"
2020
sentencepiece = ">=0.1.98,<=0.2.0"
2121
transformers = ">=4.35.2,<5.0.0"

tests/test-json-schema-to-grammar.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,15 +1320,15 @@ int main() {
13201320
if (getenv("LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR")) {
13211321
fprintf(stderr, "\033[33mWARNING: Skipping slow tests on emulator.\n\033[0m");
13221322
} else {
1323-
if (getenv("LLAMA_PYTHON_AVAILABLE") || (std::system("python -c \"import sys; exit(1) if sys.version_info < (3, 8) else print('Python version is sufficient')\"") == 0)) {
1323+
if (getenv("LLAMA_PYTHON_AVAILABLE") || (std::system("python -c \"import sys; exit(1) if sys.version_info < (3, 12) else print('Python version is sufficient')\"") == 0)) {
13241324
test_all("Python", [](const TestCase & tc) {
13251325
write("test-json-schema-input.tmp", tc.schema);
13261326
tc.verify_status(std::system(
13271327
"python ./examples/json_schema_to_grammar.py test-json-schema-input.tmp > test-grammar-output.tmp") == 0 ? SUCCESS : FAILURE);
13281328
tc.verify(read("test-grammar-output.tmp"));
13291329
});
13301330
} else {
1331-
fprintf(stderr, "\033[33mWARNING: Python not found (min version required is 3.8), skipping Python JSON schema -> grammar tests.\n\033[0m");
1331+
fprintf(stderr, "\033[33mWARNING: Python not found (min version required is 3.12), skipping Python JSON schema -> grammar tests.\n\033[0m");
13321332
}
13331333

13341334
if (getenv("LLAMA_NODE_AVAILABLE") || (std::system("node --version") == 0)) {

0 commit comments

Comments
 (0)