Skip to content

Conversation

@igorniebylski
Copy link
Contributor

@igorniebylski igorniebylski commented Oct 14, 2025

In python 3.14 multiprocessing changed the way processes are spawned on POSIX OSes
For python < 3.14 multiprocessing used fork
For python >= 3.14 multiprocessing uses forkserver
more info python/cpython#84559

with forkserver the child process does not inherit the parent's resources
this change breaks the test because the child process cannot access the iterator
i set usage of fork explicitly to keep the test working

Build: http://teamcity.cicd.intra.quasar.ai:8111/buildConfiguration/Api_Python_Composite/1057870

@igorniebylski igorniebylski requested a review from solatis October 15, 2025 08:38
@igorniebylski igorniebylski marked this pull request as ready for review October 15, 2025 08:46
Copilot AI review requested due to automatic review settings October 15, 2025 08:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Python 3.14 by addressing a breaking change in multiprocessing behavior and updating version parsing logic. Python 3.14 changed the default process spawning method from "fork" to "forkserver" on POSIX systems, which breaks existing tests.

  • Explicitly set multiprocessing to use "fork" method to maintain test compatibility
  • Add Python 3.14 version parsing support in Docker configuration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/test_firehose.py Modified to explicitly use fork context for multiprocessing to maintain compatibility with Python 3.14
docker/set-python-version.sh Added version parsing case for Python 3.14

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +27 to +28
# way of starting process on Linux changed in python 3.14 from fork to forkserver: https://github.com/python/cpython/issues/84559
# to keep this test working on newer python versions we specify the "fork" method explicitly
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'OS'es' to 'OSes' in the comment.

Copilot uses AI. Check for mistakes.
@solatis
Copy link
Contributor

solatis commented Oct 15, 2025

Is this working on all agents ?

@igorniebylski
Copy link
Contributor Author

Yes, working on all agents. Ran composite for debug and release with only errors coming from flaky stats by node test.

@igorniebylski igorniebylski merged commit 0b163d0 into master Oct 16, 2025
3 checks passed
@igorniebylski igorniebylski deleted the sc-17652/add-build-configuration-for-python-3-14-to-teamcity branch October 16, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants