Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41904: Enable python 3.12 #275

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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()