Skip to content

Commit d41ebd4

Browse files
Python upgrade 3.11 (#8133)
* Upgrade Python * update filter groups to match python config files * update python in more places --------- Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
1 parent 3d47217 commit d41ebd4

8 files changed

+14
-91
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"image": "mcr.microsoft.com/devcontainers/universal:2",
44
"features": {
55
"ghcr.io/devcontainers/features/python:1": {
6-
"version": "3.10"
6+
"version": "3.11"
77
},
88
"ghcr.io/devcontainers/features/node:1": {
99
"version": "lts"

.github/filter-groups.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ json:
1717

1818
python:
1919
- '**.py'
20+
- 'poetry.toml'
2021
- 'pyproject.toml'
2122
- 'poetry.lock'
22-
- '.poetry-version'
23+
- '.python-version'
24+
- 'parsers.dockerfile'

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10
1+
3.11

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To get started with editing the parsers use the following steps:
4949
1. Run `poetry install -E parsers` to install all needed dependencies.
5050
2. Use `poetry run test_parser ZONE_KEY` to test any parser changes.
5151

52-
Note: This requires you to have [Python 3.10][python homepage] and [Poetry][poetry homepage] installed, you can see their respective installation guides here:
52+
Note: This requires you to have [Python 3.11][python homepage] and [Poetry][poetry homepage] installed, you can see their respective installation guides here:
5353

5454
- [Downloading Python][python install guide]
5555
- [poetry installation][poetry install guide]

Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 0.8
2-
FROM python:3.10
2+
FROM python:3.11
33
WORKDIR /contrib
44

55
linting-files:

parsers.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Run with "$ docker run parsers US-CAL-CISO production"
44
# If needed, pass any token env var using "docker run -e TOKEN=<token>"
55

6-
FROM python:3.10
6+
FROM python:3.11
77
WORKDIR /workspace
88
RUN apt-get update && apt-get install -y python3-opencv tesseract-ocr tesseract-ocr-jpn tesseract-ocr-eng libgl1
99
RUN pip install "poetry==2.*"

poetry.lock

Lines changed: 5 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ packages = [{ include = "electricitymap" }]
88
include = ["config/*.json", "config/*.yaml"]
99

1010
[tool.poetry.dependencies]
11-
python = '>= 3.10, < 3.11'
11+
python = '~3.11'
1212
pydantic = "^1.9.0"
1313
beautifulsoup4 = { version = "~4.6.0", optional = true }
1414
demjson3 = { version = "^3.0.5", optional = true }

0 commit comments

Comments
 (0)