From fd48e7bb277a3d81025f6baf38fcf83c410b5c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 8 Jul 2022 16:31:18 -0700 Subject: [PATCH] Do not escape period in package names for PEP-427 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The suggested code and the text contradicated each other, after discussing this seems the code example was the correct intent and is what setuptools is doing. Signed-off-by: Bernát Gábor --- pep-0427.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pep-0427.txt b/pep-0427.txt index 423fc11d4b7..42f86ab2458 100644 --- a/pep-0427.txt +++ b/pep-0427.txt @@ -167,7 +167,8 @@ Escaping and Unicode '''''''''''''''''''' Each component of the filename is escaped by replacing runs of -non-alphanumeric characters with an underscore ``_``:: +non-alphanumeric characters minus the period character with an underscore +``_``:: re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)