cpython/Misc/NEWS.d
Jason R. Coombs 019143fecb
gh-117348: Refactored RawConfigParser._read for similicity and comprehensibility (#117372)
* Extract method for _read_inner, reducing complexity and indentation by 1.

* Extract method for _raise_all and yield ParseErrors from _read_inner.

Reduces complexity by 1 and reduces touch points for handling errors in _read_inner.

* Prefer iterators to splat expansion and literal indexing.

* Extract method for _strip_comments. Reduces complexity by 7.

* Model the file lines in a class to encapsulate the comment status and cleaned value.

* Encapsulate the read state as a dataclass

* Extract _handle_continuation_line and _handle_rest methods. Reduces complexity by 8.

* Reindent

* At least for now, collect errors in the ReadState

* Check for missing section header separately.

* Extract methods for _handle_header and _handle_option. Reduces complexity by 6.

* Remove unreachable code. Reduces complexity by 4.

* Remove unreachable branch

* Handle error condition early. Reduces complexity by 1.

* Add blurb

* Move _raise_all to ParsingError, as its behavior is most closely related to the exception class and not the reader.

* Split _strip* into separate methods.

* Refactor _strip_full to compute the strip just once and use 'not any' to determine the factor.

* Replace use of 'sys.maxsize' with direct computation of the stripped value.

* Extract has_comments as a dynamic property.

* Implement clean as a cached property.

* Model comment prefixes in the RawConfigParser within a prefixes namespace.

* Use a regular expression to search for the first match.

Avoids mutating variables and tricky logic and over-computing all of the starts when only the first is relevant.
2024-03-29 16:06:09 -04:00
..
next gh-117348: Refactored RawConfigParser._read for similicity and comprehensibility (#117372) 2024-03-29 16:06:09 -04:00
3.5.0.rst
3.5.0a1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.5.0a2.rst
3.5.0a3.rst
3.5.0a4.rst
3.5.0b1.rst
3.5.0b2.rst
3.5.0b3.rst
3.5.0b4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.5.0rc1.rst gh-109634: Use :samp: role (GH-109635) 2023-09-23 09:31:20 +03:00
3.5.0rc2.rst
3.5.0rc3.rst
3.5.0rc4.rst
3.5.1.rst
3.5.1rc1.rst gh-109634: Use :samp: role (GH-109635) 2023-09-23 09:31:20 +03:00
3.5.2.rst
3.5.2rc1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.5.3.rst Add missing sections to blurbs (#114553) 2024-02-12 16:16:16 +02:00
3.5.3rc1.rst gh-95454: Replace truthy/falsy with true/false (GH-95456) 2022-07-30 00:42:21 -07:00
3.5.4.rst Docs: Update Donghee Na's name (#109743) 2023-09-22 12:52:57 -06:00
3.5.4rc1.rst Docs: Update Donghee Na's name (#109743) 2023-09-22 12:52:57 -06:00
3.5.5.rst
3.5.5rc1.rst
3.6.0.rst Add missing sections to blurbs (#114553) 2024-02-12 16:16:16 +02:00
3.6.0a1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.0a2.rst gh-101100: Fix Sphinx warning in references with asterisks (#113029) 2023-12-13 09:24:55 +02:00
3.6.0a3.rst NEWS: Reorder items by section (GH-92373) 2022-05-06 13:58:58 +09:00
3.6.0a4.rst
3.6.0b1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.0b2.rst gh-95454: Replace truthy/falsy with true/false (GH-95456) 2022-07-30 00:42:21 -07:00
3.6.0b3.rst
3.6.0b4.rst
3.6.0rc1.rst gh-106909: Use role :const: for referencing module constants (GH-106910) 2023-07-21 12:40:37 +03:00
3.6.0rc2.rst
3.6.1.rst
3.6.1rc1.rst
3.6.2.rst Add missing sections to blurbs (#114553) 2024-02-12 16:16:16 +02:00
3.6.2rc1.rst Docs: Update Donghee Na's name (#109743) 2023-09-22 12:52:57 -06:00
3.6.2rc2.rst
3.6.3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.3rc1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.4.rst
3.6.4rc1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.5.rst
3.6.5rc1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.6.6.rst
3.6.6rc1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0.rst
3.7.0a1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0a2.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0a3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0a4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0b1.rst
3.7.0b2.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0b3.rst gh-104773: PEP 594: Remove the aifc module (#104933) 2023-05-25 17:20:48 +02:00
3.7.0b4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0b5.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.7.0rc1.rst
3.8.0a1.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.8.0a2.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.8.0a3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.8.0a4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.8.0b1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.9.0a1.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.9.0a2.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.9.0a3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.9.0a4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.9.0a5.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.9.0a6.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.9.0b1.rst gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (#114060) 2024-01-14 20:38:53 +00:00
3.10.0a1.rst gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (#114060) 2024-01-14 20:38:53 +00:00
3.10.0a2.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.10.0a3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.10.0a4.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.10.0a5.rst gh-106948: Add standard external names to nitpick_ignore (GH-106949) 2023-07-22 21:35:22 +03:00
3.10.0a6.rst Docs: mark up NotImplemented using the :data: role throughout the docs (#116135) 2024-02-29 20:46:12 +00:00
3.10.0a7.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.10.0b1.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.11.0a1.rst Docs: mark up NotImplemented using the :data: role throughout the docs (#116135) 2024-02-29 20:46:12 +00:00
3.11.0a2.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.11.0a3.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.11.0a4.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.11.0a5.rst gh-101100: Fix Sphinx Lint warnings in Misc/ (#113946) 2024-01-13 00:25:04 +02:00
3.11.0a6.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.11.0a7.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.11.0b1.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.12.0a1.rst Remove more stray backticks from NEWS files (#115374) 2024-02-13 18:07:16 +01:00
3.12.0a2.rst gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (#114060) 2024-01-14 20:38:53 +00:00
3.12.0a3.rst gh-109634: Use :samp: role (GH-109635) 2023-09-23 09:31:20 +03:00
3.12.0a4.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.12.0a5.rst Docs: Update Donghee Na's name (#109743) 2023-09-22 12:52:57 -06:00
3.12.0a6.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.12.0a7.rst gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (#114531) 2024-01-27 06:06:59 -07:00
3.12.0b1.rst Remove more stray backticks from NEWS files (#115374) 2024-02-13 18:07:16 +01:00
3.13.0a1.rst Remove more stray backticks from NEWS files (#115374) 2024-02-13 18:07:16 +01:00
3.13.0a2.rst gh-114364: Fix awkward wording about mmap.mmap.seekable (#114374) 2024-02-01 06:03:58 +00:00
3.13.0a3.rst Python 3.13.0a3 2024-01-17 13:14:40 +01:00
3.13.0a4.rst Python 3.13.0a4 2024-02-15 14:38:42 +01:00
3.13.0a5.rst Python 3.13.0a5 2024-03-12 21:11:08 +01:00