diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b612fca8..ec0fc4e8 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements_dev.txt dist/*.whl + pip install --group dev dist/*.whl - name: Test with pytest run: | pytest tests diff --git a/pyproject.toml b/pyproject.toml index 89c10640..ff55da16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] license = { text = "BSD-3-Clause" } -requires-python = ">=3.10" +requires-python = ">=3.12" dependencies = [ "bidict", "pika", @@ -39,6 +39,16 @@ Bug-Tracker = "https://github.com/DiamondLightSource/python-workflows/issues" [project.optional-dependencies] prometheus = ["prometheus-client"] +[dependency-groups] +dev = [ + "prometheus-client", + "pytest", + "pytest-cov", + "pytest-mock", + "pytest-timeout", + "websocket-client", +] + [project.entry-points."libtbx.dispatcher.script"] "workflows.validate_recipe" = "workflows.validate_recipe" diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index d6c04159..00000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,9 +0,0 @@ -bidict==0.23.1 -pika==1.3.2 -prometheus_client==0.21.0 -pytest==9.0.3 -pytest-cov==7.1.0 -pytest-mock==3.14.0 -pytest-timeout==2.3.1 -stomp-py==8.1.2 -websocket-client==1.8.0 \ No newline at end of file diff --git a/src/workflows/frontend/__init__.py b/src/workflows/frontend/__init__.py index ff3226fe..01962dda 100644 --- a/src/workflows/frontend/__init__.py +++ b/src/workflows/frontend/__init__.py @@ -16,6 +16,12 @@ basestring = (str, bytes) +# Pin the fork start method: service instances carry pipes and transport +# state that aren't pickleable, so spawn/forkserver (the 3.14+ default on +# Linux) can't serialize them. fork is deprecated upstream and will +# eventually need a real refactor. +multiprocessing.set_start_method("fork", force=True) + class Frontend: """The frontend class encapsulates the actual service. It controls the