See https://bugs.python.org/issue22493
I propose to deprecate (and then forbid in 3.7) the use of inline flags not at the start of regular expression. This will help to change the meaning of inline flags in the middle of the expression in future (in 3.8 or later).
DeprecationWarning: Flags not at the start of the expression
happens in textlib.removeDisabledParts()