This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jugmac00
Recipients ezio.melotti, jugmac00, mrabarnett, serhiy.storchaka
Date 2020-01-20.13:03:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579525391.78.0.735779249467.issue39394@roundup.psfhosted.org>
In-reply-to
Content
> Why do you want to output the full regular expression?

The current output gives no clue about which flag is problematic, nor does it show the complete output (which at least would include the problematic flag), nor does it show the exact line, as it refers only to the line where compile gets called.

The warning points to following line ( https://github.com/jedie/python-creole/blob/4e74f29daaf5026a3d4d6dae9f2e74f5f3655439/creole/parser/creol2html_parser.py#L49-L50 ):

cell_re = re.compile(SpecialRules.cell, re.VERBOSE | re.UNICODE)


And SpecialRules.cell is a quite a big class ( https://github.com/jedie/python-creole/blob/4e74f29daaf5026a3d4d6dae9f2e74f5f3655439/creole/parser/creol2html_rules.py#L16-L97 ) defining lots of partial expressions.

Even if spotting this line ( https://github.com/jedie/python-creole/blob/4e74f29daaf5026a3d4d6dae9f2e74f5f3655439/creole/parser/creol2html_rules.py#L54 ) at the first glance it looks like it starts with the flag and should be correct (but is not as it turned out later).


> Is not source file path, line number, and starting 20 characters not enough to identify the affected regular expression?

It definitely was not enough for me (new to this code base as I only tried to report deprecation warnings in my application), and when you have a look at the comment ( https://github.com/jedie/python-creole/issues/31#issuecomment-575983117 ) it even was not enough for the author/maintainer of this package.

Do you expect any downside of printing the complete warning?
History
Date User Action Args
2020-01-20 13:03:11jugmac00setrecipients: + jugmac00, ezio.melotti, mrabarnett, serhiy.storchaka
2020-01-20 13:03:11jugmac00setmessageid: <1579525391.78.0.735779249467.issue39394@roundup.psfhosted.org>
2020-01-20 13:03:11jugmac00linkissue39394 messages
2020-01-20 13:03:11jugmac00create