In python 3.10, global flags, like (?i) will throw a FutureWarning about global flags not being at the front. In python 3.11+, this now becomes an exception.
We have done this on our end as we have moved to python 3.12, but due to corporate policy I can't easily propose those changes in a PR so I wanted to let you know.
The easy solution is to just move all global flags in all regular expressions to the front. As far as I can tell, (?i) is the only used global flag. We wrote a script to just replace (?i) in the regexs and then prepend (?i) in those cases where we removed it.
These are the regexes which need updating. Sorry I can't actually easily share the fixes. I wish I could.
In python 3.10, global flags, like
(?i)
will throw aFutureWarning
about global flags not being at the front. In python 3.11+, this now becomes an exception.See this issue: https://github.com/python/cpython/issues/83575
We have done this on our end as we have moved to python 3.12, but due to corporate policy I can't easily propose those changes in a PR so I wanted to let you know.
The easy solution is to just move all global flags in all regular expressions to the front. As far as I can tell,
(?i)
is the only used global flag. We wrote a script to just replace(?i)
in the regexs and then prepend(?i)
in those cases where we removed it.These are the regexes which need updating. Sorry I can't actually easily share the fixes. I wish I could.