Skip to content

Feature/fedora44 python314 upgrade - #106

Merged
yselkowitz merged 7 commits into
fedora-eln:masterfrom
bhoy-troy:feature/fedora44-python314-upgrade
Apr 30, 2026
Merged

yselkowitz merged 7 commits into
fedora-eln:masterfrom
bhoy-troy:feature/fedora44-python314-upgrade

Conversation

@bhoy-troy

@bhoy-troy bhoy-troy commented Apr 28, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrade to Fedora 44 and Python 3.14 with Code Modernization

Summary

Ugrades Content Resolver to Fedora 44 and Python 3.14, while modernizing the codebase with f-string formatting and improved Docker build efficiency. Addresses the issues identified in #105.

Changes

1. Infrastructure Upgrades

Container Images:

  • ✅ Dockerfile: fedora:42 → fedora:44
  • ✅ GitHub Actions CI: fedora:41 → fedora:44 ─

Docker Improvements:

  • ✅ Added .dockerignore to reduce build context (excludes cache, output, IDE files)
  • ✅ Enhanced DNF cache management in Dockerfile
  • ✅ Improved build layer efficiency ─

2. Python Code Modernization

Python 3.14 changed the default multiprocessing start method from fork to forkserver for improved safety. However, forkserver requires all objects to be picklable. DNF repository objects contain SWIG-wrapped C objects (SwigPyObject) that cannot be pickled,
causing this error:

TypeError: cannot pickle 'swig_runtime_data5.SwigPyObject' object

Solution:
Added explicit multiprocessing.set_start_method('fork'). This forces Python 3.14 to use the traditional fork method (same as Python ≤3.13), avoiding the need to pickle DNF objects, will need to be fixed for future versions.

  • Set multiprocessing start method to fork (instead of default forkserver)
  • F-string Conversion* faster string formatting performance
  • Reduced code base size
  • Improved readability ─

3. GitHub Actions Node.js 24 Support

Problem:
GitHub Actions announced deprecation of Node.js 20:

  • Warning starts: Now (April 2026)
  • Removal date: September 16, 2026

Solution:
Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable to opt into Node.js 24 early. This:

  • Eliminates deprecation warnings
  • Ensures CI continues working after Sept 2026
  • Uses the latest Node.js runtime for better performance

Reference: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@yselkowitz yselkowitz self-assigned this Apr 28, 2026
@yselkowitz yselkowitz linked an issue Apr 28, 2026 that may be closed by this pull request
@bhoy-troy

Copy link
Copy Markdown
Collaborator Author

Closing for now, seems to be breaking changes with how concurrency is handled in Python 3.14

https://docs.python.org/3/whatsnew/3.14.html#concurrent-futures

@bhoy-troy bhoy-troy closed this Apr 28, 2026
@yselkowitz

Copy link
Copy Markdown
Member

@bhoy-troy if the rest of these changes are safe even on f42/py3.13, perhaps we could handle those first without the f44/py3.14 change?

@bhoy-troy bhoy-troy reopened this Apr 29, 2026
@bhoy-troy
bhoy-troy force-pushed the feature/fedora44-python314-upgrade branch from 8e865ca to e737de1 Compare April 29, 2026 14:05
@bhoy-troy

Copy link
Copy Markdown
Collaborator Author

@yselkowitz , I have set content-resolver to use fork as the multiprocessing entry, this was default in Python <= 3.13. We'll need to make changes to be able to use the the 3.14 default of forkserver, we'll need to handle the pickling.

@yselkowitz

Copy link
Copy Markdown
Member

@yselkowitz , I have set content-resolver to use fork as the multiprocessing entry, this was default in Python <= 3.13. We'll need to make changes to be able to use the the 3.14 default of forkserver, we'll need to handle the pickling.

Please make a new ticket for that against this repo.

@bhoy-troy
bhoy-troy marked this pull request as ready for review April 29, 2026 17:09

@yselkowitz yselkowitz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The changes look good, and I successfully tested this on my flatpak CR repo. If you could please just fix the commit message of the string formatting (currently commit d7d005c) so that the first line (commit title) is of standard length, and squash the typo fix (currently commit fbc60b2) into that. There should be no net change to the code, just cleaner commits.

Fedora 44 has Python 3.14 as default
Python 3.14+ uses 'forkserver' as default multiprocessing start method,
which requires pickling. DNF objects contain unpicklable SWIG C objects.
Set to 'fork' method before any other imports to avoid pickling issues.
https://docs.python.org/3/whatsnew/3.14.html#concurrent-futures
Node.js 20 actions are deprecated, and will be removed in Sept 2026. To use Node.js 24 now, we set the env var FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true.

https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners
@bhoy-troy
bhoy-troy force-pushed the feature/fedora44-python314-upgrade branch from e737de1 to 020d36f Compare April 30, 2026 09:51
@bhoy-troy
bhoy-troy requested a review from yselkowitz April 30, 2026 14:18
@yselkowitz
yselkowitz merged commit 7f881b5 into fedora-eln:master Apr 30, 2026
2 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.

Upgrade CR to Fedora 44 and Python 3.14

2 participants