Title: Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS · Issue #96848 · python/cpython · GitHub
Open Graph Title: Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS · Issue #96848 · python/cpython
X Title: Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS · Issue #96848 · python/cpython
Description: python -X int_max_str_digits command is invalid: $ python -X int_max_str_digits Fatal 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: preinitial...
Open Graph Description: python -X int_max_str_digits command is invalid: $ python -X int_max_str_digits Fatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be >= 640 or 0 for unl...
X Description: python -X int_max_str_digits command is invalid: $ python -X int_max_str_digits Fatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be >= 640 or 0 for ...
Opengraph URL: https://github.com/python/cpython/issues/96848
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Minor parsing issue with new -X int_max_str_digits option if PYTHONINTMAXSTRDIGITS","articleBody":"``python -X int_max_str_digits`` command is invalid:\r\n\r\n```\r\n$ python -X int_max_str_digits\r\nFatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be \u003e= 640 or 0 for unlimited.\r\nPython runtime state: preinitialized\r\n```\r\n\r\nBut if PYTHONINTMAXSTRDIGITS environment variable is defined, the invalid option is no longer rejected:\r\n\r\n```\r\n$ PYTHONINTMAXSTRDIGITS=5000 python -X int_max_str_digits\r\nPython 3.12.0a0 (heads/main:e37ac5fbb6, Sep 15 2022, 15:03:41) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n\u003e\u003e\u003e \r\n```\r\n\r\nIt's just because the `valid` variable in config_init_int_max_str_digits() is not initialized again in the -X option code path, after the env var is parsed.\r\n\r\nI noticed this minor issue while backporting the change to Python 3.6 in Fedora for Red Hat.\r\n\r\ncc @tiran @gpshead ","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2022-09-15T13:10:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/96848/cpython/issues/96848"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6c66dc56-6fc5-4e5a-13b7-90fb09fd4794 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82BE:AA16D:7FCC29:B29DE4:696A20C8 |
| html-safe-nonce | fdc8a61faac3419abdc0299664d6cd81d95af52c2ec197a24b8ebfcebfd9ebc9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkJFOkFBMTZEOjdGQ0MyOTpCMjlERTQ6Njk2QTIwQzgiLCJ2aXNpdG9yX2lkIjoiODczMzQzMTg4NjM3NDM3OTcyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | df14b9c54c48b9cfef413d6f20933d6c18387bb0015de205edf329bd726574e6 |
| hovercard-subject-tag | issue:1374508564 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/96848/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6641b5270849d5133c572bc7e7c1a5c6f2ef67c3ce063e0b0d2952c7ba2c6894/python/cpython/issues/96848 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6641b5270849d5133c572bc7e7c1a5c6f2ef67c3ce063e0b0d2952c7ba2c6894/python/cpython/issues/96848 |
| og:image:alt | python -X int_max_str_digits command is invalid: $ python -X int_max_str_digits Fatal Python error: config_init_int_max_str_digits: -X int_max_str_digits: invalid limit; must be >= 640 or 0 for unl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width