Skip to content

Support py3.14: use fork spawn method for processes + fresh black#8

Merged
gmelikov merged 3 commits intomasterfrom
fork
Feb 9, 2026
Merged

Support py3.14: use fork spawn method for processes + fresh black#8
gmelikov merged 3 commits intomasterfrom
fork

Conversation

@gmelikov
Copy link
Member

@gmelikov gmelikov commented Feb 8, 2026

In fact, gcl_looper's hub is essentially a forkserver itself.

So we should not have any other threads when we fork anything.

@gemini-code-assist
Copy link

Summary of Changes

Hello @gmelikov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces compatibility with Python 3.14 by updating project metadata and test configurations. A key change involves standardizing the process spawning mechanism to explicitly use the 'fork' method, which is crucial for maintaining predictable behavior in multiprocessing environments, particularly as Python's default start methods evolve. This ensures the application's core functionality remains robust across different Python versions.

Highlights

  • Python 3.14 Support: Added official support for Python 3.14 by updating setup.cfg classifiers and including it in tox.ini test environments.
  • Explicit Fork Process Spawning: Modified process creation to explicitly use the 'fork' start method via multiprocessing.get_context("fork").Process in ProcessHubService and functional tests. This ensures consistent process behavior, especially with newer Python versions.
  • Simplified Multiprocessing Setup: Removed the conditional multiprocessing.set_start_method("fork") call that was specific to macOS and Python 3.8+, as the explicit context usage makes it redundant.
  • Code Formatting: Applied minor code formatting changes, primarily removing unnecessary blank lines, across several files.
Changelog
  • gcl_looper/cmd/launchpad.py
    • Removed an extra blank line.
  • gcl_looper/services/base.py
    • Removed an extra blank line.
  • gcl_looper/services/basic.py
    • Removed an extra blank line.
  • gcl_looper/services/bjoern_service.py
    • Removed an extra blank line.
  • gcl_looper/services/hub.py
    • Changed _instance_class to multiprocessing.get_context("fork").Process for explicit fork-based process creation.
    • Removed the conditional multiprocessing.set_start_method("fork") call.
  • gcl_looper/services/oslo/launchpad.py
    • Removed an extra blank line.
  • gcl_looper/tests/functional/services/test_basic.py
    • Removed an extra blank line.
  • gcl_looper/tests/functional/services/test_bjoern.py
    • Removed unused import from requests import exceptions.
    • Changed process creation in test_start_and_stop to use multiprocessing.get_context("fork").Process.
    • Removed an extra blank line.
  • setup.cfg
    • Added Programming Language :: Python :: 3.14 classifier.
  • setup.py
    • Removed an extra blank line.
  • tox.ini
    • Added py314 to the envlist for both standard and functional tests.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/tests.yaml
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Python 3.14 by explicitly setting the multiprocessing start method to 'fork', and also applies black formatting across the codebase. The change to use multiprocessing.get_context('fork').Process is a good improvement over the previous platform-specific set_start_method call, making the code more explicit and robust across different Unix-like systems. The configuration updates for Python 3.14 are also correct. I have one suggestion regarding the multiprocessing start method for improved safety in multithreaded contexts.

In fact, gcl_looper's hub is essentially a `forkserver` itself.

So we should not have any other threads when we fork anything.
@gmelikov gmelikov merged commit fe6c069 into master Feb 9, 2026
12 checks passed
@gmelikov gmelikov deleted the fork branch February 9, 2026 07:25
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