Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS #96848

Closed
Labels
3.10only security fixes3.11only security fixes3.12only security fixes3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifetype-bugAn unexpected behavior, bug, or error
@vstinner

Description

@vstinner

python -X int_max_str_digits command is invalid:

$ python -X int_max_str_digitsFatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be >= 640 or 0 for unlimited.Python runtime state: preinitialized

But if PYTHONINTMAXSTRDIGITS environment variable is defined, the invalid option is no longer rejected:

$ PYTHONINTMAXSTRDIGITS=5000 python -X int_max_str_digitsPython 3.12.0a0 (heads/main:e37ac5fbb6, Sep 15 2022, 15:03:41) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)] on linuxType "help", "copyright", "credits" or "license" for more information.>>>

It's just because thevalid variable in config_init_int_max_str_digits() is not initialized again in the -X option code path, after the env var is parsed.

I noticed this minor issue while backporting the change to Python 3.6 in Fedora for Red Hat.

cc@tiran@gpshead

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixes3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifetype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp