Title: PyInterpreterState.config.int_max_str_digits Should Not Be Modified · Issue #98417 · python/cpython · GitHub
Open Graph Title: PyInterpreterState.config.int_max_str_digits Should Not Be Modified · Issue #98417 · python/cpython
X Title: PyInterpreterState.config.int_max_str_digits Should Not Be Modified · Issue #98417 · python/cpython
Description: PyConfig is for configuring the runtime during initialization, not for storing runtime state. Currently in sys.set_int_max_str_digits() we are modifying the interpreter's PyConfig directly. That field should never be modified outside run...
Open Graph Description: PyConfig is for configuring the runtime during initialization, not for storing runtime state. Currently in sys.set_int_max_str_digits() we are modifying the interpreter's PyConfig directly. That fi...
X Description: PyConfig is for configuring the runtime during initialization, not for storing runtime state. Currently in sys.set_int_max_str_digits() we are modifying the interpreter's PyConfig directly. Tha...
Opengraph URL: https://github.com/python/cpython/issues/98417
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PyInterpreterState.config.int_max_str_digits Should Not Be Modified","articleBody":"`PyConfig` is for configuring the runtime during initialization, not for storing runtime state. Currently in `sys.set_int_max_str_digits()` we are modifying the interpreter's PyConfig directly.\r\n\r\nThat field should never be modified outside runtime init. Instead, the config value should be copied to a field on `PyInterpreterState` and that is what should be modified by `sys` (and used in longobject.c).\r\n\r\nIn fact, this is mostly what we were doing until a couple weeks ago (and what we still are doing in 3.11 and earlier). This was changed on main (3.12) in gh-96944. The fix is relatively trivial.\r\n\r\nCC @gpshead","author":{"url":"https://github.com/ericsnowcurrently","@type":"Person","name":"ericsnowcurrently"},"datePublished":"2022-10-18T22:46:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/98417/cpython/issues/98417"}
| 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:a32e7ca2-8c51-baff-a491-17c7ef8cdc9c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C70:7F615:96A1B4:CAA5BE:696991A5 |
| html-safe-nonce | d28adbd0cfd66fd0e9ca2f68bb6088c93348cab518c2f3fbf9861ad8b2220100 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzcwOjdGNjE1Ojk2QTFCNDpDQUE1QkU6Njk2OTkxQTUiLCJ2aXNpdG9yX2lkIjoiMzg3ODExOTE2MDk1NTkwMDMyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e4d380ae2ed4d334da6e8281b00285c0d9c3990114331916a9caba9fba144b5f |
| hovercard-subject-tag | issue:1413936864 |
| 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/98417/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7ea3bcf87efaba3e0a493d398a00f45cb5d8894ba7e47f8d952b625e4aec64c7/python/cpython/issues/98417 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7ea3bcf87efaba3e0a493d398a00f45cb5d8894ba7e47f8d952b625e4aec64c7/python/cpython/issues/98417 |
| og:image:alt | PyConfig is for configuring the runtime during initialization, not for storing runtime state. Currently in sys.set_int_max_str_digits() we are modifying the interpreter's PyConfig directly. That fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ericsnowcurrently |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| 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 | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width