mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016)
Running our unit tests with `-bb` enabled triggered this failure.
This commit is contained in:
parent
7445381c60
commit
171b9a354e
4 changed files with 19 additions and 3 deletions
|
@ -765,7 +765,7 @@ def _parse(source, state, verbose, nested, first=False):
|
|||
if not first or subpattern:
|
||||
import warnings
|
||||
warnings.warn(
|
||||
'Flags not at the start of the expression %s%s' % (
|
||||
'Flags not at the start of the expression %r%s' % (
|
||||
source.string[:20], # truncate long regexes
|
||||
' (truncated)' if len(source.string) > 20 else '',
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue