Skip to content

Commit

Permalink
use python 3.9.18 instead of 3.9.15 (#2090)
Browse files Browse the repository at this point in the history
To upgrade on Ubuntu and pyenv, I had to do the following:

```
sudo apt install zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
libncurses-dev libffi-dev liblzma-dev libreadline-dev graphviz
libgraphviz-dev
pyenv update
pyenv install 3.9.18
```

and in every project folder

```
poetry env use 3.9.18
poetry update python
```
  • Loading branch information
severo authored Nov 10, 2023
1 parent 8a6c727 commit da54e3f
Show file tree
Hide file tree
Showing 58 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Launch end-to-end tests
on:
workflow_call:
env:
python-version: 3.9.15
python-version: 3.9.18
poetry-version: "1.4.2"
# required to get access to use a cached poetry venv in "/home/runner/.cache/pypoetry/virtualenvs"
POETRY_VIRTUALENVS_IN_PROJECT: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_quality-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
# required to get access to use a cached poetry venv in "/home/runner/.cache/pypoetry/virtualenvs"
POETRY_VIRTUALENVS_IN_PROJECT: false
python-version: "3.9.15"
python-version: "3.9.18"
poetry-version: "1.4.2"
jobs:
code-quality:
Expand Down Expand Up @@ -51,4 +51,4 @@ jobs:
- name: Run bandit
run: poetry run bandit -r src
- name: Run pip-audit
run: bash -c "poetry run pip-audit --ignore-vuln GHSA-wfm5-v35h-vwf4 --ignore-vuln GHSA-cwvm-v4w8-q58c --ignore-vuln PYSEC-2022-43059 -r <(poetry export -f requirements.txt --with dev | sed '/^kenlm @/d' | sed '/^torch @/d' | sed '/^libapi @/d' | sed '/^libcommon @/d' | sed '/^trec-car-tools @/d' | sed 's/^huggingface-hub @ git.*/huggingface-hub==0.15.1 ; python_full_version == \"3.9.15\" --hash=sha256:05b0fb0abbf1f625dfee864648ac3049fe225ac4371c7bafaca0c2d3a2f83445 --hash=sha256:a61b7d1a7769fe10119e730277c72ab99d95c48d86a3d6da3e9f3d0f632a4081/')"
run: bash -c "poetry run pip-audit --ignore-vuln GHSA-wfm5-v35h-vwf4 --ignore-vuln GHSA-cwvm-v4w8-q58c --ignore-vuln PYSEC-2022-43059 -r <(poetry export -f requirements.txt --with dev | sed '/^kenlm @/d' | sed '/^torch @/d' | sed '/^libapi @/d' | sed '/^libcommon @/d' | sed '/^trec-car-tools @/d' | sed 's/^huggingface-hub @ git.*/huggingface-hub==0.15.1 ; python_full_version == \"3.9.18\" --hash=sha256:05b0fb0abbf1f625dfee864648ac3049fe225ac4371c7bafaca0c2d3a2f83445 --hash=sha256:a61b7d1a7769fe10119e730277c72ab99d95c48d86a3d6da3e9f3d0f632a4081/')"
2 changes: 1 addition & 1 deletion .github/workflows/_unit-tests-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
POETRY_VIRTUALENVS_IN_PROJECT: false
mongo-port: "27017"
mongo-version: "6.0.9"
python-version: "3.9.15"
python-version: "3.9.18"
poetry-version: "1.4.2"
replicaset: "rs0"
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- "docs/source/openapi.json"
- ".github/workflows/openapi.yml"
env:
python-version: 3.9.15
python-version: 3.9.18
poetry-version: "1.4.2"
# required to get access to use a cached poetry venv in "/home/runner/.cache/pypoetry/virtualenvs"
POETRY_VIRTUALENVS_IN_PROJECT: false
Expand Down
20 changes: 10 additions & 10 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ If you use pyenv:

```bash
cd libs/libcommon/
pyenv install 3.9.15
pyenv local 3.9.15
pyenv install 3.9.18
pyenv local 3.9.18
poetry env use python3.9
```

Expand Down Expand Up @@ -163,18 +163,18 @@ Install pyenv:
$ curl https://pyenv.run | bash
```

Install Python 3.9.15:
Install Python 3.9.18:

```bash
$ pyenv install 3.9.15
$ pyenv install 3.9.18
```

Check that the expected local version of Python is used:

```bash
$ cd services/worker
$ python --version
Python 3.9.15
Python 3.9.18
```

Install Poetry:
Expand All @@ -186,7 +186,7 @@ curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.4.2 python3 -
Set the Python version to use with Poetry:

```bash
poetry env use 3.9.15
poetry env use 3.9.18
```

Install the dependencies:
Expand Down Expand Up @@ -252,18 +252,18 @@ eval "$(pyenv init -)"

Logout and login again.

Install Python 3.9.15:
Install Python 3.9.18:

```bash
$ pyenv install 3.9.15
$ pyenv install 3.9.18
```

Check that the expected local version of Python is used:

```bash
$ cd services/worker
$ python --version
Python 3.9.15
Python 3.9.18
```

Install poetry:
Expand All @@ -288,7 +288,7 @@ $ source $HOME/.cargo/env
Set the python version to use with poetry:

```bash
poetry env use 3.9.15
poetry env use 3.9.18
```

Avoid an issue with Apache beam (https://github.com/python-poetry/poetry/issues/4888#issuecomment-1208408509):
Expand Down
2 changes: 1 addition & 1 deletion docs/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"

[tool.poetry.dependencies]
hf-doc-builder = { git = "https://github.com/huggingface/doc-builder" }
python = "3.9.15"
python = "3.9.18"
watchdog = "^2.1.9"

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion e2e/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
4 changes: 2 additions & 2 deletions e2e/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
openapi-spec-validator = "^0.5.5"

[tool.poetry.group.dev.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion front/admin_ui/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion front/admin_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ colorFrom: gray
colorTo: purple
sdk: gradio
sdk_version: 3.28.1
python_version: 3.9.15
python_version: 3.9.18
app_file: app.py
pinned: false
---
Expand Down
6 changes: 3 additions & 3 deletions front/admin_ui/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion front/admin_ui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Admin interface for datasets-server"
authors = ["Quentin Lhoest <[email protected]>"]

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
duckdb = "^0.8.1"
gradio = "^3.34.0"
huggingface-hub = "^0.16.4"
Expand Down
2 changes: 1 addition & 1 deletion jobs/cache_maintenance/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion jobs/cache_maintenance/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_admin -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
6 changes: 3 additions & 3 deletions jobs/cache_maintenance/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jobs/cache_maintenance/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.1"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
environs = "^9.5.0"
libcommon = {path = "../../libs/libcommon", develop = true}

Expand Down
2 changes: 1 addition & 1 deletion jobs/mongodb_migration/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion jobs/mongodb_migration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_admin -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
6 changes: 3 additions & 3 deletions jobs/mongodb_migration/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jobs/mongodb_migration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.0.1"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
environs = "^9.5.0"
libcommon = {path = "../../libs/libcommon", develop = true}

Expand Down
2 changes: 1 addition & 1 deletion libs/libapi/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
6 changes: 3 additions & 3 deletions libs/libapi/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/libapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
cryptography = "^41.0.1"
environs = "^9.5.0"
httpx = "^0.25.0"
Expand Down
2 changes: 1 addition & 1 deletion libs/libcommon/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
4 changes: 2 additions & 2 deletions libs/libcommon/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/libcommon/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.6.8"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
appdirs = "^1.4.4"
datasets = {version = "^2.14.6", extras = ["audio", "vision"]}
environs = "^9.5.0"
Expand Down
2 changes: 1 addition & 1 deletion services/admin/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion services/admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_admin -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
2 changes: 1 addition & 1 deletion services/admin/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_admin -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
8 changes: 4 additions & 4 deletions services/admin/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/admin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.2"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "3.9.15"
python = "3.9.18"
environs = "^9.5.0"
httpx = "^0.25.0"
libapi = {path = "../../libs/libapi", develop = true}
Expand Down
2 changes: 1 addition & 1 deletion services/api/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.15
3.9.18
2 changes: 1 addition & 1 deletion services/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_api -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
2 changes: 1 addition & 1 deletion services/api/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build with
# docker build -t some_tag_api -f Dockerfile ../..
FROM python:3.9.15-slim
FROM python:3.9.18-slim

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down
Loading

0 comments on commit da54e3f

Please sign in to comment.