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

github: test python3.14 with default forkserver start method overridden to spawn #1397

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
start-method: 'spawn'
- python-version: '3.13-dev'
start-method: 'spawn'
- python-version: '3.14-dev'
start-method: 'fork'
- python-version: 'pypy-3.10'
start-method: 'spawn'
fail-fast: false
Expand Down Expand Up @@ -98,4 +96,7 @@ jobs:
export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal"
# Use pytest-rerunfailures to workaround pytest-xdist worker crashes with spawn start-method (bug 924416).
[[ "${{ matrix.start-method }}" == "spawn" ]] && PYTEST_ADDOPTS+=" --reruns 5 --only-rerun 'worker .* crashed while running'"
[[ "${{ matrix.start-method }}" == "fork" ]] &&
[[ "${{ matrix.python-version }}" == "3.14-dev" ]] &&
PYTEST_ADDOPTS+=" --reruns 5 --only-rerun 'node down: Not properly terminated'"
meson test -C /tmp/build --verbose
3 changes: 3 additions & 0 deletions lib/portage/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import os as _os
import warnings

if multiprocessing.get_start_method() == "forkserver":
multiprocessing.set_start_method("spawn", force=True)

from dataclasses import dataclass
from functools import lru_cache, partial
from typing import Any, Optional, Callable, Union
Expand Down
Loading