Skip to content

Commit

Permalink
Merge pull request #275 from lsst/tickets/DM-41904
Browse files Browse the repository at this point in the history
DM-41904: Enable python 3.12
  • Loading branch information
timj authored Nov 30, 2023
2 parents be8138e + 4511f12 commit 643a063
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 11 additions & 1 deletion tests/test_executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import faulthandler
import logging
import multiprocessing
import os
import signal
import sys
Expand Down Expand Up @@ -274,7 +275,6 @@ def test_mpexec_mp(self):

methods = ["spawn"]
if sys.platform == "linux":
methods.append("fork")
methods.append("forkserver")

for method in methods:
Expand Down Expand Up @@ -705,5 +705,15 @@ def test_clobber_outputs_execute(self) -> None:
self.assertEqual(dataset_id_1, dataset_id_3)


def setup_module(module):
"""Force spawn to be used if no method given explicitly.
This can be removed when Python 3.14 changes the default.
"""
multiprocessing.set_start_method("spawn", force=True)


if __name__ == "__main__":
# Do not need to force start mode when running standalone.
multiprocessing.set_start_method("spawn")
unittest.main()

0 comments on commit 643a063

Please sign in to comment.