Skip to content

Address Python 3.14 breaking changes to multiprocessing - #1097

Merged
m-meller merged 4 commits into
stfc:mainfrom
m-meller:py314-breaking-changes-1096
Nov 23, 2026
Merged

m-meller merged 4 commits into
stfc:mainfrom
m-meller:py314-breaking-changes-1096

Conversation

@m-meller

Copy link
Copy Markdown
Collaborator

Summary

Resolves #1096. The only major use of multiprocessing is in qiskit_machine_learning/optimizers/p_bfgs.py and it was addressed.

Details and comments

  • Before creating and using processes, a context object is obtained and used throughout (context object has the same API as multiprocessing).
  • For MacOS and Windows systems the logic remains unchanged.
  • On Linux systems the program selects fork as target Process method.
  • Usage of multiprocessing in tools/find_stray_release_notes.py and tools/verify_headers.py is ignored as it uses multiprocessing.Pool() and hence the objects used there are already serialised anyways and should not be affected.

@m-meller
m-meller merged commit d691168 into stfc:main Nov 23, 2026
2 of 12 checks passed
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.

Address Python 3.14 breaking changes to multiprocessing

2 participants