From 46751c6fbce254425a7c3b2e824fc15a3a825630 Mon Sep 17 00:00:00 2001 From: Mark <46539611+mark99i@users.noreply.github.com> Date: Fri, 8 Nov 2019 01:19:38 +0300 Subject: [PATCH 1/2] fix definition of multiple ']' in header in old version in example header is "[i love [python] lang]" parse as "i love [python", only up to the first character ']'. once fixed, multiple ']' can be used and this will not cause the header to be clipped. now saving works correctly, but reading does not --- Lib/configparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/configparser.py b/Lib/configparser.py index 924cc56a3f150d..209e8abd07d386 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -563,7 +563,7 @@ class RawConfigParser(MutableMapping): # Regular expressions for parsing section headers and options _SECT_TMPL = r""" \[ # [ - (?P
[^]]+) # very permissive! + (?P
.*) # very permissive! \] # ] """ _OPT_TMPL = r""" From 3830cb70ae36d6dfe2d11db2ae780c30f7a0ab76 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2019 06:08:43 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2019-11-08-06-08-42.bpo-38741.pShzDL.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2019-11-08-06-08-42.bpo-38741.pShzDL.rst diff --git a/Misc/NEWS.d/next/Library/2019-11-08-06-08-42.bpo-38741.pShzDL.rst b/Misc/NEWS.d/next/Library/2019-11-08-06-08-42.bpo-38741.pShzDL.rst new file mode 100644 index 00000000000000..f5f55891f42c35 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-11-08-06-08-42.bpo-38741.pShzDL.rst @@ -0,0 +1,3 @@ +in example header is "[i love [python] lang]" +parse as "i love [python", only up to the first character ']'. +now saving works correctly, but reading does not \ No newline at end of file