Repository: boxine/bx_django_utils (language: python)

Issue:
Not compatible with Django 4.2.
pip install bx-django-utils==55 Django==4.2

```
Collecting bx-django-utils==55
  Using cached bx_django_utils-55-py3-none-any.whl (182 kB)
Requirement already satisfied: Django==4.2 in c:\progr\py3\ehcg\venv\lib\site-packages (4.2)
ERROR: Cannot install Django==4.2 and bx-django-utils==55 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested Django==4.2
    bx-django-utils 55 depends on django<4.2 and >=3.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml
index 94a7829..77ecf48 100644
--- a/.github/workflows/pythonapp.yml
+++ b/.github/workflows/pythonapp.yml
@@ -18,7 +18,7 @@ jobs:
       fail-fast: false
       matrix:
         python-version: ["3.11", "3.10", "3.9"]
-        django: ["3.2", "4.0", "4.1"]
+        django: ["4.2", "4.1", "3.2"]
     steps:
     - name: Checkout
       run: |
diff --git a/pyproject.toml b/pyproject.toml
index 7bfd776..5072bf8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,8 +28,8 @@ packages = [{ include = "bx_django_utils" }, { include = "bx_django_utils_tests"
 "Bug Tracker" = "https://github.com/boxine/bx_django_utils/issues"
 
 [tool.poetry.dependencies]
-python = '>=3.9,<4.0.0'
-django = '>=3.2,<4.2'
+python = '>=3.9'
+django = '>=3.2'
 bx_py_utils = '*'  # https://github.com/boxine/bx_py_utils
 python-stdnum = '*'  # https://arthurdejong.org/python-stdnum/
 
@@ -117,15 +117,15 @@ exclude_lines = [
 legacy_tox_ini = """
 [tox]
 isolated_build = True
-envlist = py{39,310,311}-django{3.2,4.0,4.1}
+envlist = py{311,310,39}-django{4.2,4.1,3.2}
 skip_missing_interpreters = True
 
 [testenv]
 passenv = *
 deps =
-    django3.2: django>=3.2,<3.3
-    django4.0: django>=4.0,<4.1
+    django4.2: django>=4.2,<4.3
     django4.1: django>=4.1,<4.2
+    django3.2: django>=3.2,<3.3
     model-bakery
     playwright
     pdoc


Test patch:
diff --git a/bx_django_utils_tests/tests/test_admin_extra_views_index_page_django4.0.10_1.snapshot.html b/bx_django_utils_tests/tests/test_admin_extra_views_index_page_django4.2_1.snapshot.html
similarity index 100%
rename from bx_django_utils_tests/tests/test_admin_extra_views_index_page_django4.0.10_1.snapshot.html
rename to bx_django_utils_tests/tests/test_admin_extra_views_index_page_django4.2_1.snapshot.html
diff --git a/bx_django_utils_tests/tests/test_feature_flag_integration_basic_django4.0.10_1.snapshot.html b/bx_django_utils_tests/tests/test_feature_flag_integration_basic_django4.2_1.snapshot.html
similarity index 100%
rename from bx_django_utils_tests/tests/test_feature_flag_integration_basic_django4.0.10_1.snapshot.html
rename to bx_django_utils_tests/tests/test_feature_flag_integration_basic_django4.2_1.snapshot.html
diff --git a/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.0.10_1.snapshot.html b/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.0.10_1.snapshot.html
deleted file mode 100644
index d5b41e9..0000000
--- a/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.0.10_1.snapshot.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html dir="ltr" lang="en-us">
- <head>
-  <title>
-   Log in | Django site admin
-  </title>
-  <link href="/static/admin/css/base.css" rel="stylesheet" type="text/css"/>
-  <link href="/static/admin/css/nav_sidebar.css" rel="stylesheet" type="text/css"/>
-  <script defer="" src="/static/admin/js/nav_sidebar.js">
-  </script>
-  <link href="/static/admin/css/login.css" rel="stylesheet" type="text/css"/>
-  <script src="/static/user_timezone.js">
-  </script>
-  <meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
-  <link href="/static/admin/css/responsive.css" rel="stylesheet" type="text/css"/>
-  <meta content="NONE,NOARCHIVE" name="robots"/>
- </head>
- <body class="login" data-admin-utc-offset="0">
-  <!-- Container -->
-  <div id="container">
-   <!-- Header -->
-   <div id="header">
-    <div id="branding">
-     <h1 id="site-name">
-      <a href="/admin/">
-       Django administration
-      </a>
-     </h1>
-    </div>
-   </div>
-   <!-- END Header -->
-   <div class="main" id="main">
-    <div class="content">
-     <!-- Content -->
-     <div class="colM" id="content">
-      <div id="content-main">
-       <form action="/admin/login/" id="login-form" method="post">
-        MockedCsrfTokenNode
-        <div class="form-row">
-         <label class="required" for="id_username">
-          Username:
-         </label>
-         <input autocapitalize="none" autocomplete="username" autofocus="" id="id_username" maxlength="150" name="username" required="" type="text"/>
-        </div>
-        <div class="form-row">
-         <label class="required" for="id_password">
-          Password:
-         </label>
-         <input autocomplete="current-password" id="id_password" name="password" required="" type="password"/>
-         <input name="next" type="hidden" value="/admin/"/>
-        </div>
-        <div class="submit-row">
-         <input type="submit" value="Log in"/>
-        </div>
-       </form>
-      </div>
-      <br class="clear"/>
-     </div>
-     <!-- END Content -->
-     <div id="footer">
-     </div>
-    </div>
-   </div>
-  </div>
-  <!-- END Container -->
- </body>
-</html>
diff --git a/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.2_1.snapshot.html b/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.2_1.snapshot.html
new file mode 100644
index 0000000..5f81e40
--- /dev/null
+++ b/bx_django_utils_tests/tests/test_html_assertion_assert_html_response_snapshot_django4.2_1.snapshot.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en-us">
+ <head>
+  <title>
+   Log in | Django site admin
+  </title>
+  <link href="/static/admin/css/base.css" rel="stylesheet"/>
+  <link href="/static/admin/css/dark_mode.css" rel="stylesheet"/>
+  <script defer="" src="/static/admin/js/theme.js">
+  </script>
+  <link href="/static/admin/css/nav_sidebar.css" rel="stylesheet"/>
+  <script defer="" src="/static/admin/js/nav_sidebar.js">
+  </script>
+  <link href="/static/admin/css/login.css" rel="stylesheet"/>
+  <script src="/static/user_timezone.js">
+  </script>
+  <meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
+  <link href="/static/admin/css/responsive.css" rel="stylesheet"/>
+  <meta content="NONE,NOARCHIVE" name="robots"/>
+ </head>
+ <body class="login" data-admin-utc-offset="0">
+  <a class="skip-to-content-link" href="#content-start">
+   Skip to main content
+  </a>
+  <!-- Container -->
+  <div id="container">
+   <!-- Header -->
+   <div id="header">
+    <div id="branding">
+     <h1 id="site-name">
+      <a href="/admin/">
+       Django administration
+      </a>
+     </h1>
+     <button class="theme-toggle">
+      <div class="visually-hidden theme-label-when-auto">
+       Toggle theme (current theme: auto)
+      </div>
+      <div class="visually-hidden theme-label-when-light">
+       Toggle theme (current theme: light)
+      </div>
+      <div class="visually-hidden theme-label-when-dark">
+       Toggle theme (current theme: dark)
+      </div>
+      <svg aria-hidden="true" class="theme-icon-when-auto">
+       <use xlink:href="#icon-auto">
+       </use>
+      </svg>
+      <svg aria-hidden="true" class="theme-icon-when-dark">
+       <use xlink:href="#icon-moon">
+       </use>
+      </svg>
+      <svg aria-hidden="true" class="theme-icon-when-light">
+       <use xlink:href="#icon-sun">
+       </use>
+      </svg>
+     </button>
+    </div>
+   </div>
+   <!-- END Header -->
+   <div class="main" id="main">
+    <div class="content" id="content-start" tabindex="-1">
+     <!-- Content -->
+     <div class="colM" id="content">
+      <div id="content-main">
+       <form action="/admin/login/" id="login-form" method="post">
+        MockedCsrfTokenNode
+        <div class="form-row">
+         <label class="required" for="id_username">
+          Username:
+         </label>
+         <input autocapitalize="none" autocomplete="username" autofocus="" id="id_username" maxlength="150" name="username" required="" type="text"/>
+        </div>
+        <div class="form-row">
+         <label class="required" for="id_password">
+          Password:
+         </label>
+         <input autocomplete="current-password" id="id_password" name="password" required="" type="password"/>
+         <input name="next" type="hidden" value="/admin/"/>
+        </div>
+        <div class="submit-row">
+         <input type="submit" value="Log in"/>
+        </div>
+       </form>
+      </div>
+      <br class="clear"/>
+     </div>
+     <!-- END Content -->
+     <div id="footer">
+     </div>
+    </div>
+   </div>
+  </div>
+  <!-- END Container -->
+  <!-- SVGs -->
+  <svg class="base-svgs" xmlns="http://www.w3.org/2000/svg">
+   <symbol height="1rem" id="icon-auto" viewbox="0 0 24 24" width="1rem">
+    <path d="M0 0h24v24H0z" fill="currentColor">
+    </path>
+    <path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2V4a8 8 0 1 0 0 16z">
+    </path>
+   </symbol>
+   <symbol height="1rem" id="icon-moon" viewbox="0 0 24 24" width="1rem">
+    <path d="M0 0h24v24H0z" fill="currentColor">
+    </path>
+    <path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z">
+    </path>
+   </symbol>
+   <symbol height="1rem" id="icon-sun" viewbox="0 0 24 24" width="1rem">
+    <path d="M0 0h24v24H0z" fill="currentColor">
+    </path>
+    <path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z">
+    </path>
+   </symbol>
+  </svg>
+  <!-- END SVGs -->
+ </body>
+</html>