From Fedora Project Wiki

< Changes

Revision as of 00:09, 24 May 2023 by Cstratak (talk | contribs) (Created page with "= Python Extension Flags Reduction <!-- The name of your change proposal --> = {{Change_Proposal_Banner}} == Summary == <!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". --> Further reduce the build flags (CFLA...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Python Extension Flags Reduction

Important.png
This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Summary

Further reduce the build flags (CFLAGS, CXXFLAGS and LDFLAGS) saved in the Python's distutils module for building extension modules to only the ones required for binary compatibility with the main interpreter. This is a continuation of the https://fedoraproject.org/wiki/Changes/Python_Extension_Flags change.

Owner


Current status

  • Targeted release: Fedora Linux 39
  • Last updated: 2023-05-24
  • [<will be assigned by the Wrangler> devel thread]
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

After https://fedoraproject.org/wiki/Changes/Python_Extension_Flags we uncoupled some distro specific compilation and linker flags from distutils, meaning users who build their own Python C extensions wouldn't get some Fedora specific flags such as the annobin ones.

However with an ever increasing set of compiler flags being applied on top as compilers and security standards evolve (e.g. -D_FORTIFY_SOURCE=3) it becomes a heavier burden on the python maintainers to vet each change that might leak into distutils which then applied on user-built C extensions. Instead of removing only some flags we will remove all of them that don't preserve binary compatibility with the main interpreter.

Similarly, when a user builds their own C programs, no compiler flags are applied by default and the user is free to decide. Syncing building Python C extensions to that experience is the next logical step.

Feedback

Benefit to Fedora

Scope

  • Proposal owners:
  • Other developers:
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Community Initiatives:

Upgrade/compatibility impact

How To Test

User Experience

Dependencies

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No


Documentation

N/A (not a System Wide Change)

Release Notes