google / gae-secure-scaffold-python3

Secure scaffold for Google App Engine static and dynamic Python websites
Apache License 2.0
31 stars 16 forks source link

(chore): Fix Python-app example startup #8

Closed leitea-google closed 2 years ago

leitea-google commented 2 years ago

This PR fixes 2 problems caused by new versions of dependencies:

1. ImportError: cannot import name 'escape' from 'jinja2' Jinja is a dependency of Flask and Flask V1.X.X uses the escape module from Jinja, however recently support for the escape module was dropped in newer versions of Jinja.

https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0 Reference: https://stackoverflow.com/questions/71718167/importerror-cannot-import-name-escape-from-jinja2

2. AttributeError: module 'mistune' has no attribute 'Renderer' It looks like the current version of Mistune library change some of their public functions. In order to get the python-app example running I had to update a few things:

Reference: https://mistune.readthedocs.io/en/latest/guide.html

@davidwtbuxton @miuraken Please, kindly review the updates. Thank you.