From 51f33c076df6682f7c0d338c0c981d127eef04fe Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 15 Oct 2023 17:08:36 +0100 Subject: [PATCH 1/3] Speedup tox. Build a wheel and share across tox environments. See https://hynek.me/articles/turbo-charge-tox/ --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 81f2917..8902e01 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,8 @@ envlist = lint [testenv] +package = wheel +wheel_build_env = .pkg deps = django32: django>=3.2,<3.3 django40: django>=4.0a,<4.1 From 66d8c9b84ea47365fb178f9695ef78a3e014cccc Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 16 Oct 2023 09:42:20 +0100 Subject: [PATCH 2/3] Updated supported Django versions. * Dropped support for Django 3.2, 4.0 and 4.1. * Added support for Django 5.0. With support for Django 3.2 being removed, the minimum supported Python version is now increased to 3.8. --- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- CHANGELOG.md | 7 ++ setup.py | 10 ++- .../bootstrap_form_show_errors_bs4_false.html | 7 +- ...strap_form_show_errors_bs4_false_lt50.html | 69 +++++++++++++++++++ .../bootstrap_form_show_errors_bs4_true.html | 7 +- ...tstrap_form_show_errors_bs4_true_lt50.html | 68 ++++++++++++++++++ ...rm_show_errors_non_field_errors_false.html | 11 +-- ...w_errors_non_field_errors_false_lt50.html} | 2 +- ...orm_show_errors_non_field_errors_true.html | 8 +-- ...ow_errors_non_field_errors_true_lt50.html} | 2 +- ...ol_is_used_in_checkboxes_true_failing.html | 18 ++--- ..._used_in_checkboxes_true_failing_lt50.html | 64 +++++++++++++++++ ...control_is_used_in_radio_true_failing.html | 6 +- ...ol_is_used_in_radio_true_failing_lt50.html | 20 ++++++ .../test_grouped_checkboxes_failing.html | 10 +-- .../test_grouped_checkboxes_failing_lt50.html | 34 +++++++++ .../test_grouped_radios_failing.html | 10 +-- .../test_grouped_radios_failing_lt50.html | 28 ++++++++ .../test_prepended_appended_text.html | 3 +- .../test_prepended_appended_text_lt50.html | 32 +++++++++ tests/test_form_helper.py | 34 +++++---- tests/test_layout.py | 19 ++--- tests/test_layout_objects.py | 34 ++++++--- tox.ini | 9 +-- 26 files changed, 434 insertions(+), 82 deletions(-) create mode 100644 tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false_lt50.html create mode 100644 tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true_lt50.html rename tests/results/bootstrap4/test_form_helper/{test_form_show_errors_non_field_errors_false_lte40.html => test_form_show_errors_non_field_errors_false_lt50.html} (95%) rename tests/results/bootstrap4/test_form_helper/{test_form_show_errors_non_field_errors_true_lte40.html => test_form_show_errors_non_field_errors_true_lt50.html} (96%) create mode 100644 tests/results/bootstrap4/test_layout/test_use_custom_control_is_used_in_checkboxes_true_failing_lt50.html create mode 100644 tests/results/bootstrap4/test_layout/test_use_custom_control_is_used_in_radio_true_failing_lt50.html create mode 100644 tests/results/bootstrap4/test_layout_objects/test_grouped_checkboxes_failing_lt50.html create mode 100644 tests/results/bootstrap4/test_layout_objects/test_grouped_radios_failing_lt50.html create mode 100644 tests/results/bootstrap4/test_layout_objects/test_prepended_appended_text_lt50.html diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2aa3b0a..f6a3ac9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,11 +12,11 @@ jobs: strategy: matrix: python-version: - - '3.7' - '3.8' - '3.9' - '3.10' - '3.11' + - '3.12' steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2e043c..66eb325 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,11 +14,11 @@ jobs: strategy: matrix: python-version: - - '3.7' - '3.8' - '3.9' - '3.10' - '3.11' + - '3.12' steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d2b0a4..5077d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG FOR CRISPY-BOOTSTRAP4 +## 2023.2 + +* Dropped support for Django 3.2, 4.0 and 4.1. +* Added support for Django 5.0. +* Added support for Python 3.12. +* Dropped support for django-crispy-forms 1.x. + ## 2023.1 * Confirmed support for Django 4.2. diff --git a/setup.py b/setup.py index 479489b..6b7b82a 100644 --- a/setup.py +++ b/setup.py @@ -30,25 +30,23 @@ def get_long_description(): license="MIT", version=VERSION, packages=["crispy_bootstrap4"], - install_requires=["django-crispy-forms>=1.14.0", "django>=3.2"], - python_requires=">=3.7", + install_requires=["django-crispy-forms>=2.0", "django>=4.2"], + python_requires=">=3.8", include_package_data=True, classifiers=[ "Environment :: Web Environment", "Development Status :: 5 - Production/Stable", "Framework :: Django", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false.html b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false.html index 6ed055e..64982b3 100644 --- a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false.html +++ b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false.html @@ -3,7 +3,8 @@
- +
whatever
Insert your email @@ -22,6 +23,7 @@ class="textinput textInput inputtext form-control is-invalid" required id="id_first_name" + aria-invalid="true" />
@@ -31,7 +33,8 @@
foo
- +
bar
diff --git a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false_lt50.html b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false_lt50.html new file mode 100644 index 0000000..6ed055e --- /dev/null +++ b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_false_lt50.html @@ -0,0 +1,69 @@ +
+
+ +
+
+ +
whatever
+
+ Insert your email +
+
+
+ +
+
+
blabla
+ +
+
+
+
+ +
+
+
foo
+ +
bar
+
+
+
+
+ +
+
+ +
whatever
+
+
+
+
+ +
+
+
blabla
+ +
+
+
+
diff --git a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true.html b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true.html index 56dcaa5..de7039c 100644 --- a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true.html +++ b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true.html @@ -3,7 +3,8 @@
- +
whatever
Enter a valid email address.
@@ -20,7 +21,8 @@
blabla
- + Ensure this value has at most 5 characters (it has 19).
@@ -38,6 +40,7 @@ class="textinput textInput inputtext form-control is-invalid" required id="id_last_name" + aria-invalid="true" />
bar
Ensure this value has at most 5 characters (it has 18). diff --git a/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true_lt50.html b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true_lt50.html new file mode 100644 index 0000000..56dcaa5 --- /dev/null +++ b/tests/results/bootstrap4/test_form_helper/bootstrap_form_show_errors_bs4_true_lt50.html @@ -0,0 +1,68 @@ +
+
+ +
+
+ +
whatever
+ Enter a valid email address. +
+ Insert your email +
+
+
+ +
+
+
blabla
+ + Ensure this value has at most 5 characters (it has 19). +
+
+
+
+ +
+
+
foo
+ +
bar
+ Ensure this value has at most 5 characters (it has 18). +
+
+
+
+ +
+
+ +
whatever
+
+
+
+
+ +
+
+
blabla
+ +
+
+
+
\ No newline at end of file diff --git a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false.html b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false.html index 4dac28d..070ed63 100644 --- a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false.html +++ b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false.html @@ -6,7 +6,7 @@
-
Insert your email
@@ -22,18 +22,19 @@
-
-
+ id="id_datetime_field_0" aria-invalid="true"> +
\ No newline at end of file diff --git a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lte40.html b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lt50.html similarity index 95% rename from tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lte40.html rename to tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lt50.html index 497992b..4dac28d 100644 --- a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lte40.html +++ b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_false_lt50.html @@ -31,7 +31,7 @@ class="textinput textInput inputtext form-control is-invalid" required id="id_last_name">
- +
diff --git a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true.html b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true.html index 27e32c0..5f71148 100644 --- a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true.html +++ b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true.html @@ -11,7 +11,7 @@
-
This field is required. Insert your email
@@ -28,14 +28,14 @@
-
This field is required.
-
This field is required.
@@ -43,7 +43,7 @@
This field is required.
diff --git a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lte40.html b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lt50.html similarity index 96% rename from tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lte40.html rename to tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lt50.html index d474408..27e32c0 100644 --- a/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lte40.html +++ b/tests/results/bootstrap4/test_form_helper/test_form_show_errors_non_field_errors_true_lt50.html @@ -41,7 +41,7 @@
- +
*