Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin markupsafe version #33

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Conversation

drnextgis
Copy link
Contributor

@drnextgis drnextgis commented Feb 25, 2022

pallets/markupsafe#286

>>> import jinja2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/usr/local/lib/python3.9/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/usr/local/lib/python3.9/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.9/site-packages/markupsafe/__init__.py)

@vincentsarago
Copy link
Member

@drnextgis Thanks for the PR, I hope you didn't lose too much time on this issue (it took us couple hours early this week 😓 )

I think a better fix will be to pin jinja2>=3.0,<4.0 which should be allowed by other package. In TiTiler as in fastapi we require "jinja2 >=2.11.2,<4.0.0" which will usually mean user will get the latest 3.0.

https://github.com/tiangolo/fastapi/blob/master/pyproject.toml#L89

https://github.com/developmentseed/titiler/pull/436/files#diff-ef5efd645d0059aab13ef237a56af70342972339573c2411199637a1b9a30354R11

@@ -7,7 +7,7 @@

inst_reqs = [
"titiler.pgstac==0.1.0a3",
"jinja2>=2.11.2,<3.0.0",
"jinja2>=3.0,<4.0",
Copy link
Member

@vincentsarago vincentsarago Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: we could remove this once moved to the next version of titiler-pgstac (which include titiler=0.5.0)

@vincentsarago vincentsarago merged commit 66085ac into developmentseed:master Feb 25, 2022
@drnextgis drnextgis deleted the markupsafe branch February 25, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants