Skip to content

Commit

Permalink
python: fix maximum Python version
Browse files Browse the repository at this point in the history
Python 3.12 doesn't work:

    # poetry run pflake8 --config ./pyproject.toml
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/railjson-generator--f9Ha3Rv-py3.12/bin/pflake8", line 5, in <module>
        from pflake8.__main__ import main
      File "/root/.cache/pypoetry/virtualenvs/railjson-generator--f9Ha3Rv-py3.12/lib/python3.12/site-packages/pflake8/__init__.py", line 55, in <module>
        class DivertingSafeConfigParser(ConfigParserTomlMixin, configparser.SafeConfigParser):
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

See this upstream bug report:
pydata/pandas-datareader#969

Our CI already checks out Python 3.11, so let's align our maximum
version with what CI uses.

Signed-off-by: Simon Ser <[email protected]>
  • Loading branch information
emersion committed Jan 13, 2025
1 parent e3af230 commit 102e1e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions python/osrd_schemas/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 python/osrd_schemas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = ["OSRD <[email protected]>"]
[tool.poetry.dependencies]
geojson-pydantic = "^1.0.0"
pydantic = "^2.1.1"
python = ">=3.9,<3.13"
python = ">=3.9,<3.12"

[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
Expand Down
6 changes: 3 additions & 3 deletions python/railjson_generator/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 python/railjson_generator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = ["OSRD <[email protected]>"]
osrd-schemas = { path = "../osrd_schemas/", develop = false }
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
python = ">=3.9,<3.13"
python = ">=3.9,<3.12"

[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
Expand Down

0 comments on commit 102e1e3

Please sign in to comment.