edgewall / genshi

Python toolkit for generation of output for the web
http://genshi.edgewall.org
Other
86 stars 35 forks source link

DeprecationWarning in interpolation module #15

Closed jaraco closed 2 years ago

jaraco commented 5 years ago

On Python 3.7.1

$ pip-run genshi -- -W error -c 'import genshi.template.interpolation'
Collecting genshi
  Using cached https://files.pythonhosted.org/packages/7f/76/a6c9ba86f84100ee67ca69f8cd7c3dcd58a591502dd8729ce1cbbaae8266/Genshi-0.7.1-py3-none-any.whl
Installing collected packages: genshi
Successfully installed genshi-0.7.1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-p31q4af_/genshi/template/__init__.py", line 20, in <module>
    from genshi.template.markup import MarkupTemplate
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-p31q4af_/genshi/template/markup.py", line 25, in <module>
    from genshi.template.interpolation import interpolate
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-p31q4af_/genshi/template/interpolation.py", line 36, in <module>
    PseudoToken
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 234, in compile
    return _compile(pattern, flags)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 286, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 930, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 426, in _parse_sub
    not nested and not items))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 796, in _parse
    DeprecationWarning, stacklevel=nested + 6
DeprecationWarning: Flags not at the start of the expression '[uU]?[rR]?("""|\\\'\\\'\\' (truncated)
ivanporras commented 2 years ago

any solution?

hodgestar commented 2 years ago

I think this was addressed by #63. If you can confirm, then we can close this and it will be included in the next release.

jaraco commented 2 years ago

Can confirm the fix:

~ $ pip-run -q --use-pep517 git+https://github.com/edgewall/genshi -- -W error -c 'import genshi.template.interpolation' && echo 'worked!'
worked!
ivanporras commented 2 years ago

I will try it, thanks