Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-django-jinja for
openSUSE:Factory checked in at 2023-11-13 22:18:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-jinja (Old)
and /work/SRC/openSUSE:Factory/.python-django-jinja.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-jinja"
Mon Nov 13 22:18:14 2023 rev:8 rq:1124988 version:2.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-jinja/python-django-jinja.changes
2023-06-18 23:08:36.481699687 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-jinja.new.17445/python-django-jinja.changes
2023-11-13 22:20:51.903489913 +0100
@@ -1,0 +2,10 @@
+Fri Nov 10 13:37:45 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.11.0:
+ * Drop Django 2.2 support, now require >=3.2.
+ * Drop Python 3.6 and 3.7 support, now require >=3.8.
+ * Add Django 4.1 and 4.2 support.
+ * Add Python 3.11 support.
+ * Provide a better default template engine NAME than 'backend'
+
+-------------------------------------------------------------------
Old:
----
2.10.2.tar.gz
New:
----
2.11.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-jinja.spec ++++++
--- /var/tmp/diff_new_pack.NU6jHx/_old 2023-11-13 22:20:52.391507881 +0100
+++ /var/tmp/diff_new_pack.NU6jHx/_new 2023-11-13 22:20:52.391507881 +0100
@@ -18,9 +18,8 @@
%{?sle15_python_module_pythons}
%define modname django_jinja
-%bcond_without python2
Name: python-django-jinja
-Version: 2.10.2
+Version: 2.11.0
Release: 0
Summary: Jinja2 templating language integrated in Django
License: BSD-3-Clause
@@ -35,9 +34,6 @@
Requires: python-Django >= 1.11
Requires: python-Jinja2 >= 2.5
BuildArch: noarch
-%if %{with python2}
-BuildRequires: python2-mock
-%endif
%python_subpackages
%description
++++++ 2.10.2.tar.gz -> 2.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/.github/workflows/ci.yml
new/django-jinja-2.11.0/.github/workflows/ci.yml
--- old/django-jinja-2.10.2/.github/workflows/ci.yml 2022-05-13
02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/.github/workflows/ci.yml 2023-09-03
23:00:00.000000000 +0200
@@ -6,17 +6,18 @@
pull_request:
branches:
- master
+ schedule:
+ - cron: 33 3 * * MON # Run Mondays at 03:33 UTC
jobs:
Build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- - '3.6'
- - '3.7'
- '3.8'
- '3.9'
- '3.10'
+ - '3.11'
steps:
- uses: actions/setup-python@v2
with:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/CHANGES.adoc
new/django-jinja-2.11.0/CHANGES.adoc
--- old/django-jinja-2.10.2/CHANGES.adoc 2022-05-13 02:11:18.000000000
+0200
+++ new/django-jinja-2.11.0/CHANGES.adoc 2023-09-03 23:00:00.000000000
+0200
@@ -1,6 +1,40 @@
Changelog
=========
+Version 2.11.0
+--------------
+
+_Released September 3rd, 2023_
+
+- Drop Django 2.2 support, now require >=3.2.
+- Drop Python 3.6 and 3.7 support, now require >=3.8.
+- Add Django 4.1 and 4.2 support.
+- Add Python 3.11 support.
+- Provide a better default template engine NAME than 'backend' (#303):
+
+Previously, when configuring `TEMPLATES` in Django's settings,
+`NAME` had to be set to avoid the template engine's name becoming `"backend"`:
+
+[source,python]
+----
+TEMPLATES = [
+ {
+ "NAME": "jinja2",
+ "BACKEND": "django_jinja.backend.Jinja2",
+----
+
+If your code matches that pattern, it can now be simplified to:
+
+[source,python]
+----
+TEMPLATES = [
+ {
+ "BACKEND": "django_jinja.jinja2.Jinja2",
+----
+
+There are no plans to remove support for the old `backend` import path, for
consideration of existing projects.
+Also, be careful if you've set `NAME` to `"jinja"` (not `"jinja2"`)!
+
Version 2.10.2
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/README.rst
new/django-jinja-2.11.0/README.rst
--- old/django-jinja-2.10.2/README.rst 2022-05-13 02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/README.rst 2023-09-03 23:00:00.000000000 +0200
@@ -4,8 +4,8 @@
Simple and nonobstructive jinja2 integration with Django.
-.. image:: https://img.shields.io/travis/niwinz/django-jinja.svg?style=flat
- :target: https://travis-ci.org/niwinz/django-jinja
+.. image::
https://github.com/niwinz/django-jinja/actions/workflows/ci.yml/badge.svg?branch=master
+ :target: https://github.com/niwinz/django-jinja/actions
.. image:: https://img.shields.io/pypi/v/django-jinja.svg?style=flat
:target: https://pypi.python.org/pypi/django-jinja
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/django_jinja/__init__.py
new/django-jinja-2.11.0/django_jinja/__init__.py
--- old/django-jinja-2.10.2/django_jinja/__init__.py 2022-05-13
02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/django_jinja/__init__.py 2023-09-03
23:00:00.000000000 +0200
@@ -1,4 +0,0 @@
-from django import VERSION
-
-if VERSION < (3, 2):
- default_app_config = 'django_jinja.apps.DjangoJinjaAppConfig'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-jinja-2.10.2/django_jinja/builtins/extensions.py
new/django-jinja-2.11.0/django_jinja/builtins/extensions.py
--- old/django-jinja-2.10.2/django_jinja/builtins/extensions.py 2022-05-13
02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/django_jinja/builtins/extensions.py 2023-09-03
23:00:00.000000000 +0200
@@ -44,7 +44,7 @@
if settings.DEBUG:
import warnings
- warnings.warn("A {% csrf_token %} was used in a template, but the
context"
+ warnings.warn("A {% csrf_token %} was used in a template, but the
context "
"did not provide the value. This is usually caused
by not "
"using RequestContext.")
return ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/django_jinja/jinja2.py
new/django-jinja-2.11.0/django_jinja/jinja2.py
--- old/django-jinja-2.10.2/django_jinja/jinja2.py 1970-01-01
01:00:00.000000000 +0100
+++ new/django-jinja-2.11.0/django_jinja/jinja2.py 2023-09-03
23:00:00.000000000 +0200
@@ -0,0 +1,9 @@
+"""
+This import enables the import path of the django-jinja template backend
+to have a sane default NAME in your TEMPLATES setting.
+See: https://github.com/niwinz/django-jinja/pull/303
+"""
+
+from .backend import Jinja2
+
+__all__ = ["Jinja2"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-jinja-2.10.2/django_jinja/management/commands/makemessages.py
new/django-jinja-2.11.0/django_jinja/management/commands/makemessages.py
--- old/django-jinja-2.10.2/django_jinja/management/commands/makemessages.py
2022-05-13 02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/django_jinja/management/commands/makemessages.py
2023-09-03 23:00:00.000000000 +0200
@@ -67,10 +67,11 @@
def _get_default_jinja_template_engine(self):
# dev's note: i would love to have this easy default:
--jinja2-engine-name=jinja2
- # but as currently implemented, django-jinja's engine's name defaults
to 'backend'.
+ # but due to historical reasons, django-jinja's engine's name can
default to either `jinja2` or 'backend'.
# see:
https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-NAME
- # for now, the default engine will be the first one exactly matching
our backend's path.
- return [e for e in engines.templates.values() if e["BACKEND"] ==
"django_jinja.backend.Jinja2"][0]
+ # the default engine will be the first one exactly matching either of
the new or old import paths.
+ supported_import_paths = ["django_jinja.backend.Jinja2",
"django_jinja.jinja2.Jinja2"]
+ return [e for e in engines.templates.values() if e["BACKEND"] in
supported_import_paths][0]
def handle(self, *args, **options):
old_endblock_re = trans_real.endblock_re
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/doc/content.adoc
new/django-jinja-2.11.0/doc/content.adoc
--- old/django-jinja-2.10.2/doc/content.adoc 2022-05-13 02:11:18.000000000
+0200
+++ new/django-jinja-2.11.0/doc/content.adoc 2023-09-03 23:00:00.000000000
+0200
@@ -1,6 +1,6 @@
= django-jinja - jinja2 backend for Django
Andrey Antukh, <[email protected]>
-2.10.2
+2.11.0
:toc: left
:!numbered:
:source-highlighter: pygments
@@ -53,8 +53,8 @@
=== Requirements
-- Python >= 3.6
-- Django >= 2.2
+- Python >= 3.8
+- Django >= 3.2
- jinja2 >= 3.0
If you are using older versions of Django or Python, you need an older version
of django-jinja:
@@ -85,6 +85,10 @@
|>=2.10.0
|3.6, 3.7, 3.8, 3.9, 3.10
|2.2, 3.2, 4.0
+
+|>=2.11.0
+|3.8, 3.9, 3.10, 3.11
+|3.2, 4.0, 4.1, 4.2
|===
@@ -113,7 +117,7 @@
----
TEMPLATES = [
{
- "BACKEND": "django_jinja.backend.Jinja2",
+ "BACKEND": "django_jinja.jinja2.Jinja2",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {}
@@ -327,6 +331,21 @@
----
+=== Setting the template engine name
+
+Keep in mind that the automatically inferred `NAME` for any template backend
+link:https://docs.djangoproject.com/en/dev/ref/settings/#std-setting-TEMPLATES-NAME[will
depend on the backend's import path].
+This name is used when you need to specify a template engine by name
+(e.g. `render_to_string("myapp/template.jinja", context, using="jinja2")`).
+
+In previous versions of django-jinja, the backend's import path was
`django_jinja.backend.Jinja2`,
+providing the unhelpful default engine name, `"backend"`.
+
+Now, the import path `django_jinja.jinja2.Jinja2` can be used,
+which provides a more meaningful engine name, `"jinja2"`.
+
+The old import path is still available for compatability with existing Django
projects.
+
=== Gettext Style
@@ -352,7 +371,7 @@
----
TEMPLATES = [
{
- "BACKEND": "django_jinja.backend.Jinja2",
+ "BACKEND": "django_jinja.jinja2.Jinja2",
"APP_DIRS": True,
"OPTIONS": {
"match_extension": ".jinja",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/setup.py
new/django-jinja-2.11.0/setup.py
--- old/django-jinja-2.10.2/setup.py 2022-05-13 02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/setup.py 2023-09-03 23:00:00.000000000 +0200
@@ -4,7 +4,7 @@
setup(
name = "django-jinja",
- version = "2.10.2",
+ version = "2.11.0",
description = "Jinja2 templating language integrated in Django.",
long_description = open("README.rst").read(),
long_description_content_type='text/x-rst',
@@ -31,10 +31,10 @@
"django_jinja.views.generic",
],
include_package_data = True,
- python_requires = ">=3.6",
+ python_requires = ">=3.8",
install_requires = [
"jinja2>=3",
- "django>=2.2",
+ "django>=3.2",
],
tests_require = [
"pytz",
@@ -42,20 +42,20 @@
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
- "Framework :: Django :: 2.2",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
+ "Framework :: Django :: 4.1",
+ "Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
]
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/testing/settings.py
new/django-jinja-2.11.0/testing/settings.py
--- old/django-jinja-2.10.2/testing/settings.py 2022-05-13 02:11:18.000000000
+0200
+++ new/django-jinja-2.11.0/testing/settings.py 2023-09-03 23:00:00.000000000
+0200
@@ -61,8 +61,7 @@
TEMPLATES = [
{
- "BACKEND": "django_jinja.backend.Jinja2",
- "NAME": "jinja2",
+ "BACKEND": "django_jinja.jinja2.Jinja2",
"APP_DIRS": True,
"OPTIONS": {
"debug": True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-jinja-2.10.2/tox.ini
new/django-jinja-2.11.0/tox.ini
--- old/django-jinja-2.10.2/tox.ini 2022-05-13 02:11:18.000000000 +0200
+++ new/django-jinja-2.11.0/tox.ini 2023-09-03 23:00:00.000000000 +0200
@@ -1,22 +1,22 @@
[tox]
envlist =
- py{36,37,38,39}-django22
- py{36,37,38,39,310}-django32
- py{38,39,310}-django40
+ py{38,39,310}-django{32,40}
+ py{38,39,310,311}-django{41,42}
[gh-actions]
python =
- 3.6: py36
- 3.7: py37
3.8: py38
3.9: py39
3.10: py310
+ 3.11: py311
+ 3.12-dev: py312
[testenv]
changedir=testing
commands=python runtests.py
deps=
- django22: Django~=2.2
django32: Django~=3.2
django40: Django~=4.0
+ django41: Django~=4.1
+ django42: Django~=4.2
jinja2