Skip to content

Include debug/release and optimization level in the Python build/version line #137151

@disconnect3d

Description

@disconnect3d

Hi,

When discussing issues like this one and printing out Python lines etc. it would be nice if the given CPython build line like this:

Python 3.15.0a0 (heads/main:c6e6fe92cd8, Jul 20 2025, 13:06:47) [GCC 13.3.0] on linux

would include information regarding how the given CPython version was compiled: whether it uses LTO, whether --enable-optimizations was enabled etc.

Maybe we could have some letters like: O for optimized, L for LTO, P for PGO, B for LLVM's BOLT? Maybe even O{1,2,3} for -O{1,2,3} if we allow for choosing this.

Additionally, we could have some _testcapi.compiler_options string?

Has this already been discussed elsewhere?

I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy