[New-bugs-announce] [issue44892] Percentage character (%) inside a comment is badly recognized when using configparser

Diego Ramirez report at bugs.python.org
Wed Aug 11 16:32:21 EDT 2021


New submission from Diego Ramirez <dr01191115 at gmail.com>:

On the Pip GitHub issue tracker (https://github.com/pypa/pip/issues/10348), a user reported a strange behaviour when using a config file (setup.cfg) on its project.

The config file had a percentage character ("%") inside a commentary. But the module "configparser" failed with traceback:

    configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%' in string formatting

We consider that the character was badly recognized as a part of the file, when it was just a part of an inline comment.

Is there any way to fix this bug?

----------
components: Library (Lib)
messages: 399415
nosy: DiddiLeija
priority: normal
severity: normal
status: open
title: Percentage character (%) inside a comment is badly recognized when using configparser
type: crash
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44892>
_______________________________________


More information about the New-bugs-announce mailing list