[issue45869] Unicode and acii regular expressions do not agree on ascii space characters

2021-11-23 Thread Joran van Apeldoorn
Joran van Apeldoorn added the comment: Hi, I was not suggesting that the documentation literally says they should be the same but it might be unexpected for users if ASCCI characters change properties depending on whether they are considered in a unicode or pure ASCII setting

[issue45869] Unicode and acii regular expressions do not agree on ascii space characters

2021-11-22 Thread Joran van Apeldoorn
Joran van Apeldoorn added the comment: Small addition, the sre categories CATEGORY_LINEBREAK and CATEGORY_UNI_LINEBREAK also do not agree on ASCII characters. The first is only '\n' while the second also includes for example '\r' and some others. These do not seem to correspond to anything

[issue45869] Unicode and acii regular expressions do not agree on ascii space characters

2021-11-22 Thread Joran van Apeldoorn
Change by Joran van Apeldoorn : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue45869> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45869] Unicode and acii regular expressions do not agree on ascii space characters

2021-11-22 Thread Joran van Apeldoorn
New submission from Joran van Apeldoorn : The expectation would be that the re.A (or re.ASCII) flag should not impact the matching behavior of a regular expression on strings consisting only of ASCII characters. However, for the characters 0x1c till 0x1f, the classes \s and \S differ

[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2019-08-29 Thread Joran van Apeldoorn
Joran van Apeldoorn added the comment: After compiling 3.7 and 3.8 as well it seems that the change happened between those versions. I was a able to patch compiler.c for 3.9 to make it work (first time changing cpython internals, so no guarantees). Patch is attached. This trips up one

[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2019-08-29 Thread Joran van Apeldoorn
Joran van Apeldoorn added the comment: Digging around with the disassembler shows that this originates in the bytecode. Code: import dis src = """ def printingdec(f): raise Exception() return f def dummydec(f): return f @printingdec @dummydec def

[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2019-08-28 Thread Joran van Apeldoorn
New submission from Joran van Apeldoorn : When applying multiple decorators to a function, a traceback from the top generator shows the bottom generator instead. For example def printingdec(f): raise Exception() return f def dummydec(f): return f @printingdec