{"instance_id": "django__django-20877", "repo": "django/django", "base_commit": "476e5def5fcbcf637945985a23675db0e1f59354", "problem_statement": "# Fixed #36943 -- Preserved original URLconf exception in autoreloader.\n\n#### Trac ticket number\r\n\r\n\r\n\r\nticket-36943 \r\n\r\n#### Branch description\r\nEarlier, the autoreloader used to hide exceptions raised while loading the URLConf.\r\n\r\nThis change preserves the original exception using exception chaining\r\n\r\n#### AI Assistance Disclosure (REQUIRED)\r\n\r\n- [x] **No AI tools were used** in preparing this PR.\r\n- [ ] **If AI tools were used**, I have disclosed which ones, and fully reviewed and verified their output.\r\n\r\n#### Checklist\r\n- [x] This PR follows the [contribution guidelines](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/submitting-patches/).\r\n- [x] This PR **does not** disclose a security vulnerability (see [vulnerability reporting](https://docs.djangoproject.com/en/stable/internals/security/)).\r\n- [x] This PR targets the `main` branch. \r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period (see [guidelines](https://docs.djangoproject.com/en/dev/internals/contributing/committing-code/#committing-guidelines)).\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [x] I have added or updated relevant tests.\r\n- [ ] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py\nindex c9e6443c6fbf..2033728da809 100644\n--- a/tests/utils_tests/test_autoreload.py\n+++ b/tests/utils_tests/test_autoreload.py\n@@ -434,6 +434,18 @@ def test_mutates_error_files(self):\n autoreload._exception = None\n self.assertEqual(mocked_error_files.append.call_count, 1)\n \n+ def test_urlconf_exception_is_used_as_cause(self):\n+ urlconf_exc = ValueError(\"Error\")\n+ fake_method = mock.MagicMock(side_effect=RuntimeError())\n+ wrapped = autoreload.check_errors(fake_method)\n+ with mock.patch.object(autoreload, \"_url_module_exception\", urlconf_exc):\n+ try:\n+ with self.assertRaises(RuntimeError) as cm:\n+ wrapped()\n+ finally:\n+ autoreload._exception = None\n+ self.assertIs(cm.exception.__cause__, urlconf_exc)\n+\n \n class TestRaiseLastException(SimpleTestCase):\n @mock.patch(\"django.utils.autoreload._exception\", None)\n\n", "human_patch": "diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py\nindex 99812979d73c..13019f7214b7 100644\n--- a/django/utils/autoreload.py\n+++ b/django/utils/autoreload.py\n@@ -33,6 +33,8 @@\n # file paths to allow watching them in the future.\n _error_files = []\n _exception = None\n+# Exception raised while loading the URLConf.\n+_url_module_exception = None\n \n try:\n import termios\n@@ -62,7 +64,7 @@ def wrapper(*args, **kwargs):\n global _exception\n try:\n fn(*args, **kwargs)\n- except Exception:\n+ except Exception as e:\n _exception = sys.exc_info()\n \n et, ev, tb = _exception\n@@ -75,8 +77,10 @@ def wrapper(*args, **kwargs):\n \n if filename not in _error_files:\n _error_files.append(filename)\n+ if _url_module_exception is not None:\n+ raise e from _url_module_exception\n \n- raise\n+ raise e\n \n return wrapper\n \n@@ -339,6 +343,7 @@ def wait_for_apps_ready(self, app_reg, django_main_thread):\n return False\n \n def run(self, django_main_thread):\n+ global _url_module_exception\n logger.debug(\"Waiting for apps ready_event.\")\n self.wait_for_apps_ready(apps, django_main_thread)\n from django.urls import get_resolver\n@@ -347,10 +352,10 @@ def run(self, django_main_thread):\n # reloader starts by accessing the urlconf_module property.\n try:\n get_resolver().urlconf_module\n- except Exception:\n+ except Exception as e:\n # Loading the urlconf can result in errors during development.\n- # If this occurs then swallow the error and continue.\n- pass\n+ # If this occurs then store the error and continue.\n+ _url_module_exception = e\n logger.debug(\"Apps ready_event triggered. Sending autoreload_started signal.\")\n autoreload_started.send(sender=self)\n self.run_loop()\n", "pr_number": 20877, "pr_url": "https://github.com/django/django/pull/20877", "pr_merged_at": "2026-03-10T15:32:39Z", "issue_number": 36943, "issue_url": "https://github.com/django/django/pull/20877", "human_changed_lines": 27, "FAIL_TO_PASS": "[\"tests/utils_tests/test_autoreload.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"}
{"instance_id": "django__django-19999", "repo": "django/django", "base_commit": "b33c31d992591bc8e8d20ac156809e4ae5b45375", "problem_statement": "# Doc'd return values of as_sql() for Func and query expressions.\n\nMostly to make it clear that `params` may be a list or tuple.", "test_patch": "diff --git a/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py b/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py\nindex 9f3179cd0d6d..c539b20d1184 100644\n--- a/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py\n+++ b/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py\n@@ -7,3 +7,8 @@ class Classroom(models.Model):\n \n class Lesson(models.Model):\n classroom = models.ForeignKey(Classroom, on_delete=models.CASCADE)\n+\n+\n+class VeryLongNameModel(models.Model):\n+ class Meta:\n+ db_table = \"long_db_table_that_should_be_truncated_before_checking\"\ndiff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py\nindex 6a0d9bd6d28d..e9929c1eafa9 100644\n--- a/tests/migrations/test_commands.py\n+++ b/tests/migrations/test_commands.py\n@@ -25,6 +25,7 @@\n connections,\n models,\n )\n+from django.db.backends.base.introspection import BaseDatabaseIntrospection\n from django.db.backends.base.schema import BaseDatabaseSchemaEditor\n from django.db.backends.utils import truncate_name\n from django.db.migrations.autodetector import MigrationAutodetector\n@@ -1222,10 +1223,10 @@ def test_migrate_syncdb_deferred_sql_executed_with_schemaeditor(self):\n create_table_count = len(\n [call for call in execute.mock_calls if \"CREATE TABLE\" in str(call)]\n )\n- self.assertEqual(create_table_count, 2)\n+ self.assertEqual(create_table_count, 3)\n # There's at least one deferred SQL for creating the foreign key\n # index.\n- self.assertGreater(len(execute.mock_calls), 2)\n+ self.assertGreater(len(execute.mock_calls), 3)\n stdout = stdout.getvalue()\n self.assertIn(\"Synchronize unmigrated apps: unmigrated_app_syncdb\", stdout)\n self.assertIn(\"Creating tables...\", stdout)\n@@ -1259,8 +1260,54 @@ def test_migrate_syncdb_app_label(self):\n create_table_count = len(\n [call for call in execute.mock_calls if \"CREATE TABLE\" in str(call)]\n )\n- self.assertEqual(create_table_count, 2)\n+ self.assertEqual(create_table_count, 3)\n+ self.assertGreater(len(execute.mock_calls), 3)\n+ self.assertIn(\n+ \"Synchronize unmigrated app: unmigrated_app_syncdb\", stdout.getvalue()\n+ )\n+\n+ @override_settings(\n+ INSTALLED_APPS=[\n+ \"migrations.migrations_test_apps.unmigrated_app_syncdb\",\n+ \"migrations.migrations_test_apps.unmigrated_app_simple\",\n+ ]\n+ )\n+ def test_migrate_syncdb_installed_truncated_db_model(self):\n+ \"\"\"\n+ Running migrate --run-syncdb doesn't try to create models with long\n+ truncated name if already exist.\n+ \"\"\"\n+ with connection.cursor() as cursor:\n+ mock_existing_tables = connection.introspection.table_names(cursor)\n+ # Add truncated name for the VeryLongNameModel to the list of\n+ # existing table names.\n+ table_name = truncate_name(\n+ \"long_db_table_that_should_be_truncated_before_checking\",\n+ connection.ops.max_name_length(),\n+ )\n+ mock_existing_tables.append(table_name)\n+ stdout = io.StringIO()\n+ with (\n+ mock.patch.object(BaseDatabaseSchemaEditor, \"execute\") as execute,\n+ mock.patch.object(\n+ BaseDatabaseIntrospection,\n+ \"table_names\",\n+ return_value=mock_existing_tables,\n+ ),\n+ ):\n+ call_command(\n+ \"migrate\", \"unmigrated_app_syncdb\", run_syncdb=True, stdout=stdout\n+ )\n+ create_table_calls = [\n+ str(call).upper()\n+ for call in execute.mock_calls\n+ if \"CREATE TABLE\" in str(call)\n+ ]\n+ self.assertEqual(len(create_table_calls), 2)\n self.assertGreater(len(execute.mock_calls), 2)\n+ self.assertFalse(\n+ any([table_name.upper() in call for call in create_table_calls])\n+ )\n self.assertIn(\n \"Synchronize unmigrated app: unmigrated_app_syncdb\", stdout.getvalue()\n )\n\n", "human_patch": "diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py\nindex 268f669ba257..62ad29e43d8a 100644\n--- a/django/core/management/commands/migrate.py\n+++ b/django/core/management/commands/migrate.py\n@@ -6,6 +6,7 @@\n from django.core.management.base import BaseCommand, CommandError, no_translations\n from django.core.management.sql import emit_post_migrate_signal, emit_pre_migrate_signal\n from django.db import DEFAULT_DB_ALIAS, connections, router\n+from django.db.backends.utils import truncate_name\n from django.db.migrations.autodetector import MigrationAutodetector\n from django.db.migrations.executor import MigrationExecutor\n from django.db.migrations.loader import AmbiguityError\n@@ -447,8 +448,9 @@ def sync_apps(self, connection, app_labels):\n def model_installed(model):\n opts = model._meta\n converter = connection.introspection.identifier_converter\n+ max_name_length = connection.ops.max_name_length()\n return not (\n- (converter(opts.db_table) in tables)\n+ (converter(truncate_name(opts.db_table, max_name_length)) in tables)\n or (\n opts.auto_created\n and converter(opts.auto_created._meta.db_table) in tables\n", "pr_number": 19999, "pr_url": "https://github.com/django/django/pull/19999", "pr_merged_at": "2026-03-08T09:44:56Z", "issue_number": 12529, "issue_url": "https://github.com/django/django/pull/12529", "human_changed_lines": 62, "FAIL_TO_PASS": "[\"tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py\", \"tests/migrations/test_commands.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"}
{"instance_id": "django__django-20749", "repo": "django/django", "base_commit": "864850b20f7ef89ed2f6bd8baf1a45acc9245a6c", "problem_statement": "# Fixed #36940 -- Improved ASGI script prefix path_info handling.\n\n#### Trac ticket number\r\n\r\nticket-36940\r\n\r\n#### Branch description\r\n\r\nThe current `ASGIRequest.__init__` uses `str.removeprefix()` to strip the script name from the request path to compute `path_info`. This is fragile because `removeprefix` is a pure string operation — it doesn't verify that the prefix is a proper path segment boundary.\r\n\r\nFor example, if `script_name` is `/myapp` and the path is `/myapplication/page`, `removeprefix` would incorrectly produce `lication/page`.\r\n\r\nThis patch replaces `removeprefix` with a check that ensures the script name is followed by `/` or is the exact path, before stripping it. This addresses the inline TODO comment.\r\n\r\n#### AI Assistance Disclosure (REQUIRED)\r\n- [x] **If AI tools were used**, I have disclosed which ones, and fully reviewed and verified their output.\r\n\r\nAI tools (Claude) were used to understand the issue and guide the approach. The code was reviewed and verified manually.\r\n\r\n#### Checklist\r\n- [x] This PR follows the [contribution guidelines](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/submitting-patches/).\r\n- [x] This PR **does not** disclose a security vulnerability (see [vulnerability reporting](https://docs.djangoproject.com/en/stable/internals/security/)).\r\n- [x] This PR targets the `main` branch.\r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [ ] I have added or updated relevant tests.\r\n- [ ] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py\nindex 83dfd95713b8..625090a66d0c 100644\n--- a/tests/handlers/tests.py\n+++ b/tests/handlers/tests.py\n@@ -346,6 +346,26 @@ def test_force_script_name(self):\n self.assertEqual(request.script_name, \"/FORCED_PREFIX\")\n self.assertEqual(request.path_info, \"/somepath/\")\n \n+ def test_root_path_prefix_boundary(self):\n+ async_request_factory = AsyncRequestFactory()\n+ # When path shares a textual prefix with root_path but not at a\n+ # segment boundary, path_info should be the full path.\n+ request = async_request_factory.request(\n+ **{\"path\": \"/rootprefix/somepath/\", \"root_path\": \"/root\"}\n+ )\n+ self.assertEqual(request.path, \"/rootprefix/somepath/\")\n+ self.assertEqual(request.script_name, \"/root\")\n+ self.assertEqual(request.path_info, \"/rootprefix/somepath/\")\n+\n+ def test_root_path_trailing_slash(self):\n+ async_request_factory = AsyncRequestFactory()\n+ request = async_request_factory.request(\n+ **{\"path\": \"/root/somepath/\", \"root_path\": \"/root/\"}\n+ )\n+ self.assertEqual(request.path, \"/root/somepath/\")\n+ self.assertEqual(request.script_name, \"/root/\")\n+ self.assertEqual(request.path_info, \"/somepath/\")\n+\n async def test_sync_streaming(self):\n response = await self.async_client.get(\"/streaming/\")\n self.assertEqual(response.status_code, 200)\n\n", "human_patch": "diff --git a/django/core/handlers/asgi.py b/django/core/handlers/asgi.py\nindex c8118e1691f9..9555860a7e21 100644\n--- a/django/core/handlers/asgi.py\n+++ b/django/core/handlers/asgi.py\n@@ -54,10 +54,13 @@ def __init__(self, scope, body_file):\n self.path = scope[\"path\"]\n self.script_name = get_script_prefix(scope)\n if self.script_name:\n- # TODO: Better is-prefix checking, slash handling?\n- self.path_info = scope[\"path\"].removeprefix(self.script_name)\n+ script_name = self.script_name.rstrip(\"/\")\n+ if self.path.startswith(script_name + \"/\") or self.path == script_name:\n+ self.path_info = self.path[len(script_name) :]\n+ else:\n+ self.path_info = self.path\n else:\n- self.path_info = scope[\"path\"]\n+ self.path_info = self.path\n # HTTP basics.\n self.method = self.scope[\"method\"].upper()\n # Ensure query string is encoded correctly.\n", "pr_number": 20749, "pr_url": "https://github.com/django/django/pull/20749", "pr_merged_at": "2026-03-06T22:32:33Z", "issue_number": 36940, "issue_url": "https://github.com/django/django/pull/20749", "human_changed_lines": 29, "FAIL_TO_PASS": "[\"tests/handlers/tests.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"}
{"instance_id": "django__django-20852", "repo": "django/django", "base_commit": "f8665b1a7ff5e98d84f66ad0e958c3f175aa5d8b", "problem_statement": "# Fixed #36968 -- Improved error message when collectstatic can't find a referenced file.\n\n#### Trac ticket number\r\nticket-36968\r\n\r\n#### Branch description\r\nA suggestion of how we could improve the message that is shown to people when the file referenced in a css/js is missing.\r\nWraps the ValueError for missing file when it comes from collectstatic in a 'CommandError' and updated the message to include a little more information. The CommandError will hide the traceback by default and it can still be accessed by providing --traceback\r\n\r\nExample\r\n\r\n\r\n
Vs Old
\r\n\r\n
Joel is a slug
\" # 14 chars\n- perf_test_values = [\n- (\"\", \"\"),\n- (\"\", \"\"),\n- (\"&\" * bigger_len, \"\"),\n- (\"_X<<<<<<<<<<<>\", \"_X<<<<<<<…\"),\n- (valid_html * bigger_len, \"Joel is a…
\"), # 10 chars\n- ]\n- for value, expected in perf_test_values:\n- with self.subTest(value=value):\n- truncator = text.Truncator(value)\n- self.assertEqual(expected, truncator.chars(10, html=True))\n-\n def test_truncate_chars_html_with_newline_inside_tag(self):\n truncator = text.Truncator(\n 'The quick brown fox jumped over '\n@@ -329,24 +311,6 @@ def test_truncate_html_words(self):\n self.assertEqual(truncator.words(3, html=True), \"hello ><…\")\n self.assertEqual(truncator.words(4, html=True), \"hello >< world\")\n \n- @patch(\"django.utils.text.Truncator.MAX_LENGTH_HTML\", 10_000)\n- def test_truncate_words_html_size_limit(self):\n- max_len = text.Truncator.MAX_LENGTH_HTML\n- bigger_len = text.Truncator.MAX_LENGTH_HTML + 1\n- valid_html = \"
Joel is a slug
\" # 4 words\n- perf_test_values = [\n- (\"\", \"\"),\n- (\"\", \"\"),\n- (\"&\" * max_len, \"\"),\n- (\"&\" * bigger_len, \"\"),\n- (\"_X<<<<<<<<<<<>\", \"_X<<<<<<<<<<<>\"),\n- (valid_html * bigger_len, valid_html * 12 + \"Joel is…
\"), # 50 words\n- ]\n- for value, expected in perf_test_values:\n- with self.subTest(value=value):\n- truncator = text.Truncator(value)\n- self.assertEqual(expected, truncator.words(50, html=True))\n-\n def test_wrap(self):\n digits = \"1234 67 9\"\n self.assertEqual(text.wrap(digits, 100), \"1234 67 9\")\n\n", "human_patch": "diff --git a/django/utils/text.py b/django/utils/text.py\nindex ef4baa935bf2..cfe6ceca9e4b 100644\n--- a/django/utils/text.py\n+++ b/django/utils/text.py\n@@ -185,14 +185,8 @@ def process(self, data):\n class Truncator(SimpleLazyObject):\n \"\"\"\n An object used to truncate text, either by characters or words.\n-\n- When truncating HTML text (either chars or words), input will be limited to\n- at most `MAX_LENGTH_HTML` characters.\n \"\"\"\n \n- # 5 million characters are approximately 4000 text pages or 3 web pages.\n- MAX_LENGTH_HTML = 5_000_000\n-\n def __init__(self, text):\n super().__init__(lambda: str(text))\n \n", "pr_number": 20766, "pr_url": "https://github.com/django/django/pull/20766", "pr_merged_at": "2026-02-25T16:08:53Z", "issue_number": 36944, "issue_url": "https://github.com/django/django/pull/20766", "human_changed_lines": 48, "FAIL_TO_PASS": "[\"tests/utils_tests/test_text.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"} {"instance_id": "django__django-20696", "repo": "django/django", "base_commit": "69d47f921979aba5ad5d876bff015b55121fc49c", "problem_statement": "# Fixed #36839 -- Warned when model renames encounter conflicts from stale ContentTypes.\n\n#### Trac ticket number\r\n\r\nticket-36839\r\n\r\n#### Branch description\r\n\r\nFixed #36839 -- Warn when ContentType rename conflicts with stale entries.\r\n\r\nWhen renaming a model, Django automatically injects a `RenameContentType` operation to update the content type. If a stale content type with the target name already exists, the operation catches the `IntegrityError` and silently reverts without notifying the user. This results in the migration appearing successful while the content type rename actually failed, leading to broken GenericForeignKey references and stale data.\r\n\r\nThis change adds a `RuntimeWarning` when the rename conflict occurs, informing users to run the `remove_stale_contenttypes` management command to resolve the issue. The existing fallback behavior is preserved—no data is deleted or overwritten automatically.\r\n\r\n#### AI Assistance Disclosure (REQUIRED)\r\n\r\n- [ ] **No AI tools were used** in preparing this PR.\r\n- [x] **If AI tools were used**, I have disclosed which ones, and fully reviewed and verified their output.\r\n\r\nClaude Sonnet 4.5 was used for assistance with adding tests. All output was thoroughly reviewed and verified by me.\r\n\r\n#### Checklist\r\n\r\n- [x] This PR follows the [contribution guidelines](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/submitting-patches/).\r\n- [x] This PR **does not** disclose a security vulnerability (see [vulnerability reporting](https://docs.djangoproject.com/en/stable/internals/security/)).\r\n- [x] This PR targets the `main` branch.\r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [x] I have added or updated relevant tests.\r\n- [ ] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.", "test_patch": "diff --git a/tests/contenttypes_tests/test_operations.py b/tests/contenttypes_tests/test_operations.py\nindex d44648d9fe6e..9f6506640ad6 100644\n--- a/tests/contenttypes_tests/test_operations.py\n+++ b/tests/contenttypes_tests/test_operations.py\n@@ -154,13 +154,19 @@ def test_missing_content_type_rename_ignore(self):\n def test_content_type_rename_conflict(self):\n ContentType.objects.create(app_label=\"contenttypes_tests\", model=\"foo\")\n ContentType.objects.create(app_label=\"contenttypes_tests\", model=\"renamedfoo\")\n- call_command(\n- \"migrate\",\n- \"contenttypes_tests\",\n- database=\"default\",\n- interactive=False,\n- verbosity=0,\n- )\n+ msg = (\n+ \"Could not rename content type 'contenttypes_tests.foo' to \"\n+ \"'renamedfoo' due to an existing conflicting content type. \"\n+ \"Run 'remove_stale_contenttypes' to clean up stale entries.\"\n+ )\n+ with self.assertWarnsMessage(RuntimeWarning, msg):\n+ call_command(\n+ \"migrate\",\n+ \"contenttypes_tests\",\n+ database=\"default\",\n+ interactive=False,\n+ verbosity=0,\n+ )\n self.assertTrue(\n ContentType.objects.filter(\n app_label=\"contenttypes_tests\", model=\"foo\"\n@@ -171,14 +177,20 @@ def test_content_type_rename_conflict(self):\n app_label=\"contenttypes_tests\", model=\"renamedfoo\"\n ).exists()\n )\n- call_command(\n- \"migrate\",\n- \"contenttypes_tests\",\n- \"zero\",\n- database=\"default\",\n- interactive=False,\n- verbosity=0,\n- )\n+ msg = (\n+ \"Could not rename content type 'contenttypes_tests.renamedfoo' to \"\n+ \"'foo' due to an existing conflicting content type. \"\n+ \"Run 'remove_stale_contenttypes' to clean up stale entries.\"\n+ )\n+ with self.assertWarnsMessage(RuntimeWarning, msg):\n+ call_command(\n+ \"migrate\",\n+ \"contenttypes_tests\",\n+ \"zero\",\n+ database=\"default\",\n+ interactive=False,\n+ verbosity=0,\n+ )\n self.assertTrue(\n ContentType.objects.filter(\n app_label=\"contenttypes_tests\", model=\"foo\"\n\n", "human_patch": "diff --git a/django/contrib/contenttypes/management/__init__.py b/django/contrib/contenttypes/management/__init__.py\nindex 929e44f390db..55b08870d83e 100644\n--- a/django/contrib/contenttypes/management/__init__.py\n+++ b/django/contrib/contenttypes/management/__init__.py\n@@ -1,3 +1,5 @@\n+import warnings\n+\n from django.apps import apps as global_apps\n from django.db import DEFAULT_DB_ALIAS, IntegrityError, migrations, router, transaction\n \n@@ -28,8 +30,14 @@ def _rename(self, apps, schema_editor, old_model, new_model):\n content_type.save(using=db, update_fields={\"model\"})\n except IntegrityError:\n # Gracefully fallback if a stale content type causes a\n- # conflict as remove_stale_contenttypes will take care of\n- # asking the user what should be done next.\n+ # conflict. Warn the user so they can run the\n+ # remove_stale_contenttypes management command.\n+ warnings.warn(\n+ f\"Could not rename content type '{self.app_label}.{old_model}' \"\n+ f\"to '{new_model}' due to an existing conflicting content type. \"\n+ \"Run 'remove_stale_contenttypes' to clean up stale entries.\",\n+ RuntimeWarning,\n+ )\n content_type.model = old_model\n else:\n # Clear the cache as the `get_by_natural_key()` call will cache\n", "pr_number": 20696, "pr_url": "https://github.com/django/django/pull/20696", "pr_merged_at": "2026-02-25T15:22:58Z", "issue_number": 36839, "issue_url": "https://github.com/django/django/pull/20696", "human_changed_lines": 54, "FAIL_TO_PASS": "[\"tests/contenttypes_tests/test_operations.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"} {"instance_id": "django__django-20679", "repo": "django/django", "base_commit": "97228a86d2b7d8011b97bebdfe0f126a536a3841", "problem_statement": "# Fixed #36921 -- Fixed KeyError when adding inline instances of models not registered with admin.\n\n#### Trac ticket number\r\nticket-36921\r\n\r\n#### Branch description\r\nAdded an if statement to avoid key error if model not registered in admin.\r\n\r\nNote this bug was introduced in another pull request I worked on [here](https://github.com/django/django/pull/18934/).\r\n\r\nI added the example Jacob shared to the same example project that had been used with that issue [here](https://github.com/reergymerej/ticket_13883).\r\n\r\n#### AI Assistance Disclosure (REQUIRED)\r\n- [ ] **No AI tools were used** in preparing this PR.\r\n- [x] **If AI tools were used** - Claude Code plugin in VS Code\r\n\r\n#### Checklist\r\n- [x] This PR follows the [contribution guidelines](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/submitting-patches/).\r\n- [x] This PR **does not** disclose a security vulnerability (see [vulnerability reporting](https://docs.djangoproject.com/en/stable/internals/security/)).\r\n- [x] This PR targets the `main` branch. \r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [x] I have added or updated relevant tests.\r\n- [x] I have added or updated relevant docs, including release notes if applicable.\r\n- [x] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py\nindex 7f35d7c2f455..fa9d9a2dc6f5 100644\n--- a/tests/admin_views/tests.py\n+++ b/tests/admin_views/tests.py\n@@ -589,6 +589,31 @@ def test_popup_add_POST_with_invalid_source_model(self):\n self.assertIn(\"admin_views.nonexistent\", str(messages[0]))\n self.assertIn(\"could not be found\", str(messages[0]))\n \n+ def test_popup_add_POST_with_unregistered_source_model(self):\n+ \"\"\"\n+ Popup add where source_model is a valid Django model but is not\n+ registered in the admin site (e.g. a model only used as an inline)\n+ should succeed without raising a KeyError.\n+ \"\"\"\n+ post_data = {\n+ IS_POPUP_VAR: \"1\",\n+ # Chapter exists as a model but is not registered in site (only\n+ # in site6), simulating a model used only as an inline.\n+ SOURCE_MODEL_VAR: \"admin_views.chapter\",\n+ \"title\": \"Test Article\",\n+ \"content\": \"some content\",\n+ \"date_0\": \"2010-09-10\",\n+ \"date_1\": \"14:55:39\",\n+ }\n+ response = self.client.post(reverse(\"admin:admin_views_article_add\"), post_data)\n+ self.assertEqual(response.status_code, 200)\n+ self.assertContains(response, \"data-popup-response\")\n+ # No error messages - unregistered model is silently skipped.\n+ messages = list(response.wsgi_request._messages)\n+ self.assertEqual(len(messages), 0)\n+ # No optgroup in the response.\n+ self.assertNotContains(response, \""optgroup"\")\n+\n def test_basic_edit_POST(self):\n \"\"\"\n A smoke test to ensure POST on edit_view works.\n\n", "human_patch": "diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py\nindex 9c787d232912..b67b023bd313 100644\n--- a/django/contrib/admin/options.py\n+++ b/django/contrib/admin/options.py\n@@ -1419,7 +1419,7 @@ def response_add(self, request, obj, post_url_continue=None):\n \n # Find the optgroup for the new item, if available\n source_model_name = request.POST.get(SOURCE_MODEL_VAR)\n-\n+ source_admin = None\n if source_model_name:\n app_label, model_name = source_model_name.split(\".\", 1)\n try:\n@@ -1428,21 +1428,23 @@ def response_add(self, request, obj, post_url_continue=None):\n msg = _('The app \"%s\" could not be found.') % source_model_name\n self.message_user(request, msg, messages.ERROR)\n else:\n- source_admin = self.admin_site._registry[source_model]\n- form = source_admin.get_form(request)()\n- if self.opts.verbose_name_plural in form.fields:\n- field = form.fields[self.opts.verbose_name_plural]\n- for option_value, option_label in field.choices:\n- # Check if this is an optgroup (label is a sequence\n- # of choices rather than a single string value).\n- if isinstance(option_label, (list, tuple)):\n- # It's an optgroup:\n- # (group_name, [(value, label), ...])\n- optgroup_label = option_value\n- for choice_value, choice_display in option_label:\n- if choice_display == str(obj):\n- popup_response[\"optgroup\"] = str(optgroup_label)\n- break\n+ source_admin = self.admin_site._registry.get(source_model)\n+\n+ if source_admin:\n+ form = source_admin.get_form(request)()\n+ if self.opts.verbose_name_plural in form.fields:\n+ field = form.fields[self.opts.verbose_name_plural]\n+ for option_value, option_label in field.choices:\n+ # Check if this is an optgroup (label is a sequence\n+ # of choices rather than a single string value).\n+ if isinstance(option_label, (list, tuple)):\n+ # It's an optgroup:\n+ # (group_name, [(value, label), ...])\n+ optgroup_label = option_value\n+ for choice_value, choice_display in option_label:\n+ if choice_display == str(obj):\n+ popup_response[\"optgroup\"] = str(optgroup_label)\n+ break\n \n popup_response_data = json.dumps(popup_response)\n return TemplateResponse(\n", "pr_number": 20679, "pr_url": "https://github.com/django/django/pull/20679", "pr_merged_at": "2026-02-11T23:07:40Z", "issue_number": 36921, "issue_url": "https://github.com/django/django/pull/20679", "human_changed_lines": 59, "FAIL_TO_PASS": "[\"tests/admin_views/tests.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"} {"instance_id": "django__django-20628", "repo": "django/django", "base_commit": "7cf1c22d4dfdd46f2082cfc55b714b68c4fd2de3", "problem_statement": "# Fixed #36890 -- Supported StringAgg(distinct=True) on SQLite with the default delimiter.\n\n#### Trac ticket number\r\n\r\n\r\n\r\nticket-36890\r\n\r\n#### Branch description\r\nCurrently, the generic StringAgg function raises an error on SQLite when distinct=True\r\n\r\nThis change enables support for distinct aggregation on SQLite by omitting the delimiter argument in the generated SQL when it matches the default comma.\r\n\r\n#### AI Assistance Disclosure (REQUIRED)\r\n\r\n- [ ] **No AI tools were used** in preparing this PR.\r\n- [X] **If AI tools were used**, I have disclosed which ones, and fully reviewed and verified their output.\r\n\r\nI used GitHub Copilot to assist with writing tests.\r\n\r\n#### Checklist\r\n- [X] This PR follows the [contribution guidelines](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/submitting-patches/).\r\n- [X] This PR **does not** disclose a security vulnerability (see [vulnerability reporting](https://docs.djangoproject.com/en/stable/internals/security/)).\r\n- [X] This PR targets the `main` branch. \r\n- [X] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [X] I have added or updated relevant tests.\r\n- [ ] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py\nindex bf6bf2703112..0a975dcb529e 100644\n--- a/tests/aggregation/tests.py\n+++ b/tests/aggregation/tests.py\n@@ -3,6 +3,7 @@\n import re\n from decimal import Decimal\n from itertools import chain\n+from unittest import skipUnless\n \n from django.core.exceptions import FieldError\n from django.db import NotSupportedError, connection\n@@ -579,6 +580,16 @@ def test_distinct_on_stringagg(self):\n )\n self.assertCountEqual(books[\"ratings\"].split(\",\"), [\"3\", \"4\", \"4.5\", \"5\"])\n \n+ @skipUnless(connection.vendor == \"sqlite\", \"Special default case for SQLite.\")\n+ def test_distinct_on_stringagg_sqlite_special_case(self):\n+ \"\"\"\n+ Value(\",\") is the only delimiter usable on SQLite with distinct=True.\n+ \"\"\"\n+ books = Book.objects.aggregate(\n+ ratings=StringAgg(Cast(F(\"rating\"), CharField()), Value(\",\"), distinct=True)\n+ )\n+ self.assertCountEqual(books[\"ratings\"].split(\",\"), [\"3.0\", \"4.0\", \"4.5\", \"5.0\"])\n+\n @skipIfDBFeature(\"supports_aggregate_distinct_multiple_argument\")\n def test_raises_error_on_multiple_argument_distinct(self):\n message = (\n@@ -589,7 +600,7 @@ def test_raises_error_on_multiple_argument_distinct(self):\n Book.objects.aggregate(\n ratings=StringAgg(\n Cast(F(\"rating\"), CharField()),\n- Value(\",\"),\n+ Value(\";\"),\n distinct=True,\n )\n )\n\n", "human_patch": "diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py\nindex 1cf82416cb73..d1139e8bcc3c 100644\n--- a/django/db/models/aggregates.py\n+++ b/django/db/models/aggregates.py\n@@ -369,6 +369,24 @@ def as_mysql(self, compiler, connection, **extra_context):\n return sql, (*params, *delimiter_params)\n \n def as_sqlite(self, compiler, connection, **extra_context):\n+ if (\n+ self.distinct\n+ and isinstance(self.delimiter.value, Value)\n+ and self.delimiter.value.value == \",\"\n+ ):\n+ clone = self.copy()\n+ source_expressions = clone.get_source_expressions()\n+ clone.set_source_expressions(\n+ source_expressions[:1] + source_expressions[2:]\n+ )\n+\n+ return clone.as_sql(\n+ compiler,\n+ connection,\n+ function=\"GROUP_CONCAT\",\n+ **extra_context,\n+ )\n+\n if connection.get_database_version() < (3, 44):\n return self.as_sql(\n compiler,\n", "pr_number": 20628, "pr_url": "https://github.com/django/django/pull/20628", "pr_merged_at": "2026-02-10T21:47:45Z", "issue_number": 36890, "issue_url": "https://github.com/django/django/pull/20628", "human_changed_lines": 43, "FAIL_TO_PASS": "[\"tests/aggregation/tests.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"} {"instance_id": "django__django-20498", "repo": "django/django", "base_commit": "56ed37e17e5b1a509aa68a0c797dcff34fcc1366", "problem_statement": "# Fixed #36841 -- Made multipart parser class pluggable on HttpRequest.\n\n#### Trac ticket number\r\n\r\n\r\nticket-36841\r\n\r\n#### Branch description\r\nProvide a concise overview of the issue or rationale behind the proposed changes.\r\n\r\n#### Checklist\r\n- [x] This PR targets the `main` branch. \r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [x] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [x] I have added or updated relevant tests.\r\n- [x] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/requests_tests/tests.py b/tests/requests_tests/tests.py\nindex 36843df9b65b..e52989b0da78 100644\n--- a/tests/requests_tests/tests.py\n+++ b/tests/requests_tests/tests.py\n@@ -13,7 +13,11 @@\n RawPostDataException,\n UnreadablePostError,\n )\n-from django.http.multipartparser import MAX_TOTAL_HEADER_SIZE, MultiPartParserError\n+from django.http.multipartparser import (\n+ MAX_TOTAL_HEADER_SIZE,\n+ MultiPartParser,\n+ MultiPartParserError,\n+)\n from django.http.request import split_domain_port\n from django.test import RequestFactory, SimpleTestCase, override_settings\n from django.test.client import BOUNDARY, MULTIPART_CONTENT, FakePayload\n@@ -1112,6 +1116,72 @@ def test_deepcopy(self):\n request.session[\"key\"] = \"value\"\n self.assertEqual(request_copy.session, {})\n \n+ def test_custom_multipart_parser_class(self):\n+\n+ class CustomMultiPartParser(MultiPartParser):\n+ def parse(self):\n+ post, files = super().parse()\n+ post._mutable = True\n+ post[\"custom_parser_used\"] = \"yes\"\n+ post._mutable = False\n+ return post, files\n+\n+ class CustomWSGIRequest(WSGIRequest):\n+ multipart_parser_class = CustomMultiPartParser\n+\n+ payload = FakePayload(\n+ \"\\r\\n\".join(\n+ [\n+ \"--boundary\",\n+ 'Content-Disposition: form-data; name=\"name\"',\n+ \"\",\n+ \"value\",\n+ \"--boundary--\",\n+ ]\n+ )\n+ )\n+ request = CustomWSGIRequest(\n+ {\n+ \"REQUEST_METHOD\": \"POST\",\n+ \"CONTENT_TYPE\": \"multipart/form-data; boundary=boundary\",\n+ \"CONTENT_LENGTH\": len(payload),\n+ \"wsgi.input\": payload,\n+ }\n+ )\n+ self.assertEqual(request.POST.get(\"custom_parser_used\"), \"yes\")\n+ self.assertEqual(request.POST.get(\"name\"), \"value\")\n+\n+ def test_multipart_parser_class_immutable_after_parse(self):\n+ payload = FakePayload(\n+ \"\\r\\n\".join(\n+ [\n+ \"--boundary\",\n+ 'Content-Disposition: form-data; name=\"name\"',\n+ \"\",\n+ \"value\",\n+ \"--boundary--\",\n+ ]\n+ )\n+ )\n+ request = WSGIRequest(\n+ {\n+ \"REQUEST_METHOD\": \"POST\",\n+ \"CONTENT_TYPE\": \"multipart/form-data; boundary=boundary\",\n+ \"CONTENT_LENGTH\": len(payload),\n+ \"wsgi.input\": payload,\n+ }\n+ )\n+\n+ # Access POST to trigger parsing.\n+ request.POST\n+\n+ msg = (\n+ \"You cannot set the multipart parser class after the upload has been \"\n+ \"processed.\"\n+ )\n+ with self.assertRaisesMessage(RuntimeError, msg):\n+ request.multipart_parser_class = MultiPartParser\n+\n \n class HostValidationTests(SimpleTestCase):\n poisoned_hosts = [\n\n", "human_patch": "diff --git a/django/http/request.py b/django/http/request.py\nindex c8adde768d23..573ae2b229d6 100644\n--- a/django/http/request.py\n+++ b/django/http/request.py\n@@ -56,6 +56,7 @@ class HttpRequest:\n # The encoding used in GET/POST dicts. None means use default setting.\n _encoding = None\n _upload_handlers = []\n+ _multipart_parser_class = MultiPartParser\n \n def __init__(self):\n # WARNING: The `WSGIRequest` subclass doesn't call `super`.\n@@ -364,6 +365,19 @@ def upload_handlers(self, upload_handlers):\n )\n self._upload_handlers = upload_handlers\n \n+ @property\n+ def multipart_parser_class(self):\n+ return self._multipart_parser_class\n+\n+ @multipart_parser_class.setter\n+ def multipart_parser_class(self, multipart_parser_class):\n+ if hasattr(self, \"_files\"):\n+ raise RuntimeError(\n+ \"You cannot set the multipart parser class after the upload has been \"\n+ \"processed.\"\n+ )\n+ self._multipart_parser_class = multipart_parser_class\n+\n def parse_file_upload(self, META, post_data):\n \"\"\"Return a tuple of (POST QueryDict, FILES MultiValueDict).\"\"\"\n self.upload_handlers = ImmutableList(\n@@ -373,7 +387,9 @@ def parse_file_upload(self, META, post_data):\n \"processed.\"\n ),\n )\n- parser = MultiPartParser(META, post_data, self.upload_handlers, self.encoding)\n+ parser = self.multipart_parser_class(\n+ META, post_data, self.upload_handlers, self.encoding\n+ )\n return parser.parse()\n \n @property\n", "pr_number": 20498, "pr_url": "https://github.com/django/django/pull/20498", "pr_merged_at": "2026-02-10T22:59:02Z", "issue_number": 36841, "issue_url": "https://github.com/django/django/pull/20498", "human_changed_lines": 117, "FAIL_TO_PASS": "[\"tests/requests_tests/tests.py\"]", "PASS_TO_PASS": "[]", "version": "5.2"} {"instance_id": "django__django-20338", "repo": "django/django", "base_commit": "7c54fee7760b1c61fd7f9cb7cc6a2965f4236137", "problem_statement": "# Refs #36036 -- Added m dimension to GEOSCoordSeq.\n\n#### Trac ticket number\r\n\r\n\r\nticket-36036\r\n\r\n#### Branch description\r\nAs per the suggestion in https://github.com/django/django/pull/19013#issuecomment-2816751388 this adds M dimension support to `coordseq`.\r\n\r\n\r\n#### Checklist\r\n- [x] This PR targets the `main` branch. \r\n- [x] The commit message is written in past tense, mentions the ticket number, and ends with a period.\r\n- [ ] I have checked the \"Has patch\" ticket flag in the Trac system.\r\n- [ ] I have added or updated relevant tests.\r\n- [ ] I have added or updated relevant docs, including release notes if applicable.\r\n- [ ] I have attached screenshots in both light and dark modes for any UI changes.\r\n", "test_patch": "diff --git a/tests/gis_tests/geos_tests/test_coordseq.py b/tests/gis_tests/geos_tests/test_coordseq.py\nindex b6f5136dd19c..37c421f5c3b8 100644\n--- a/tests/gis_tests/geos_tests/test_coordseq.py\n+++ b/tests/gis_tests/geos_tests/test_coordseq.py\n@@ -1,4 +1,11 @@\n-from django.contrib.gis.geos import LineString\n+import math\n+from unittest import skipIf\n+from unittest.mock import patch\n+\n+from django.contrib.gis.geos import GEOSGeometry, LineString\n+from django.contrib.gis.geos import prototypes as capi\n+from django.contrib.gis.geos.coordseq import GEOSCoordSeq\n+from django.contrib.gis.geos.libgeos import geos_version_tuple\n from django.test import SimpleTestCase\n \n \n@@ -13,3 +20,130 @@ def test_getitem(self):\n with self.subTest(i):\n with self.assertRaisesMessage(IndexError, msg):\n coord_seq[i]\n+\n+ @skipIf(geos_version_tuple() < (3, 14), \"GEOS M support requires 3.14+\")\n+ def test_has_m(self):\n+ geom = GEOSGeometry(\"POINT ZM (1 2 3 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=True)\n+ self.assertIs(coord_seq.hasm, True)\n+\n+ geom = GEOSGeometry(\"POINT Z (1 2 3)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=True)\n+ self.assertIs(coord_seq.hasm, False)\n+\n+ geom = GEOSGeometry(\"POINT M (1 2 3)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=False)\n+ self.assertIs(coord_seq.hasm, True)\n+\n+ @skipIf(geos_version_tuple() < (3, 14), \"GEOS M support requires 3.14+\")\n+ def test_get_set_m(self):\n+ geom = GEOSGeometry(\"POINT ZM (1 2 3 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=True)\n+ self.assertEqual(coord_seq.tuple, (1, 2, 3, 4))\n+ self.assertEqual(coord_seq.getM(0), 4)\n+ coord_seq.setM(0, 10)\n+ self.assertEqual(coord_seq.tuple, (1, 2, 3, 10))\n+ self.assertEqual(coord_seq.getM(0), 10)\n+\n+ geom = GEOSGeometry(\"POINT M (1 2 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=False)\n+ self.assertEqual(coord_seq.tuple, (1, 2, 4))\n+ self.assertEqual(coord_seq.getM(0), 4)\n+ coord_seq.setM(0, 10)\n+ self.assertEqual(coord_seq.tuple, (1, 2, 10))\n+ self.assertEqual(coord_seq.getM(0), 10)\n+ self.assertIs(math.isnan(coord_seq.getZ(0)), True)\n+\n+ @skipIf(geos_version_tuple() < (3, 14), \"GEOS M support requires 3.14+\")\n+ def test_setitem(self):\n+ geom = GEOSGeometry(\"POINT ZM (1 2 3 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=True)\n+ coord_seq[0] = (10, 20, 30, 40)\n+ self.assertEqual(coord_seq.tuple, (10, 20, 30, 40))\n+\n+ geom = GEOSGeometry(\"POINT M (1 2 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=False)\n+ coord_seq[0] = (10, 20, 40)\n+ self.assertEqual(coord_seq.tuple, (10, 20, 40))\n+ self.assertEqual(coord_seq.getM(0), 40)\n+ self.assertIs(math.isnan(coord_seq.getZ(0)), True)\n+\n+ @skipIf(geos_version_tuple() < (3, 14), \"GEOS M support requires 3.14+\")\n+ def test_kml_m_dimension(self):\n+ geom = GEOSGeometry(\"POINT ZM (1 2 3 4)\")\n+ coord_seq = GEOSCoordSeq(capi.get_cs(geom.ptr), z=True)\n+ self.assertEqual(coord_seq.kml, \"xr.show_versions()\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: None\r\npython: 3.12.5 | packaged by conda-forge | (main, Aug 8 2024, 18:36:51) [GCC 12.4.0]\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 5.15.153.1-microsoft-standard-WSL2\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: C.UTF-8\r\nLOCALE: ('C', 'UTF-8')\r\nlibhdf5: 1.14.3\r\nlibnetcdf: 4.9.2\r\n\r\nxarray: 2024.9.0\r\npandas: 2.2.2\r\nnumpy: 2.1.1\r\nscipy: None\r\nnetCDF4: 1.7.1\r\npydap: None\r\nh5netcdf: None\r\nh5py: None\r\nzarr: None\r\ncftime: 1.6.4\r\nnc_time_axis: None\r\niris: None\r\nbottleneck: None\r\ndask: 2024.9.0\r\ndistributed: 2024.9.0\r\nmatplotlib: None\r\ncartopy: None\r\nseaborn: None\r\nnumbagg: None\r\nfsspec: 2024.9.0\r\ncupy: None\r\npint: None\r\nsparse: None\r\nflox: None\r\nnumpy_groupies: None\r\nsetuptools: 73.0.1\r\npip: 24.2\r\nconda: None\r\npytest: None\r\nmypy: None\r\nIPython: 8.27.0\r\nsphinx: None\r\n\r\n