Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.10.X] Turn off debug information in C extension #4863

Closed
wants to merge 1 commit into from

Commits on Dec 21, 2022

  1. Turn off debug information in C extension

    Previously, pydantic used the default Python CFLAGS which include `-g`
    (debug level 2). This is good for debugging at the C level, but it
    significantly increases the size of the C extension shared library, and
    is probably not needed by the vast majority of pydantic users. Thus, it
    seems a better tradeoff to turn debug info off.
    
    This can be overridden when building pydantic from source (not from PyPI
    wheel) by using `CFLAGS='-O3 -g'`.
    
    This change reduces the pydantic binary on cp310-linux-x86_64 from 31MB
    (12MB wheel) to 8.9MB (3MB wheel).
    
    Fixes pydantic#2276
    bluetech committed Dec 21, 2022
    Configuration menu
    Copy the full SHA
    2b4145f View commit details
    Browse the repository at this point in the history