Skip to content

Commit 8bf09ef

Browse files
fabcor-maxivmarcus-oscarsson
authored andcommitted
Drop support for Python 3.8 and Python 3.9
Supported versions are: * Python 3.10 * Python 3.11 Update all tools that were stuck on older versions because the tools themselves dropped Python 3.8. Format and remove lint according to newest tool versions. Update and clean-up the content of `pyproject.toml`, in particular use the `[project]` table now that it is supported by Poetry. Update more development dependencies.
1 parent 70950f1 commit 8bf09ef

File tree

9 files changed

+314
-297
lines changed

9 files changed

+314
-297
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
max-parallel: 5
1313
matrix:
14-
python-version: ["3.8", "3.9", "3.10", "3.11"]
14+
python-version: ["3.10", "3.11"]
1515

1616
# Skip `pull_request` runs on local PRs for which `push` runs are already triggered
1717
# yamllint disable-line rule:line-length

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[settings]
22
profile=black
3-
py_version=38
3+
py_version=310
44
force_grid_wrap=2

.pre-commit-config.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- --strict
1414

1515
- repo: https://github.com/python-poetry/poetry
16-
rev: 1.8.4
16+
rev: 2.0.1
1717
hooks:
1818

1919
# Equivalent to running `poetry check --lock`.
@@ -25,18 +25,16 @@ repos:
2525
args:
2626
- --lock
2727

28-
# Equivalent to running `poetry lock --no-update`.
28+
# Equivalent to running `poetry lock`.
2929
# This syncs the `poetry.lock` file with the content of the `pyproject.toml` file.
3030
# This hook fails if it results in modifying `poetry.lock`.
3131
- id: poetry-lock
32-
args:
33-
- --no-update
3432

3533
# Equivalent to running `poetry export`.
3634
# This exports the `poetry.lock` file to the `requirements.txt` file.
3735
# This hook fails if it results in modifying `requirements.txt`.
3836
- repo: https://github.com/python-poetry/poetry-plugin-export
39-
rev: 1.8.0
37+
rev: 1.9.0
4038
hooks:
4139
- id: poetry-export
4240

@@ -53,18 +51,18 @@ repos:
5351
- --ignore-pass-after-docstring
5452

5553
- repo: https://github.com/pycqa/isort
56-
rev: 5.13.2
54+
rev: 6.0.0
5755
hooks:
5856
- id: isort
5957

60-
- repo: https://github.com/psf/black
61-
rev: 24.8.0
58+
- repo: https://github.com/psf/black-pre-commit-mirror
59+
rev: 25.1.0
6260
hooks:
6361
- id: black
6462
name: Black
6563

6664
- repo: https://github.com/pre-commit/pre-commit-hooks
67-
rev: v4.6.0
65+
rev: v5.0.0
6866
hooks:
6967
- id: trailing-whitespace
7068
- id: end-of-file-fixer

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ build:
2929
- >-
3030
mamba create --name=mxcubeweb
3131
openldap
32-
poetry
33-
python=3.8
32+
poetry=2.0.1
33+
python=3.10
3434
3535
- >-
3636
mamba run --name=mxcubeweb

conda-environment.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%YAML 1.2
2-
32
---
43

4+
55
name: mxcubeweb
66

77
channels:
@@ -13,7 +13,7 @@ dependencies:
1313
# ====================
1414

1515
- ffmpeg # Not directly used by mxcube, but necessary for the video-streamer
16-
- python >=3.8,<3.12 # Make sure it matches `pyproject.toml`
16+
- python >=3.10,<3.12 # Make sure it matches `pyproject.toml`
1717

1818
# `openldap` is necessary for `python-ldap` but can not be installed by pip or Poetry.
1919
# Note also that on PyPI `python-ldap` is only available as *sdist*, not as *wheel*,
@@ -30,4 +30,7 @@ dependencies:
3030

3131
- nodejs ==18.*|20.* # Make sure it matches `ui/package.json`
3232
- pnpm ==9.* # Make sure it matches `ui/package.json`
33-
- poetry ==1.8.4 # Make sure it matches `.pre-commit-config.yaml`
33+
- poetry ==2.0.1 # Make sure it matches `.pre-commit-config.yaml` and `poetry.lock`
34+
35+
36+
...

mxcubeweb/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
from logging.handlers import TimedRotatingFileHandler
1313
from pathlib import Path
1414

15-
from mxcubecore import ColorFormatter
15+
from mxcubecore import (
16+
ColorFormatter,
17+
)
1618
from mxcubecore import HardwareRepository as HWR
1719
from mxcubecore import (
1820
queue_entry,

poetry.lock

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

pyproject.toml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
[tool.poetry]
1+
[project]
22
name = "mxcubeweb"
33
version = "4.277.0"
44
license = "LGPL-3.0-or-later"
55
description = "MXCuBE Web user interface"
6-
authors = ["The MXCuBE collaboration <[email protected]>"]
6+
authors = [
7+
{name = "The MXCuBE collaboration", email = "[email protected]"},
8+
]
79
maintainers = [
8-
"MXCuBE collaboration <[email protected]>",
10+
{name = "The MXCuBE collaboration", email = "[email protected]"},
911
]
1012
readme = "README.md"
11-
homepage = "https://github.com/mxcube/mxcubeweb"
12-
repository = "https://github.com/mxcube/mxcubeweb"
13-
documentation = "https://mxcubeweb.readthedocs.io/"
13+
url.homepage = "https://github.com/mxcube/mxcubeweb"
14+
url.repository = "https://github.com/mxcube/mxcubeweb"
15+
url.documentation = "https://mxcubeweb.readthedocs.io/"
1416
keywords = ["mxcube", "mxcube3", "mxcubeweb"]
1517
classifiers = [
1618
"Development Status :: 5 - Production/Stable",
@@ -20,9 +22,15 @@ classifiers = [
2022
"Natural Language :: English",
2123
"Topic :: Scientific/Engineering",
2224
]
25+
requires-python = ">=3.10,<3.12"
26+
scripts.mxcubeweb-server = 'mxcubeweb:main'
27+
dynamic = [
28+
# For the time being: keep using Poetry-specific notation for this field,
29+
# but there does not seem to be anything blocking migration to standard notation.
30+
"dependencies",
31+
]
2332

2433
[tool.poetry.dependencies]
25-
python = ">=3.8,<3.12"
2634
Flask = "^3.0.3"
2735
werkzeug = "^3.0.3"
2836
Flask-SocketIO = "^5.3.6"
@@ -47,9 +55,9 @@ bcrypt = "^4.0.1"
4755
authlib = "^1.3.0"
4856

4957
[tool.poetry.group.dev.dependencies]
50-
pre-commit = ">=2.21.0"
51-
pytest = "7.1.3"
52-
pytest-cov = "4.0.0"
58+
pre-commit = "^4.1.0"
59+
pytest = "^8.3.4"
60+
pytest-cov = "^6.0.0"
5361

5462
[tool.poetry.group.docs.dependencies]
5563
furo = "^2023.9.10"
@@ -60,7 +68,11 @@ sphinxcontrib-httpdomain = "^1.8.1"
6068

6169
[tool.black]
6270
line-length = 88
63-
preview = true
71+
required-version = "25"
72+
target-version = [
73+
"py310",
74+
"py311",
75+
]
6476
include = '\.pyi?$'
6577
exclude = '''
6678
/(
@@ -82,6 +94,3 @@ exclude = '''
8294
[build-system]
8395
requires = ["poetry-core>=1.0.0"]
8496
build-backend = "poetry.core.masonry.api"
85-
86-
[tool.poetry.scripts]
87-
mxcubeweb-server = 'mxcubeweb:main'

0 commit comments

Comments
 (0)