Skip to content

[python] - Fedora test fix - #1768

Open
Kaniska (v-Kaniska244) wants to merge 3 commits into
devcontainers:mainfrom
v-Kaniska244:python-fedora-fixes
Open

Kaniska (v-Kaniska244) wants to merge 3 commits into
devcontainers:mainfrom
v-Kaniska244:python-fedora-fixes

Conversation

@v-Kaniska244

@v-Kaniska244 Kaniska (v-Kaniska244) commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix Python source builds on Fedora systems using OpenSSL 4.
  • Scope IFS changes when parsing additionalVersions.
  • Update the Python feature version to 1.8.1.
  • Refresh additional-version coverage to Python 3.12, 3.13, and 3.14.

Changes

Fedora OpenSSL handling

Fedora systems with OpenSSL 4 may not provide the OpenSSL 3 compatibility libraries required by older Python source builds. This can cause Python’s _ssl module to fail at runtime.

For Fedora systems using OpenSSL 4 or newer, the installer now:

  • Installs a private OpenSSL 3 build under the Python installation path.
  • Configures Python with the private OpenSSL location.
  • Installs the required perl-core package.
  • Links Fedora’s CA trust bundle into the private OpenSSL installation.
  • Verifies that Python can successfully import ssl after installation.

Other distributions and Fedora systems using earlier OpenSSL versions retain the existing installation behavior.

Additional Python versions

Parsing of the comma-separated additionalVersions option now uses a command-scoped IFS assignment. This prevents the global shell field separator from affecting later package-manager commands and other shell operations.

The test scenario now installs and verifies Python 3.12, 3.13, and 3.14 as additional switchable versions.

Validation

The following checks are passing:

  • Python tests on Debian 12
  • Python tests on the Dev Container Debian image
  • Python tests on Ubuntu Noble
  • Python tests on the Dev Container Ubuntu image
  • Python tests on Ubuntu Jammy
  • ShellCheck
  • Feature validation
  • License checks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

CPython 3.8/3.9 ignore --with-openssl-rpath, leaving private OpenSSL libraries undiscoverable and causing installation to fail on Fedora without OpenSSL 3 compatibility libraries unless the runtime path is also set through LDFLAGS.

1 open issue
What changed in this PR

Updates the Python feature to address Fedora installation failures involving OpenSSL compatibility and additional-version handling.

Changes:

  • Adds a private OpenSSL 3 fallback on Fedora systems using OpenSSL 4, plus an SSL import check.
  • Limits comma splitting to parsing additionalVersions and documents the behavior.
  • Updates additional-version tests to Python 3.12–3.14 and bumps the feature to 1.8.1.
File Description
test/​python/​scenarios.json Updates additional Python versions in the test scenario.
test/​python/​alternatives_switchable_versions.sh Matches installation checks to Python 3.12–3.14.
src/​python/​NOTES.md Documents scoped comma splitting for additional versions.
src/​python/​install.sh Adds Fedora OpenSSL handling and fixes list parsing.
src/​python/​devcontainer-feature.json Bumps the feature version to 1.8.1.

Review effort: Balanced

Comment thread src/python/install.sh Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@v-Kaniska244
Kaniska (v-Kaniska244) marked this pull request as ready for review November 6, 2026 15:20
@v-Kaniska244
Kaniska (v-Kaniska244) requested a review from a team as a code owner November 6, 2026 15:20
Comment thread src/python/install.sh
make -j 8
make install

if [ "${ID}" = "fedora" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this for debugging? I guess we can remove it now?

This branch has not been deployed

No deployments
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