Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Jinja2 for openSUSE:Factory 
checked in at 2021-10-20 20:23:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Jinja2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-Jinja2.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Jinja2"

Wed Oct 20 20:23:17 2021 rev:45 rq:924643 version:3.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Jinja2/python-Jinja2.changes      
2021-09-11 22:24:22.959377864 +0200
+++ /work/SRC/openSUSE:Factory/.python-Jinja2.new.1890/python-Jinja2.changes    
2021-10-20 20:23:58.961366904 +0200
@@ -1,0 +2,15 @@
+Sun Oct 10 00:16:28 UTC 2021 - Michael Str??der <mich...@stroeder.com>
+
+- dropped obsolete no-warnings-as-errors.patch
+- update to 3.0.2
+  * Fix a loop scoping bug that caused assignments in nested loops to still
+    be referenced outside of it. #1427
+  * Make compile_templates deterministic for filter and import names. #1452, 
#1453
+  * Revert an unintended change that caused Undefined to act like
+    StrictUndefined for the in operator. #1448
+  * Imported macros have access to the current template globals in async
+    environments. #1494
+  * PackageLoader will not include a current directory (.) path segment.
+    This allows loading templates from the root of a zip import. #1467
+
+-------------------------------------------------------------------
@@ -15,0 +31,5 @@
+
+-------------------------------------------------------------------
+Sat Jun 19 12:42:15 UTC 2021 - Michael Str??der <mich...@stroeder.com>
+
+- updated upstream project URL

Old:
----
  Jinja2-3.0.1.tar.gz
  no-warnings-as-errors.patch

New:
----
  Jinja2-3.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Jinja2.spec ++++++
--- /var/tmp/diff_new_pack.OKayyO/_old  2021-10-20 20:23:59.477367223 +0200
+++ /var/tmp/diff_new_pack.OKayyO/_new  2021-10-20 20:23:59.477367223 +0200
@@ -24,13 +24,12 @@
 %bcond_without test
 %endif
 Name:           python-Jinja2
-Version:        3.0.1
+Version:        3.0.2
 Release:        0
 Summary:        A template engine written in pure Python
 License:        BSD-3-Clause
 URL:            https://jinja.palletsprojects.com
 Source:         
https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
-Patch0:         no-warnings-as-errors.patch
 BuildRequires:  %{python_module MarkupSafe >= 0.23}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
@@ -52,7 +51,6 @@
 
 %prep
 %setup -q -n Jinja2-%{version}
-%autopatch -p1
 dos2unix LICENSE.rst # Fix wrong EOL encoding
 
 %build

++++++ Jinja2-3.0.1.tar.gz -> Jinja2-3.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/CHANGES.rst new/Jinja2-3.0.2/CHANGES.rst
--- old/Jinja2-3.0.1/CHANGES.rst        2021-05-18 22:38:08.000000000 +0200
+++ new/Jinja2-3.0.2/CHANGES.rst        2021-10-05 02:48:02.000000000 +0200
@@ -1,5 +1,23 @@
 .. currentmodule:: jinja2
 
+Version 3.0.2
+-------------
+
+Released 2021-10-04
+
+-   Fix a loop scoping bug that caused assignments in nested loops
+    to still be referenced outside of it. :issue:`1427`
+-   Make ``compile_templates`` deterministic for filter and import
+    names. :issue:`1452, 1453`
+-   Revert an unintended change that caused ``Undefined`` to act like
+    ``StrictUndefined`` for the ``in`` operator. :issue:`1448`
+-   Imported macros have access to the current template globals in async
+    environments. :issue:`1494`
+-   ``PackageLoader`` will not include a current directory (.) path
+    segment. This allows loading templates from the root of a zip
+    import. :issue:`1467`
+
+
 Version 3.0.1
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/PKG-INFO new/Jinja2-3.0.2/PKG-INFO
--- old/Jinja2-3.0.1/PKG-INFO   2021-05-18 22:38:40.768150800 +0200
+++ new/Jinja2-3.0.2/PKG-INFO   2021-10-05 02:48:54.677827000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Jinja2
-Version: 3.0.1
+Version: 3.0.2
 Summary: A very fast and expressive template engine.
 Home-page: https://palletsprojects.com/p/jinja/
 Author: Armin Ronacher
@@ -15,85 +15,6 @@
 Project-URL: Issue Tracker, https://github.com/pallets/jinja/issues/
 Project-URL: Twitter, https://twitter.com/PalletsTeam
 Project-URL: Chat, https://discord.gg/pallets
-Description: Jinja
-        =====
-        
-        Jinja is a fast, expressive, extensible templating engine. Special
-        placeholders in the template allow writing code similar to Python
-        syntax. Then the template is passed data to render the final document.
-        
-        It includes:
-        
-        -   Template inheritance and inclusion.
-        -   Define and import macros within templates.
-        -   HTML templates can use autoescaping to prevent XSS from untrusted
-            user input.
-        -   A sandboxed environment can safely render untrusted templates.
-        -   AsyncIO support for generating templates and calling async
-            functions.
-        -   I18N support with Babel.
-        -   Templates are compiled to optimized Python code just-in-time and
-            cached, or can be compiled ahead-of-time.
-        -   Exceptions point to the correct line in templates to make debugging
-            easier.
-        -   Extensible filters, tests, functions, and even syntax.
-        
-        Jinja's philosophy is that while application logic belongs in Python if
-        possible, it shouldn't make the template designer's job difficult by
-        restricting functionality too much.
-        
-        
-        Installing
-        ----------
-        
-        Install and update using `pip`_:
-        
-        .. code-block:: text
-        
-            $ pip install -U Jinja2
-        
-        .. _pip: https://pip.pypa.io/en/stable/quickstart/
-        
-        
-        In A Nutshell
-        -------------
-        
-        .. code-block:: jinja
-        
-            {% extends "base.html" %}
-            {% block title %}Members{% endblock %}
-            {% block content %}
-              <ul>
-              {% for user in users %}
-                <li><a href="{{ user.url }}">{{ user.username }}</a></li>
-              {% endfor %}
-              </ul>
-            {% endblock %}
-        
-        
-        Donate
-        ------
-        
-        The Pallets organization develops and supports Jinja and other popular
-        packages. In order to grow the community of contributors and users, and
-        allow the maintainers to devote more time to the projects, `please
-        donate today`_.
-        
-        .. _please donate today: https://palletsprojects.com/donate
-        
-        
-        Links
-        -----
-        
-        -   Documentation: https://jinja.palletsprojects.com/
-        -   Changes: https://jinja.palletsprojects.com/changes/
-        -   PyPI Releases: https://pypi.org/project/Jinja2/
-        -   Source Code: https://github.com/pallets/jinja/
-        -   Issue Tracker: https://github.com/pallets/jinja/issues/
-        -   Website: https://palletsprojects.com/p/jinja/
-        -   Twitter: https://twitter.com/PalletsTeam
-        -   Chat: https://discord.gg/pallets
-        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Web Environment
@@ -106,3 +27,85 @@
 Requires-Python: >=3.6
 Description-Content-Type: text/x-rst
 Provides-Extra: i18n
+License-File: LICENSE.rst
+
+Jinja
+=====
+
+Jinja is a fast, expressive, extensible templating engine. Special
+placeholders in the template allow writing code similar to Python
+syntax. Then the template is passed data to render the final document.
+
+It includes:
+
+-   Template inheritance and inclusion.
+-   Define and import macros within templates.
+-   HTML templates can use autoescaping to prevent XSS from untrusted
+    user input.
+-   A sandboxed environment can safely render untrusted templates.
+-   AsyncIO support for generating templates and calling async
+    functions.
+-   I18N support with Babel.
+-   Templates are compiled to optimized Python code just-in-time and
+    cached, or can be compiled ahead-of-time.
+-   Exceptions point to the correct line in templates to make debugging
+    easier.
+-   Extensible filters, tests, functions, and even syntax.
+
+Jinja's philosophy is that while application logic belongs in Python if
+possible, it shouldn't make the template designer's job difficult by
+restricting functionality too much.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    $ pip install -U Jinja2
+
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
+
+
+In A Nutshell
+-------------
+
+.. code-block:: jinja
+
+    {% extends "base.html" %}
+    {% block title %}Members{% endblock %}
+    {% block content %}
+      <ul>
+      {% for user in users %}
+        <li><a href="{{ user.url }}">{{ user.username }}</a></li>
+      {% endfor %}
+      </ul>
+    {% endblock %}
+
+
+Donate
+------
+
+The Pallets organization develops and supports Jinja and other popular
+packages. In order to grow the community of contributors and users, and
+allow the maintainers to devote more time to the projects, `please
+donate today`_.
+
+.. _please donate today: https://palletsprojects.com/donate
+
+
+Links
+-----
+
+-   Documentation: https://jinja.palletsprojects.com/
+-   Changes: https://jinja.palletsprojects.com/changes/
+-   PyPI Releases: https://pypi.org/project/Jinja2/
+-   Source Code: https://github.com/pallets/jinja/
+-   Issue Tracker: https://github.com/pallets/jinja/issues/
+-   Website: https://palletsprojects.com/p/jinja/
+-   Twitter: https://twitter.com/PalletsTeam
+-   Chat: https://discord.gg/pallets
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/README.rst new/Jinja2-3.0.2/README.rst
--- old/Jinja2-3.0.1/README.rst 2021-04-09 23:59:18.000000000 +0200
+++ new/Jinja2-3.0.2/README.rst 2021-08-10 15:34:22.000000000 +0200
@@ -35,7 +35,7 @@
 
     $ pip install -U Jinja2
 
-.. _pip: https://pip.pypa.io/en/stable/quickstart/
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
 
 
 In A Nutshell
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/docs/conf.py 
new/Jinja2-3.0.2/docs/conf.py
--- old/Jinja2-3.0.1/docs/conf.py       2021-04-14 22:22:16.000000000 +0200
+++ new/Jinja2-3.0.2/docs/conf.py       2021-05-21 05:53:16.000000000 +0200
@@ -38,10 +38,10 @@
     ]
 }
 html_sidebars = {
-    "index": ["project.html", "localtoc.html", "searchbox.html"],
-    "**": ["localtoc.html", "relations.html", "searchbox.html"],
+    "index": ["project.html", "localtoc.html", "searchbox.html", 
"ethicalads.html"],
+    "**": ["localtoc.html", "relations.html", "searchbox.html", 
"ethicalads.html"],
 }
-singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
+singlehtml_sidebars = {"index": ["project.html", "localtoc.html", 
"ethicalads.html"]}
 html_static_path = ["_static"]
 html_favicon = "_static/jinja-logo-sidebar.png"
 html_logo = "_static/jinja-logo-sidebar.png"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/docs/extensions.rst 
new/Jinja2-3.0.2/docs/extensions.rst
--- old/Jinja2-3.0.1/docs/extensions.rst        2021-04-09 23:59:18.000000000 
+0200
+++ new/Jinja2-3.0.2/docs/extensions.rst        2021-10-04 22:27:09.000000000 
+0200
@@ -123,7 +123,7 @@
 :ref:`the template documentation <i18n-in-templates>`.
 
 .. _gettext: https://docs.python.org/3/library/gettext.html
-.. _Babel: http://babel.pocoo.org/
+.. _Babel: https://babel.pocoo.org/
 
 
 Whitespace Trimming
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/docs/intro.rst 
new/Jinja2-3.0.2/docs/intro.rst
--- old/Jinja2-3.0.1/docs/intro.rst     2021-04-12 03:58:25.000000000 +0200
+++ new/Jinja2-3.0.2/docs/intro.rst     2021-10-04 22:27:09.000000000 +0200
@@ -60,4 +60,4 @@
 
 -   `Babel`_ provides translation support in templates.
 
-.. _Babel: http://babel.pocoo.org/
+.. _Babel: https://babel.pocoo.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/docs/make.bat 
new/Jinja2-3.0.2/docs/make.bat
--- old/Jinja2-3.0.1/docs/make.bat      2019-10-14 16:13:12.000000000 +0200
+++ new/Jinja2-3.0.2/docs/make.bat      2021-10-04 22:27:09.000000000 +0200
@@ -21,7 +21,7 @@
        echo.may add the Sphinx directory to PATH.
        echo.
        echo.If you don't have Sphinx installed, grab it from
-       echo.http://sphinx-doc.org/
+       echo.https://www.sphinx-doc.org/
        exit /b 1
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/requirements/dev.txt 
new/Jinja2-3.0.2/requirements/dev.txt
--- old/Jinja2-3.0.1/requirements/dev.txt       2021-05-12 01:25:55.000000000 
+0200
+++ new/Jinja2-3.0.2/requirements/dev.txt       2021-10-04 22:41:58.000000000 
+0200
@@ -6,79 +6,81 @@
 #
 alabaster==0.7.12
     # via sphinx
-appdirs==1.4.4
-    # via virtualenv
 attrs==21.2.0
     # via pytest
 babel==2.9.1
     # via sphinx
-certifi==2020.12.5
+backports.entry-points-selectable==1.1.0
+    # via virtualenv
+certifi==2021.5.30
     # via requests
-cfgv==3.2.0
+cfgv==3.3.1
     # via pre-commit
-chardet==4.0.0
+charset-normalizer==2.0.6
     # via requests
-click==8.0.0
+click==8.0.1
     # via pip-tools
-distlib==0.3.1
+distlib==0.3.3
     # via virtualenv
 docutils==0.17.1
     # via sphinx
-filelock==3.0.12
+filelock==3.3.0
     # via
     #   tox
     #   virtualenv
-identify==2.2.4
+identify==2.3.0
     # via pre-commit
-idna==2.10
+idna==3.2
     # via requests
 imagesize==1.2.0
     # via sphinx
 iniconfig==1.1.1
     # via pytest
-jinja2==3.0.0
+jinja2==3.0.1
     # via sphinx
-markupsafe==2.0.0
+markupsafe==2.0.1
     # via jinja2
 mypy-extensions==0.4.3
     # via mypy
-mypy==0.812
+mypy==0.910
     # via -r requirements/typing.in
 nodeenv==1.6.0
     # via pre-commit
-packaging==20.9
+packaging==21.0
     # via
     #   pallets-sphinx-themes
     #   pytest
     #   sphinx
     #   tox
-pallets-sphinx-themes==2.0.0
+pallets-sphinx-themes==2.0.1
     # via -r requirements/docs.in
-pep517==0.10.0
+pep517==0.11.0
     # via pip-tools
-pip-tools==6.1.0
+pip-tools==6.3.0
     # via -r requirements/dev.in
-pluggy==0.13.1
+platformdirs==2.4.0
+    # via virtualenv
+pluggy==1.0.0
     # via
     #   pytest
     #   tox
-pre-commit==2.12.1
+pre-commit==2.15.0
     # via -r requirements/dev.in
 py==1.10.0
     # via
     #   pytest
     #   tox
-pygments==2.9.0
+pygments==2.10.0
     # via sphinx
 pyparsing==2.4.7
     # via packaging
-pytest==6.2.4
+pytest==6.2.5
     # via -r requirements/tests.in
-pytz==2021.1
+pytz==2021.3
     # via babel
 pyyaml==5.4.1
     # via pre-commit
-requests==2.25.1
+requests==2.26.0
     # via sphinx
 six==1.16.0
     # via
@@ -88,7 +90,7 @@
     # via sphinx
 sphinx-issues==1.2.0
     # via -r requirements/docs.in
-git+https://github.com/sphinx-doc/sphinx.git@96dbe5e3
+sphinx==4.2.0
     # via
     #   -r requirements/docs.in
     #   pallets-sphinx-themes
@@ -98,7 +100,7 @@
     # via sphinx
 sphinxcontrib-devhelp==1.0.2
     # via sphinx
-sphinxcontrib-htmlhelp==1.0.3
+sphinxcontrib-htmlhelp==2.0.0
     # via sphinx
 sphinxcontrib-jsmath==1.0.1
     # via sphinx
@@ -106,26 +108,28 @@
     # via -r requirements/docs.in
 sphinxcontrib-qthelp==1.0.3
     # via sphinx
-sphinxcontrib-serializinghtml==1.1.4
+sphinxcontrib-serializinghtml==1.1.5
     # via sphinx
 toml==0.10.2
     # via
-    #   pep517
+    #   mypy
     #   pre-commit
     #   pytest
     #   tox
-tox==3.23.1
+tomli==1.2.1
+    # via pep517
+tox==3.24.4
     # via -r requirements/dev.in
-typed-ast==1.4.3
+typing-extensions==3.10.0.2
     # via mypy
-typing-extensions==3.10.0.0
-    # via mypy
-urllib3==1.26.4
+urllib3==1.26.7
     # via requests
-virtualenv==20.4.6
+virtualenv==20.8.1
     # via
     #   pre-commit
     #   tox
+wheel==0.37.0
+    # via pip-tools
 
 # The following packages are considered to be unsafe in a requirements file:
 # pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/requirements/docs.txt 
new/Jinja2-3.0.2/requirements/docs.txt
--- old/Jinja2-3.0.1/requirements/docs.txt      2021-05-12 01:25:55.000000000 
+0200
+++ new/Jinja2-3.0.2/requirements/docs.txt      2021-10-04 22:41:58.000000000 
+0200
@@ -8,39 +8,39 @@
     # via sphinx
 babel==2.9.1
     # via sphinx
-certifi==2020.12.5
+certifi==2021.5.30
     # via requests
-chardet==4.0.0
+charset-normalizer==2.0.6
     # via requests
 docutils==0.17.1
     # via sphinx
-idna==2.10
+idna==3.2
     # via requests
 imagesize==1.2.0
     # via sphinx
-jinja2==3.0.0
+jinja2==3.0.1
     # via sphinx
-markupsafe==2.0.0
+markupsafe==2.0.1
     # via jinja2
-packaging==20.9
+packaging==21.0
     # via
     #   pallets-sphinx-themes
     #   sphinx
-pallets-sphinx-themes==2.0.0
+pallets-sphinx-themes==2.0.1
     # via -r requirements/docs.in
-pygments==2.9.0
+pygments==2.10.0
     # via sphinx
 pyparsing==2.4.7
     # via packaging
-pytz==2021.1
+pytz==2021.3
     # via babel
-requests==2.25.1
+requests==2.26.0
     # via sphinx
 snowballstemmer==2.1.0
     # via sphinx
 sphinx-issues==1.2.0
     # via -r requirements/docs.in
-git+https://github.com/sphinx-doc/sphinx.git@96dbe5e3
+sphinx==4.2.0
     # via
     #   -r requirements/docs.in
     #   pallets-sphinx-themes
@@ -50,7 +50,7 @@
     # via sphinx
 sphinxcontrib-devhelp==1.0.2
     # via sphinx
-sphinxcontrib-htmlhelp==1.0.3
+sphinxcontrib-htmlhelp==2.0.0
     # via sphinx
 sphinxcontrib-jsmath==1.0.1
     # via sphinx
@@ -58,9 +58,9 @@
     # via -r requirements/docs.in
 sphinxcontrib-qthelp==1.0.3
     # via sphinx
-sphinxcontrib-serializinghtml==1.1.4
+sphinxcontrib-serializinghtml==1.1.5
     # via sphinx
-urllib3==1.26.4
+urllib3==1.26.7
     # via requests
 
 # The following packages are considered to be unsafe in a requirements file:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/requirements/tests.txt 
new/Jinja2-3.0.2/requirements/tests.txt
--- old/Jinja2-3.0.1/requirements/tests.txt     2021-05-11 23:04:58.000000000 
+0200
+++ new/Jinja2-3.0.2/requirements/tests.txt     2021-10-04 22:41:58.000000000 
+0200
@@ -8,15 +8,15 @@
     # via pytest
 iniconfig==1.1.1
     # via pytest
-packaging==20.9
+packaging==21.0
     # via pytest
-pluggy==0.13.1
+pluggy==1.0.0
     # via pytest
 py==1.10.0
     # via pytest
 pyparsing==2.4.7
     # via packaging
-pytest==6.2.4
+pytest==6.2.5
     # via -r requirements/tests.in
 toml==0.10.2
     # via pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/requirements/typing.txt 
new/Jinja2-3.0.2/requirements/typing.txt
--- old/Jinja2-3.0.1/requirements/typing.txt    2021-05-11 23:04:58.000000000 
+0200
+++ new/Jinja2-3.0.2/requirements/typing.txt    2021-10-04 22:41:58.000000000 
+0200
@@ -6,9 +6,9 @@
 #
 mypy-extensions==0.4.3
     # via mypy
-mypy==0.812
+mypy==0.910
     # via -r requirements/typing.in
-typed-ast==1.4.3
+toml==0.10.2
     # via mypy
-typing-extensions==3.10.0.0
+typing-extensions==3.10.0.2
     # via mypy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/setup.cfg new/Jinja2-3.0.2/setup.cfg
--- old/Jinja2-3.0.1/setup.cfg  2021-05-18 22:38:40.768150800 +0200
+++ new/Jinja2-3.0.2/setup.cfg  2021-10-05 02:48:54.677827000 +0200
@@ -46,6 +46,7 @@
 testpaths = tests
 filterwarnings = 
        error
+       ignore:The loop argument:DeprecationWarning:asyncio[.]base_events:542
 
 [coverage:run]
 branch = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/Jinja2.egg-info/PKG-INFO 
new/Jinja2-3.0.2/src/Jinja2.egg-info/PKG-INFO
--- old/Jinja2-3.0.1/src/Jinja2.egg-info/PKG-INFO       2021-05-18 
22:38:40.000000000 +0200
+++ new/Jinja2-3.0.2/src/Jinja2.egg-info/PKG-INFO       2021-10-05 
02:48:54.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Jinja2
-Version: 3.0.1
+Version: 3.0.2
 Summary: A very fast and expressive template engine.
 Home-page: https://palletsprojects.com/p/jinja/
 Author: Armin Ronacher
@@ -15,85 +15,6 @@
 Project-URL: Issue Tracker, https://github.com/pallets/jinja/issues/
 Project-URL: Twitter, https://twitter.com/PalletsTeam
 Project-URL: Chat, https://discord.gg/pallets
-Description: Jinja
-        =====
-        
-        Jinja is a fast, expressive, extensible templating engine. Special
-        placeholders in the template allow writing code similar to Python
-        syntax. Then the template is passed data to render the final document.
-        
-        It includes:
-        
-        -   Template inheritance and inclusion.
-        -   Define and import macros within templates.
-        -   HTML templates can use autoescaping to prevent XSS from untrusted
-            user input.
-        -   A sandboxed environment can safely render untrusted templates.
-        -   AsyncIO support for generating templates and calling async
-            functions.
-        -   I18N support with Babel.
-        -   Templates are compiled to optimized Python code just-in-time and
-            cached, or can be compiled ahead-of-time.
-        -   Exceptions point to the correct line in templates to make debugging
-            easier.
-        -   Extensible filters, tests, functions, and even syntax.
-        
-        Jinja's philosophy is that while application logic belongs in Python if
-        possible, it shouldn't make the template designer's job difficult by
-        restricting functionality too much.
-        
-        
-        Installing
-        ----------
-        
-        Install and update using `pip`_:
-        
-        .. code-block:: text
-        
-            $ pip install -U Jinja2
-        
-        .. _pip: https://pip.pypa.io/en/stable/quickstart/
-        
-        
-        In A Nutshell
-        -------------
-        
-        .. code-block:: jinja
-        
-            {% extends "base.html" %}
-            {% block title %}Members{% endblock %}
-            {% block content %}
-              <ul>
-              {% for user in users %}
-                <li><a href="{{ user.url }}">{{ user.username }}</a></li>
-              {% endfor %}
-              </ul>
-            {% endblock %}
-        
-        
-        Donate
-        ------
-        
-        The Pallets organization develops and supports Jinja and other popular
-        packages. In order to grow the community of contributors and users, and
-        allow the maintainers to devote more time to the projects, `please
-        donate today`_.
-        
-        .. _please donate today: https://palletsprojects.com/donate
-        
-        
-        Links
-        -----
-        
-        -   Documentation: https://jinja.palletsprojects.com/
-        -   Changes: https://jinja.palletsprojects.com/changes/
-        -   PyPI Releases: https://pypi.org/project/Jinja2/
-        -   Source Code: https://github.com/pallets/jinja/
-        -   Issue Tracker: https://github.com/pallets/jinja/issues/
-        -   Website: https://palletsprojects.com/p/jinja/
-        -   Twitter: https://twitter.com/PalletsTeam
-        -   Chat: https://discord.gg/pallets
-        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Web Environment
@@ -106,3 +27,85 @@
 Requires-Python: >=3.6
 Description-Content-Type: text/x-rst
 Provides-Extra: i18n
+License-File: LICENSE.rst
+
+Jinja
+=====
+
+Jinja is a fast, expressive, extensible templating engine. Special
+placeholders in the template allow writing code similar to Python
+syntax. Then the template is passed data to render the final document.
+
+It includes:
+
+-   Template inheritance and inclusion.
+-   Define and import macros within templates.
+-   HTML templates can use autoescaping to prevent XSS from untrusted
+    user input.
+-   A sandboxed environment can safely render untrusted templates.
+-   AsyncIO support for generating templates and calling async
+    functions.
+-   I18N support with Babel.
+-   Templates are compiled to optimized Python code just-in-time and
+    cached, or can be compiled ahead-of-time.
+-   Exceptions point to the correct line in templates to make debugging
+    easier.
+-   Extensible filters, tests, functions, and even syntax.
+
+Jinja's philosophy is that while application logic belongs in Python if
+possible, it shouldn't make the template designer's job difficult by
+restricting functionality too much.
+
+
+Installing
+----------
+
+Install and update using `pip`_:
+
+.. code-block:: text
+
+    $ pip install -U Jinja2
+
+.. _pip: https://pip.pypa.io/en/stable/getting-started/
+
+
+In A Nutshell
+-------------
+
+.. code-block:: jinja
+
+    {% extends "base.html" %}
+    {% block title %}Members{% endblock %}
+    {% block content %}
+      <ul>
+      {% for user in users %}
+        <li><a href="{{ user.url }}">{{ user.username }}</a></li>
+      {% endfor %}
+      </ul>
+    {% endblock %}
+
+
+Donate
+------
+
+The Pallets organization develops and supports Jinja and other popular
+packages. In order to grow the community of contributors and users, and
+allow the maintainers to devote more time to the projects, `please
+donate today`_.
+
+.. _please donate today: https://palletsprojects.com/donate
+
+
+Links
+-----
+
+-   Documentation: https://jinja.palletsprojects.com/
+-   Changes: https://jinja.palletsprojects.com/changes/
+-   PyPI Releases: https://pypi.org/project/Jinja2/
+-   Source Code: https://github.com/pallets/jinja/
+-   Issue Tracker: https://github.com/pallets/jinja/issues/
+-   Website: https://palletsprojects.com/p/jinja/
+-   Twitter: https://twitter.com/PalletsTeam
+-   Chat: https://discord.gg/pallets
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/Jinja2.egg-info/SOURCES.txt 
new/Jinja2-3.0.2/src/Jinja2.egg-info/SOURCES.txt
--- old/Jinja2-3.0.1/src/Jinja2.egg-info/SOURCES.txt    2021-05-18 
22:38:40.000000000 +0200
+++ new/Jinja2-3.0.2/src/Jinja2.egg-info/SOURCES.txt    2021-10-05 
02:48:54.000000000 +0200
@@ -76,6 +76,7 @@
 tests/test_async.py
 tests/test_async_filters.py
 tests/test_bytecode_cache.py
+tests/test_compile.py
 tests/test_core_tags.py
 tests/test_debug.py
 tests/test_ext.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/__init__.py 
new/Jinja2-3.0.2/src/jinja2/__init__.py
--- old/Jinja2-3.0.1/src/jinja2/__init__.py     2021-05-18 22:38:08.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/__init__.py     2021-10-05 02:48:02.000000000 
+0200
@@ -42,4 +42,4 @@
 from .utils import pass_eval_context as pass_eval_context
 from .utils import select_autoescape as select_autoescape
 
-__version__ = "3.0.1"
+__version__ = "3.0.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/bccache.py 
new/Jinja2-3.0.2/src/jinja2/bccache.py
--- old/Jinja2-3.0.1/src/jinja2/bccache.py      2021-05-14 03:01:13.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/bccache.py      2021-10-04 22:41:58.000000000 
+0200
@@ -154,7 +154,7 @@
         hash = sha1(name.encode("utf-8"))
 
         if filename is not None:
-            hash.update(f"|{filename}".encode("utf-8"))
+            hash.update(f"|{filename}".encode())
 
         return hash.hexdigest()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/compiler.py 
new/Jinja2-3.0.2/src/jinja2/compiler.py
--- old/Jinja2-3.0.1/src/jinja2/compiler.py     2021-05-14 03:01:13.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/compiler.py     2021-10-04 23:02:49.000000000 
+0200
@@ -556,7 +556,7 @@
             visitor.tests,
             "tests",
         ):
-            for name in names:
+            for name in sorted(names):
                 if name not in id_map:
                     id_map[name] = self.temporary_identifier()
 
@@ -1090,10 +1090,8 @@
             self.write(
                 f"{f_name}(context.get_all(), True, 
{self.dump_local_context(frame)})"
             )
-        elif self.environment.is_async:
-            self.write("_get_default_module_async()")
         else:
-            self.write("_get_default_module(context)")
+            
self.write(f"_get_default_module{self.choose_async('_async')}(context)")
 
     def visit_Import(self, node: nodes.Import, frame: Frame) -> None:
         """Visit regular imports."""
@@ -1290,6 +1288,11 @@
             self.write(", loop)")
             self.end_write(frame)
 
+        # at the end of the iteration, clear any assignments made in the
+        # loop from the top level
+        if self._assign_stack:
+            self._assign_stack[-1].difference_update(loop_frame.symbols.stores)
+
     def visit_If(self, node: nodes.If, frame: Frame) -> None:
         if_frame = frame.soft()
         self.writeline("if ", node)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/filters.py 
new/Jinja2-3.0.2/src/jinja2/filters.py
--- old/Jinja2-3.0.1/src/jinja2/filters.py      2021-05-10 15:52:40.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/filters.py      2021-10-04 22:41:58.000000000 
+0200
@@ -1350,8 +1350,8 @@
             rv = list(value)
             rv.reverse()
             return rv
-        except TypeError:
-            raise FilterArgumentError("argument must be iterable")
+        except TypeError as e:
+            raise FilterArgumentError("argument must be iterable") from e
 
 
 @pass_environment
@@ -1691,7 +1691,7 @@
             name = args[0]
             args = args[1:]
         except LookupError:
-            raise FilterArgumentError("map requires a filter argument")
+            raise FilterArgumentError("map requires a filter argument") from 
None
 
         def func(item: t.Any) -> t.Any:
             return context.environment.call_filter(
@@ -1712,7 +1712,7 @@
         try:
             attr = args[0]
         except LookupError:
-            raise FilterArgumentError("Missing parameter for attribute name")
+            raise FilterArgumentError("Missing parameter for attribute name") 
from None
 
         transfunc = make_attrgetter(context.environment, attr)
         off = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/idtracking.py 
new/Jinja2-3.0.2/src/jinja2/idtracking.py
--- old/Jinja2-3.0.1/src/jinja2/idtracking.py   2021-05-10 15:52:40.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/idtracking.py   2021-08-10 15:34:22.000000000 
+0200
@@ -149,7 +149,7 @@
         node: t.Optional["Symbols"] = self
 
         while node is not None:
-            for name in node.stores:
+            for name in sorted(node.stores):
                 if name not in rv:
                     rv[name] = self.find_ref(name)  # type: ignore
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/lexer.py 
new/Jinja2-3.0.2/src/jinja2/lexer.py
--- old/Jinja2-3.0.1/src/jinja2/lexer.py        2021-05-14 03:01:13.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/lexer.py        2021-10-04 22:41:58.000000000 
+0200
@@ -655,7 +655,7 @@
                     )
                 except Exception as e:
                     msg = str(e).split(":")[-1].strip()
-                    raise TemplateSyntaxError(msg, lineno, name, filename)
+                    raise TemplateSyntaxError(msg, lineno, name, filename) 
from e
             elif token == TOKEN_INTEGER:
                 value = int(value_str.replace("_", ""), 0)
             elif token == TOKEN_FLOAT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/loaders.py 
new/Jinja2-3.0.2/src/jinja2/loaders.py
--- old/Jinja2-3.0.1/src/jinja2/loaders.py      2021-05-10 15:52:40.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/loaders.py      2021-10-05 02:47:12.000000000 
+0200
@@ -270,12 +270,14 @@
         package_path: "str" = "templates",
         encoding: str = "utf-8",
     ) -> None:
+        package_path = os.path.normpath(package_path).rstrip(os.path.sep)
+
+        # normpath preserves ".", which isn't valid in zip paths.
         if package_path == os.path.curdir:
             package_path = ""
         elif package_path[:2] == os.path.curdir + os.path.sep:
             package_path = package_path[2:]
 
-        package_path = os.path.normpath(package_path).rstrip(os.path.sep)
         self.package_path = package_path
         self.package_name = package_name
         self.encoding = encoding
@@ -336,8 +338,8 @@
             # Package is a zip file.
             try:
                 source = self._loader.get_data(p)  # type: ignore
-            except OSError:
-                raise TemplateNotFound(template)
+            except OSError as e:
+                raise TemplateNotFound(template) from e
 
             # Could use the zip's mtime for all template mtimes, but
             # would need to safely reload the module if it's out of
@@ -476,8 +478,8 @@
         try:
             prefix, name = template.split(self.delimiter, 1)
             loader = self.mapping[prefix]
-        except (ValueError, KeyError):
-            raise TemplateNotFound(template)
+        except (ValueError, KeyError) as e:
+            raise TemplateNotFound(template) from e
         return loader, name
 
     def get_source(
@@ -486,10 +488,10 @@
         loader, name = self.get_loader(template)
         try:
             return loader.get_source(environment, name)
-        except TemplateNotFound:
+        except TemplateNotFound as e:
             # re-raise the exception with the correct filename here.
             # (the one that includes the prefix)
-            raise TemplateNotFound(template)
+            raise TemplateNotFound(template) from e
 
     @internalcode
     def load(
@@ -501,10 +503,10 @@
         loader, local_name = self.get_loader(name)
         try:
             return loader.load(environment, local_name, globals)
-        except TemplateNotFound:
+        except TemplateNotFound as e:
             # re-raise the exception with the correct filename here.
             # (the one that includes the prefix)
-            raise TemplateNotFound(name)
+            raise TemplateNotFound(name) from e
 
     def list_templates(self) -> t.List[str]:
         result = []
@@ -627,8 +629,8 @@
         if mod is None:
             try:
                 mod = __import__(module, None, None, ["root"])
-            except ImportError:
-                raise TemplateNotFound(name)
+            except ImportError as e:
+                raise TemplateNotFound(name) from e
 
             # remove the entry from sys.modules, we only want the attribute
             # on the module object we have stored on the loader.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/nodes.py 
new/Jinja2-3.0.2/src/jinja2/nodes.py
--- old/Jinja2-3.0.1/src/jinja2/nodes.py        2021-05-14 03:01:13.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/nodes.py        2021-10-04 22:41:58.000000000 
+0200
@@ -507,8 +507,8 @@
         f = _binop_to_func[self.operator]
         try:
             return f(self.left.as_const(eval_ctx), 
self.right.as_const(eval_ctx))
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
 
 class UnaryExpr(Expr):
@@ -531,8 +531,8 @@
         f = _uaop_to_func[self.operator]
         try:
             return f(self.node.as_const(eval_ctx))
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
 
 class Name(Expr):
@@ -723,14 +723,14 @@
     if node.dyn_args is not None:
         try:
             args.extend(node.dyn_args.as_const(eval_ctx))
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
     if node.dyn_kwargs is not None:
         try:
             kwargs.update(node.dyn_kwargs.as_const(eval_ctx))
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
     return args, kwargs
 
@@ -779,8 +779,8 @@
 
         try:
             return func(*args, **kwargs)
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
 
 class Filter(_FilterTestCommon):
@@ -847,8 +847,8 @@
             return eval_ctx.environment.getitem(
                 self.node.as_const(eval_ctx), self.arg.as_const(eval_ctx)
             )
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
 
 class Getattr(Expr):
@@ -869,8 +869,8 @@
 
         try:
             return eval_ctx.environment.getattr(self.node.as_const(eval_ctx), 
self.attr)
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
 
 class Slice(Expr):
@@ -929,8 +929,8 @@
                     return False
 
                 value = new_value
-        except Exception:
-            raise Impossible()
+        except Exception as e:
+            raise Impossible() from e
 
         return result
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/runtime.py 
new/Jinja2-3.0.2/src/jinja2/runtime.py
--- old/Jinja2-3.0.1/src/jinja2/runtime.py      2021-05-14 03:01:13.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/runtime.py      2021-08-10 15:34:22.000000000 
+0200
@@ -915,7 +915,7 @@
     __floordiv__ = __rfloordiv__ = _fail_with_undefined_error
     __mod__ = __rmod__ = _fail_with_undefined_error
     __pos__ = __neg__ = _fail_with_undefined_error
-    __call__ = __getitem__ = __contains__ = _fail_with_undefined_error
+    __call__ = __getitem__ = _fail_with_undefined_error
     __lt__ = __le__ = __gt__ = __ge__ = _fail_with_undefined_error
     __int__ = __float__ = __complex__ = _fail_with_undefined_error
     __pow__ = __rpow__ = _fail_with_undefined_error
@@ -1091,6 +1091,7 @@
     __slots__ = ()
     __iter__ = __str__ = __len__ = Undefined._fail_with_undefined_error
     __eq__ = __ne__ = __bool__ = __hash__ = 
Undefined._fail_with_undefined_error
+    __contains__ = Undefined._fail_with_undefined_error
 
 
 # Remove slots attributes, after the metaclass is applied they are
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/src/jinja2/utils.py 
new/Jinja2-3.0.2/src/jinja2/utils.py
--- old/Jinja2-3.0.1/src/jinja2/utils.py        2021-05-18 19:30:11.000000000 
+0200
+++ new/Jinja2-3.0.2/src/jinja2/utils.py        2021-10-04 22:41:58.000000000 
+0200
@@ -824,7 +824,7 @@
         try:
             return self.__attrs[name]
         except KeyError:
-            raise AttributeError(name)
+            raise AttributeError(name) from None
 
     def __setitem__(self, name: str, value: t.Any) -> None:
         self.__attrs[name] = value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_api.py 
new/Jinja2-3.0.2/tests/test_api.py
--- old/Jinja2-3.0.1/tests/test_api.py  2021-05-18 19:32:37.000000000 +0200
+++ new/Jinja2-3.0.2/tests/test_api.py  2021-08-10 15:34:22.000000000 +0200
@@ -316,7 +316,7 @@
         assert env.from_string("{{ foo.missing }}").render(foo=42) == ""
         assert env.from_string("{{ not missing }}").render() == "True"
         pytest.raises(UndefinedError, env.from_string("{{ missing - 
1}}").render)
-        pytest.raises(UndefinedError, env.from_string("{{ 'foo' in missing 
}}").render)
+        assert env.from_string("{{ 'foo' in missing }}").render() == "False"
         und1 = Undefined(name="x")
         und2 = Undefined(name="y")
         assert und1 == und2
@@ -375,6 +375,7 @@
         pytest.raises(UndefinedError, env.from_string("{{ missing }}").render)
         pytest.raises(UndefinedError, env.from_string("{{ missing.attribute 
}}").render)
         pytest.raises(UndefinedError, env.from_string("{{ missing|list 
}}").render)
+        pytest.raises(UndefinedError, env.from_string("{{ 'foo' in missing 
}}").render)
         assert env.from_string("{{ missing is not defined }}").render() == 
"True"
         pytest.raises(
             UndefinedError, env.from_string("{{ foo.missing }}").render, foo=42
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_async.py 
new/Jinja2-3.0.2/tests/test_async.py
--- old/Jinja2-3.0.1/tests/test_async.py        2021-05-18 22:32:38.000000000 
+0200
+++ new/Jinja2-3.0.2/tests/test_async.py        2021-10-04 23:02:49.000000000 
+0200
@@ -189,6 +189,29 @@
         assert m.variable == 42
         assert not hasattr(m, "notthere")
 
+    def test_import_with_globals(self, test_env_async):
+        t = test_env_async.from_string(
+            '{% import "module" as m %}{{ m.test() }}', globals={"foo": 42}
+        )
+        assert t.render() == "[42|23]"
+
+        t = test_env_async.from_string('{% import "module" as m %}{{ m.test() 
}}')
+        assert t.render() == "[|23]"
+
+    def test_import_with_globals_override(self, test_env_async):
+        t = test_env_async.from_string(
+            '{% set foo = 41 %}{% import "module" as m %}{{ m.test() }}',
+            globals={"foo": 42},
+        )
+        assert t.render() == "[42|23]"
+
+    def test_from_import_with_globals(self, test_env_async):
+        t = test_env_async.from_string(
+            '{% from "module" import test %}{{ test() }}',
+            globals={"foo": 42},
+        )
+        assert t.render() == "[42|23]"
+
 
 class TestAsyncIncludes:
     def test_context_include(self, test_env_async):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_compile.py 
new/Jinja2-3.0.2/tests/test_compile.py
--- old/Jinja2-3.0.1/tests/test_compile.py      1970-01-01 01:00:00.000000000 
+0100
+++ new/Jinja2-3.0.2/tests/test_compile.py      2021-08-10 15:34:22.000000000 
+0200
@@ -0,0 +1,28 @@
+import os
+import re
+
+from jinja2.environment import Environment
+from jinja2.loaders import DictLoader
+
+
+def test_filters_deterministic(tmp_path):
+    src = "".join(f"{{{{ {i}|filter{i} }}}}" for i in range(10))
+    env = Environment(loader=DictLoader({"foo": src}))
+    env.filters.update(dict.fromkeys((f"filter{i}" for i in range(10)), 
lambda: None))
+    env.compile_templates(tmp_path, zip=None)
+    name = os.listdir(tmp_path)[0]
+    content = (tmp_path / name).read_text("utf8")
+    expect = [f"filters['filter{i}']" for i in range(10)]
+    found = re.findall(r"filters\['filter\d']", content)
+    assert found == expect
+
+
+def test_import_as_with_context_deterministic(tmp_path):
+    src = "\n".join(f'{{% import "bar" as bar{i} with context %}}' for i in 
range(10))
+    env = Environment(loader=DictLoader({"foo": src}))
+    env.compile_templates(tmp_path, zip=None)
+    name = os.listdir(tmp_path)[0]
+    content = (tmp_path / name).read_text("utf8")
+    expect = [f"'bar{i}': " for i in range(10)]
+    found = re.findall(r"'bar\d': ", content)[:10]
+    assert found == expect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_imports.py 
new/Jinja2-3.0.2/tests/test_imports.py
--- old/Jinja2-3.0.1/tests/test_imports.py      2021-04-09 23:59:18.000000000 
+0200
+++ new/Jinja2-3.0.2/tests/test_imports.py      2021-10-04 23:02:49.000000000 
+0200
@@ -99,45 +99,27 @@
             t.render()
 
     def test_import_with_globals(self, test_env):
-        env = Environment(
-            loader=DictLoader(
-                {
-                    "macros": "{% macro test() %}foo: {{ foo }}{% endmacro %}",
-                    "test": "{% import 'macros' as m %}{{ m.test() }}",
-                    "test1": "{% import 'macros' as m %}{{ m.test() }}",
-                }
-            )
+        t = test_env.from_string(
+            '{% import "module" as m %}{{ m.test() }}', globals={"foo": 42}
         )
-        tmpl = env.get_template("test", globals={"foo": "bar"})
-        assert tmpl.render() == "foo: bar"
+        assert t.render() == "[42|23]"
 
-        tmpl = env.get_template("test1")
-        assert tmpl.render() == "foo: "
+        t = test_env.from_string('{% import "module" as m %}{{ m.test() }}')
+        assert t.render() == "[|23]"
 
     def test_import_with_globals_override(self, test_env):
-        env = Environment(
-            loader=DictLoader(
-                {
-                    "macros": "{% set foo = '42' %}{% macro test() %}"
-                    "foo: {{ foo }}{% endmacro %}",
-                    "test": "{% from 'macros' import test %}{{ test() }}",
-                }
-            )
+        t = test_env.from_string(
+            '{% set foo = 41 %}{% import "module" as m %}{{ m.test() }}',
+            globals={"foo": 42},
         )
-        tmpl = env.get_template("test", globals={"foo": "bar"})
-        assert tmpl.render() == "foo: 42"
+        assert t.render() == "[42|23]"
 
     def test_from_import_with_globals(self, test_env):
-        env = Environment(
-            loader=DictLoader(
-                {
-                    "macros": "{% macro testing() %}foo: {{ foo }}{% endmacro 
%}",
-                    "test": "{% from 'macros' import testing %}{{ testing() 
}}",
-                }
-            )
+        t = test_env.from_string(
+            '{% from "module" import test %}{{ test() }}',
+            globals={"foo": 42},
         )
-        tmpl = env.get_template("test", globals={"foo": "bar"})
-        assert tmpl.render() == "foo: bar"
+        assert t.render() == "[42|23]"
 
 
 class TestIncludes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_loader.py 
new/Jinja2-3.0.2/tests/test_loader.py
--- old/Jinja2-3.0.1/tests/test_loader.py       2021-05-18 19:32:37.000000000 
+0200
+++ new/Jinja2-3.0.2/tests/test_loader.py       2021-10-05 02:47:12.000000000 
+0200
@@ -339,6 +339,17 @@
     assert package_zip_loader.list_templates() == ["foo/test.html", 
"test.html"]
 
 
+@pytest.mark.parametrize("package_path", ["", ".", "./"])
+def test_package_zip_omit_curdir(package_zip_loader, package_path):
+    """PackageLoader should not add or include "." or "./" in the root
+    path, it is invalid in zip paths.
+    """
+    loader = PackageLoader("t_pack", package_path)
+    assert loader.package_path == ""
+    source, _, _ = loader.get_source(None, "templates/foo/test.html")
+    assert source.rstrip() == "FOO"
+
+
 def test_pep_451_import_hook():
     class ImportHook(importlib.abc.MetaPathFinder, importlib.abc.Loader):
         def find_spec(self, name, path=None, target=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-3.0.1/tests/test_regression.py 
new/Jinja2-3.0.2/tests/test_regression.py
--- old/Jinja2-3.0.1/tests/test_regression.py   2021-04-12 09:01:28.000000000 
+0200
+++ new/Jinja2-3.0.2/tests/test_regression.py   2021-08-10 15:34:22.000000000 
+0200
@@ -746,6 +746,13 @@
         tmpl = env.get_template("base")
         assert tmpl.render() == "42 y"
 
+    def test_nested_loop_scoping(self, env):
+        tmpl = env.from_string(
+            "{% set output %}{% for x in [1,2,3] %}hello{% endfor %}"
+            "{% endset %}{{ output }}"
+        )
+        assert tmpl.render() == "hellohellohello"
+
 
 @pytest.mark.parametrize("unicode_char", ["\N{FORM FEED}", "\x85"])
 def test_unicode_whitespace(env, unicode_char):

Reply via email to