| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:81f3d9f3-c5fe-8299-8712-b2c6f35654dd |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B0DC:1773CF:2F4BDC:3E69AC:6B023446 |
| html-safe-nonce | 4962bb83421ce9e360d78c8b15c9190c1b2e0c07770b804fde9463eb86aedb40 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMERDOjE3NzNDRjoyRjRCREM6M0U2OUFDOjZCMDIzNDQ2IiwidmlzaXRvcl9pZCI6IjU5MjQ5NzYzNzIzOTIwMTQ5MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 46a3030a4b1cf483074d5785ef4d57a30a868e25ee0d45ff23c555c730f22270 |
| hovercard-subject-tag | pull_request:1798220960 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/117372/files |
| twitter:image | https://avatars.githubusercontent.com/u/308610?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/308610?s=400&v=4 |
| og:image:alt | Extract method for _read_inner, reducing complexity and indentation by 1.
Extract method for _raise_all and yield ParseErrors from _read_inner.
Prefer iterators to splat expansion and literal index... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/117372/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117372%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117372%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/117372/files |
| Reload | https://github.com/python/cpython/pull/117372/files |
| Reload | https://github.com/python/cpython/pull/117372/files |
| python | https://github.com/python |
| cpython | https://github.com/python/cpython |
| Code | https://github.com/python/cpython |
| Issues5k+ (5k+) | https://github.com/python/cpython/issues |
| Pull requests2.4k (2.4k) | https://github.com/python/cpython/pulls |
| Actions | https://github.com/python/cpython/actions |
| Projects | https://github.com/python/cpython/projects |
| Security and quality | https://github.com/python/cpython/security |
| Insights | https://github.com/python/cpython/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| jaraco | https://github.com/jaraco |
| python:main | https://github.com/python/cpython/tree/main |
| jaraco:feature/refactor-configparser-read-complexity | https://github.com/jaraco/cpython/tree/feature/refactor-configparser-read-complexity |
|
Conversation
5
| https://github.com/python/cpython/pull/117372 |
|
Commits
23
| https://github.com/python/cpython/pull/117372/commits |
|
Checks
0
| https://github.com/python/cpython/pull/117372/checks |
|
Files changed
| https://github.com/python/cpython/pull/117372/files |
| Please reload this page | https://github.com/python/cpython/pull/117372/files |
|
gh-117348: Refactored RawConfigParser._read for simplicity and comprehensibility
| https://github.com/python/cpython/pull/117372/files#top |
|
Show all changes
23 commits
| https://github.com/python/cpython/pull/117372/files |
|
a25ac00
Extract method for _read_inner, reducing complexity and indentation b…
jaraco Mar 27, 2024
| https://github.com/python/cpython/pull/117372/commits/a25ac002617c9756cd0f4ff8f0d0692134006592 |
|
1e69aae
Extract method for _raise_all and yield ParseErrors from _read_inner.
jaraco Mar 27, 2024
| https://github.com/python/cpython/pull/117372/commits/1e69aaecf0ae53540b798b698ee2ca7a7a243aab |
|
8c47781
Prefer iterators to splat expansion and literal indexing.
jaraco Mar 27, 2024
| https://github.com/python/cpython/pull/117372/commits/8c4778136e1f119b864838772986b2ea3252ec43 |
|
7479814
Extract method for _strip_comments. Reduces complexity by 7.
jaraco Mar 27, 2024
| https://github.com/python/cpython/pull/117372/commits/74798147d91270f8b084b4eadce18462e3ec871c |
|
a2fffee
Model the file lines in a class to encapsulate the comment status and…
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/a2fffee5d8d4b5122f0671acd7101743ba99c048 |
|
23468cb
Encapsulate the read state as a dataclass
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/23468cbaac87924417af3bce3f608289696a0bef |
|
3d1ef0a
Extract _handle_continuation_line and _handle_rest methods. Reduces c…
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/3d1ef0a7b05c9c05c75942e01f99a9feaf27e70f |
|
071baeb
Reindent
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/071baeb766e90a4d3e43ceed8ed1580e34e5eb0a |
|
81f4ce2
At least for now, collect errors in the ReadState
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/81f4ce2a52026656bbca67e86415dd19f81be8d9 |
|
8942cc1
Check for missing section header separately.
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/8942cc1522b5835e36df5a1cd04f7243b3b40de7 |
|
1e72168
Extract methods for _handle_header and _handle_option. Reduces comple…
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/1e72168d04d9d35c0b1e5a64496fab64de329e07 |
|
0dfd797
Remove unreachable code. Reduces complexity by 4.
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/0dfd797486420506be9ec92db15f8f001b237414 |
|
77ed897
Remove unreachable branch
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/77ed897299011cc7a288ba91caa6f7e97f80b2fb |
|
76f42d3
Handle error condition early. Reduces complexity by 1.
jaraco Mar 28, 2024
| https://github.com/python/cpython/pull/117372/commits/76f42d3d856db5d5c0230b9d3ca47885608692af |
|
c18a2bb
Add blurb
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/c18a2bb75844e132b35ab9560d5c6a38bdd8033f |
|
97aa785
Move _raise_all to ParsingError, as its behavior is most closely rela…
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/97aa785854da308047bd3026b59ee2fea73cbbac |
|
d310cb4
Split _strip* into separate methods.
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/d310cb404a0e9f3b5b0270f1008ca510ab8065db |
|
f2a355c
Refactor _strip_full to compute the strip just once and use 'not any'…
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/f2a355cd7cf45099133ab8b292b04a757466ba1b |
|
2492614
Replace use of 'sys.maxsize' with direct computation of the stripped …
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/249261416824eec48d70ae45103263f223d46eae |
|
4968591
Extract has_comments as a dynamic property.
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/496859151f009d6c3cbf38ece82524291048fc12 |
|
7d807bb
Implement clean as a cached property.
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/7d807bba8cc70a926af16261abdf50e98be6a94f |
|
29cb20f
Model comment prefixes in the RawConfigParser within a prefixes names…
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/29cb20f225216bc221e7b396eea1526157d83139 |
|
c834c35
Use a regular expression to search for the first match.
jaraco Mar 29, 2024
| https://github.com/python/cpython/pull/117372/commits/c834c356f72d07e03ad8ece49f72ebb4ee8759b4 |
|
Clear filters
| https://github.com/python/cpython/pull/117372/files |
| Please reload this page | https://github.com/python/cpython/pull/117372/files |
| Please reload this page | https://github.com/python/cpython/pull/117372/files |
|
configparser.py
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
2024-03-29-12-07-26.gh-issue-117348.WjCYvK.rst
| https://github.com/python/cpython/pull/117372/files#diff-c52c8c2717a0ae829a79a6d09510528bc6567d14d8a55d217028b6185657ea60 |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L417 |
| Lib/configparser.py | https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
View file
| https://github.com/jaraco/cpython/blob/c834c356f72d07e03ad8ece49f72ebb4ee8759b4/Lib/configparser.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/117372/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
|
| https://github.com/python/cpython/pull/117372/files#diff-ca80d44aeeadd5e4966195b99aff106abb3e7b0b5356b7499125ee021bd84777 |
| Misc/NEWS.d/next/Library/2024-03-29-12-07-26.gh-issue-117348.WjCYvK.rst | https://github.com/python/cpython/pull/117372/files#diff-c52c8c2717a0ae829a79a6d09510528bc6567d14d8a55d217028b6185657ea60 |
|
View file
| https://github.com/jaraco/cpython/blob/c834c356f72d07e03ad8ece49f72ebb4ee8759b4/Misc/NEWS.d/next/Library/2024-03-29-12-07-26.gh-issue-117348.WjCYvK.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/117372/{{ revealButtonHref }} |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |