Bug 1787962 - python-mako fails to build with Python 3.9: DeprecationWarning treated as error: The parser module is deprecated
Summary: python-mako fails to build with Python 3.9: DeprecationWarning treated as err...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-mako
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1793184
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-05 23:23 UTC by Miro Hrončok
Modified: 2020-02-28 09:58 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-28 09:58:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sqlalchemy mako issues 310 0 None closed Python 3.9: DeprecationWarning: The parser module is deprecated, tests fail 2020-02-28 09:01:23 UTC

Description Miro Hrončok 2020-01-05 23:23:18 UTC
python-mako fails to build with Python 3.9.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/mako-rel_1_1_0/test/test_template.py", line 1391, in _do_test_traceback
    template = Template(**templateargs)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/template.py", line 348, in __init__
    module = self._compile_from_file(path, filename)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/template.py", line 430, in _compile_from_file
    code, module = _compile_text(self, data, filename)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/template.py", line 733, in _compile_text
    source, lexer = _compile(
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/template.py", line 712, in _compile
    node = lexer.parse()
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/lexer.py", line 272, in parse
    if self.match_python_block():
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/lexer.py", line 412, in match_python_block
    self.append_node(
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/lexer.py", line 152, in append_node
    node = nodecls(*args, **kwargs)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/parsetree.py", line 159, in __init__
    self.code = ast.PythonCode(text, **self.exception_kwargs)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/ast.py", line 43, in __init__
    expr = pyparser.parse(code.lstrip(), "exec", **exception_kwargs)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/pyparser.py", line 47, in parse
    raise exceptions.SyntaxException(
mako.exceptions.SyntaxException: (SyntaxError) invalid syntax (<unknown>, line 1) ("print 'Alors vous imaginez ma surprise, au lever d") in file '/builddir/build/BUILD/mako-rel_1_1_0/test/templates/unicode_runtime_error.html' at line: 2 char: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/mako-rel_1_1_0/test/test_template.py", line 1408, in _do_test
    self._do_test_traceback(utf8, memory, syntax)
  File "/builddir/build/BUILD/mako-rel_1_1_0/test/test_template.py", line 1396, in _do_test_traceback
    tback = exceptions.RichTraceback()
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/exceptions.py", line 93, in __init__
    self.records = self._init(traceback)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/exceptions.py", line 242, in _init
    encoding = util.parse_encoding(fp)
  File "/builddir/build/BUILD/mako-rel_1_1_0/mako/util.py", line 260, in parse_encoding
    import parser
DeprecationWarning: The parser module is deprecated and will be removed in future versions of Python

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01138896-python-mako/

For all our attempts to build python-mako with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-mako/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 2 Michael Bayer 2020-01-20 21:17:57 UTC
Mako 1.1.1 is released which includes this fix.

Comment 4 Ben Cotton 2020-02-11 16:33:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.


Note You need to log in before you can comment on or make changes to this bug.