Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
[{'expected': SplitInfo(name='test', num_bytes=0, num_examples=119, shard_lengths=None, original_shard_lengths=None, dataset_name=None), 'recorded': SplitInfo(name='test', num_bytes=890223, num_examples=116, shard_lengths=None, original_shard_lengths=None, dataset_name='swe-bench_complex')}]
Error code:   UnexpectedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

instance_id
string
repo
string
base_commit
string
problem_statement
string
test_patch
string
human_patch
string
pr_number
int64
pr_url
string
pr_merged_at
string
issue_number
int64
issue_url
string
human_changed_lines
int64
FAIL_TO_PASS
string
PASS_TO_PASS
string
version
string
django__django-20877
django/django
476e5def5fcbcf637945985a23675db0e1f59354
# Fixed #36943 -- Preserved original URLconf exception in autoreloader. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36943 #### Branch description Earlier, the autoreloader used to hide ex...
diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py index c9e6443c6fbf..2033728da809 100644 --- a/tests/utils_tests/test_autoreload.py +++ b/tests/utils_tests/test_autoreload.py @@ -434,6 +434,18 @@ def test_mutates_error_files(self): autoreload._exception = None ...
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 99812979d73c..13019f7214b7 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -33,6 +33,8 @@ # file paths to allow watching them in the future. _error_files = [] _exception = None +# Exception raised while loading the...
20,877
https://github.com/django/django/pull/20877
2026-03-10 15:32:39
36,943
https://github.com/django/django/pull/20877
27
["tests/utils_tests/test_autoreload.py"]
[]
5.2
django__django-19999
django/django
b33c31d992591bc8e8d20ac156809e4ae5b45375
# Doc'd return values of as_sql() for Func and query expressions. Mostly to make it clear that `params` may be a list or tuple.
diff --git a/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py b/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py index 9f3179cd0d6d..c539b20d1184 100644 --- a/tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py +++ b/tests/migrations/migrations_test_apps/unmig...
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index 268f669ba257..62ad29e43d8a 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -6,6 +6,7 @@ from django.core.management.base import BaseCommand, CommandErro...
19,999
https://github.com/django/django/pull/19999
2026-03-08 09:44:56
12,529
https://github.com/django/django/pull/12529
62
["tests/migrations/migrations_test_apps/unmigrated_app_syncdb/models.py", "tests/migrations/test_commands.py"]
[]
5.2
django__django-20749
django/django
864850b20f7ef89ed2f6bd8baf1a45acc9245a6c
# Fixed #36940 -- Improved ASGI script prefix path_info handling. #### Trac ticket number ticket-36940 #### Branch description The 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 st...
diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py index 83dfd95713b8..625090a66d0c 100644 --- a/tests/handlers/tests.py +++ b/tests/handlers/tests.py @@ -346,6 +346,26 @@ def test_force_script_name(self): self.assertEqual(request.script_name, "/FORCED_PREFIX") self.assertEqual(request.pat...
diff --git a/django/core/handlers/asgi.py b/django/core/handlers/asgi.py index c8118e1691f9..9555860a7e21 100644 --- a/django/core/handlers/asgi.py +++ b/django/core/handlers/asgi.py @@ -54,10 +54,13 @@ def __init__(self, scope, body_file): self.path = scope["path"] self.script_name = get_script_prefi...
20,749
https://github.com/django/django/pull/20749
2026-03-06 22:32:33
36,940
https://github.com/django/django/pull/20749
29
["tests/handlers/tests.py"]
[]
5.2
django__django-20852
django/django
f8665b1a7ff5e98d84f66ad0e958c3f175aa5d8b
# Fixed #36968 -- Improved error message when collectstatic can't find a referenced file. #### Trac ticket number ticket-36968 #### Branch description A suggestion of how we could improve the message that is shown to people when the file referenced in a css/js is missing. Wraps the ValueError for missing file wh...
diff --git a/tests/staticfiles_tests/test_storage.py b/tests/staticfiles_tests/test_storage.py index cdb6fd3c7e2e..9db449bf9df2 100644 --- a/tests/staticfiles_tests/test_storage.py +++ b/tests/staticfiles_tests/test_storage.py @@ -13,7 +13,7 @@ from django.contrib.staticfiles.management.commands.collectstatic import (...
diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py index 1c3f8ba26d53..6fcff46d93af 100644 --- a/django/contrib/staticfiles/management/commands/collectstatic.py +++ b/django/contrib/staticfiles/management/commands/collectstatic....
20,852
https://github.com/django/django/pull/20852
2026-03-06 21:54:27
36,968
https://github.com/django/django/pull/20852
50
["tests/staticfiles_tests/test_storage.py"]
[]
5.2
django__django-20837
django/django
23931eb7ff562b44d78859f29ca81d77d212df06
# Fixed #36679 -- Fixed Basque date formats to use parenthetical declension suffixes. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36679 #### Branch description Basque (eu) grammar requires...
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index e593d97cba14..91e7c95f67a0 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -1179,6 +1179,26 @@ def test_uncommon_locale_formats(self): with translation.override(locale, deactivate=True): self.assertEqual(exp...
diff --git a/django/conf/locale/eu/formats.py b/django/conf/locale/eu/formats.py index 61b16fbc6f69..e707f931c70c 100644 --- a/django/conf/locale/eu/formats.py +++ b/django/conf/locale/eu/formats.py @@ -2,10 +2,10 @@ # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/...
20,837
https://github.com/django/django/pull/20837
2026-03-06 21:25:16
36,679
https://github.com/django/django/pull/20837
26
["tests/i18n/tests.py"]
[]
5.2
django__django-20028
django/django
23931eb7ff562b44d78859f29ca81d77d212df06
# Refs #28877 -- Added special ordinal context when humanizing value 1. In french we need to specialize 1st which does not work like 81st, it's 1<sup>er</sup> and 81<sup>ième</sup>. For zero is tricky but it's attested that some use 0<sup>ième</sup>. Also fixed 101 that was tested to be `101er` while in french it's...
diff --git a/tests/humanize_tests/tests.py b/tests/humanize_tests/tests.py index 7c2863d3c478..91e9127a65bf 100644 --- a/tests/humanize_tests/tests.py +++ b/tests/humanize_tests/tests.py @@ -1,4 +1,5 @@ import datetime +import os from decimal import Decimal from django.contrib.humanize.templatetags import humanize...
diff --git a/django/contrib/humanize/templatetags/humanize.py b/django/contrib/humanize/templatetags/humanize.py index 26a9dd3a3f68..79d2e1566721 100644 --- a/django/contrib/humanize/templatetags/humanize.py +++ b/django/contrib/humanize/templatetags/humanize.py @@ -32,7 +32,10 @@ def ordinal(value): return va...
20,028
https://github.com/django/django/pull/20028
2026-03-06 12:02:21
28,877
https://github.com/django/django/pull/20028
89
["tests/humanize_tests/tests.py"]
[]
5.2
django__django-20828
django/django
35dab0ad9ee2ed23101420cb0f253deda2818191
# Fixed #21080 -- Ignored urls inside comments during collectstatic. #### Trac ticket number ticket-21080 #### Branch description Follows on from the work in https://github.com/django/django/pull/11241/ by @tmszi and @n6g7, it ignores block comments in css/js files when considering url subustitutions. It also ad...
diff --git a/tests/staticfiles_tests/test_storage.py b/tests/staticfiles_tests/test_storage.py index e09f9eda1c90..cdb6fd3c7e2e 100644 --- a/tests/staticfiles_tests/test_storage.py +++ b/tests/staticfiles_tests/test_storage.py @@ -65,7 +65,7 @@ def test_template_tag_simple_content(self): def test_path_ignored_co...
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index b16c77757cd6..c889bcb4a495 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -11,6 +11,12 @@ from django.core.files.base import ContentFile from django.core.files.storage im...
20,828
https://github.com/django/django/pull/20828
2026-03-04 21:15:49
21,080
https://github.com/django/django/pull/20828
104
["tests/staticfiles_tests/test_storage.py"]
[]
5.2
django__django-20789
django/django
3f21cb06e76044ad753055700395e54a1fc4f1e9
# Fixed #36961 -- Fixed TypeError in deprecation warnings if Django is imported by namespace. #### Trac ticket number ticket-36961 #### Branch description Found while testing #20300 -- I opened a shell, and tried to create a `Field.get_placeholder` method, but because my cwd was one level above my Django checkout...
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py index 2df9cc6fa219..ac610b492835 100644 --- a/tests/deprecation/tests.py +++ b/tests/deprecation/tests.py @@ -18,6 +18,10 @@ def setUp(self): def test_no_file(self): orig_file = django.__file__ try: + # Depending on t...
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index daa485eb35bf..4aa11832165e 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -13,9 +13,8 @@ @functools.cache def django_file_prefixes(): - try: - file = django.__file__ - except AttributeError: + ...
20,789
https://github.com/django/django/pull/20789
2026-03-02 19:08:11
36,961
https://github.com/django/django/pull/20789
12
["tests/deprecation/tests.py"]
[]
5.2
django__django-20788
django/django
97cab5fe6526ca175ae520711c61a25c4f8cbb11
# Refs #35972 -- Returned params in a tuple in further expressions. #### Trac ticket number ticket-35972 #### Branch description As [pointed out](https://github.com/django/django/pull/20300#discussion_r2643723457) by Simon, `Value.as_sql` still returned params in a list. #### AI Assistance Disclosure (REQUIRED...
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index cb62d0fbd73f..5effc8ac0d17 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -2504,9 +2504,9 @@ def test_compile_unresolved(self): # This test might need to be revisited later on if #25425 is enforced. ...
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 63d0c1802b49..d0e91f13d278 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -769,7 +769,7 @@ def as_sql(self, compiler, connection): # order of precedence expression_wrapper = "(%s...
20,788
https://github.com/django/django/pull/20788
2026-02-27 22:06:47
35,972
https://github.com/django/django/pull/20788
24
["tests/expressions/tests.py"]
[]
5.2
django__django-20308
django/django
f991a1883889a520679fe41112281435581211e1
# Fixed #36750 -- Made ordering of M2M objects deterministic in serializers. #### Trac ticket number ticket-36750 #### Branch description Following the implementation of `QuerySet.totally_ordered` in ticket [#36857](https://code.djangoproject.com/ticket/36857), this patch updates the Python and XML serializer...
diff --git a/tests/serializers/test_natural.py b/tests/serializers/test_natural.py index b405dc3e284b..4dff100cc7af 100644 --- a/tests/serializers/test_natural.py +++ b/tests/serializers/test_natural.py @@ -1,5 +1,7 @@ +from unittest import mock + from django.core import serializers -from django.db import connection +...
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index 53a73e19e51f..73ba24368b0b 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -77,7 +77,15 @@ def queryset_iterator(obj, field): chunk_size = ( 20...
20,308
https://github.com/django/django/pull/20308
2026-02-26 12:46:35
36,750
https://github.com/django/django/pull/20308
57
["tests/serializers/test_natural.py"]
[]
5.2
django__django-20722
django/django
bbc6818bc12f14c1764a7eb68556018195f56b59
# Fixed #36951 -- Removed empty exc_info from log_task_finished signal handler. #### Trac ticket number N/A #### Branch description If no exception occurred, the logger in `django.tasks.signals.log_task_finished` would print `None Type: None` Before: Task id=191 path=tests.dummy.tasks.dummy_recurring_tas...
diff --git a/tests/tasks/test_immediate_backend.py b/tests/tasks/test_immediate_backend.py index 356e9ab2649d..36b63faff801 100644 --- a/tests/tasks/test_immediate_backend.py +++ b/tests/tasks/test_immediate_backend.py @@ -228,6 +228,15 @@ def test_failed_logs(self): self.assertIn("state=FAILED", captured_logs...
diff --git a/django/tasks/signals.py b/django/tasks/signals.py index 288fe08e328a..919dae022221 100644 --- a/django/tasks/signals.py +++ b/django/tasks/signals.py @@ -49,6 +49,8 @@ def log_task_started(sender, task_result, **kwargs): @receiver(task_finished) def log_task_finished(sender, task_result, **kwargs): + ...
20,722
https://github.com/django/django/pull/20722
2026-02-25 18:52:24
36,951
https://github.com/django/django/pull/20722
17
["tests/tasks/test_immediate_backend.py"]
[]
5.2
django__django-20766
django/django
69d47f921979aba5ad5d876bff015b55121fc49c
# Fixed #36944 -- Removed MAX_LENGTH_HTML and related 5M chars limit references from HTML truncation docs. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36944 #### Branch description Followi...
diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py index 11c01874cb5d..50e205a25449 100644 --- a/tests/utils_tests/test_text.py +++ b/tests/utils_tests/test_text.py @@ -1,6 +1,5 @@ import json import sys -from unittest.mock import patch from django.core.exceptions import SuspiciousFileOpe...
diff --git a/django/utils/text.py b/django/utils/text.py index ef4baa935bf2..cfe6ceca9e4b 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -185,14 +185,8 @@ def process(self, data): class Truncator(SimpleLazyObject): """ An object used to truncate text, either by characters or words. - - Wh...
20,766
https://github.com/django/django/pull/20766
2026-02-25 16:08:53
36,944
https://github.com/django/django/pull/20766
48
["tests/utils_tests/test_text.py"]
[]
5.2
django__django-20696
django/django
69d47f921979aba5ad5d876bff015b55121fc49c
# Fixed #36839 -- Warned when model renames encounter conflicts from stale ContentTypes. #### Trac ticket number ticket-36839 #### Branch description Fixed #36839 -- Warn when ContentType rename conflicts with stale entries. When renaming a model, Django automatically injects a `RenameContentType` operatio...
diff --git a/tests/contenttypes_tests/test_operations.py b/tests/contenttypes_tests/test_operations.py index d44648d9fe6e..9f6506640ad6 100644 --- a/tests/contenttypes_tests/test_operations.py +++ b/tests/contenttypes_tests/test_operations.py @@ -154,13 +154,19 @@ def test_missing_content_type_rename_ignore(self): ...
diff --git a/django/contrib/contenttypes/management/__init__.py b/django/contrib/contenttypes/management/__init__.py index 929e44f390db..55b08870d83e 100644 --- a/django/contrib/contenttypes/management/__init__.py +++ b/django/contrib/contenttypes/management/__init__.py @@ -1,3 +1,5 @@ +import warnings + from django.a...
20,696
https://github.com/django/django/pull/20696
2026-02-25 15:22:58
36,839
https://github.com/django/django/pull/20696
54
["tests/contenttypes_tests/test_operations.py"]
[]
5.2
django__django-20679
django/django
97228a86d2b7d8011b97bebdfe0f126a536a3841
# Fixed #36921 -- Fixed KeyError when adding inline instances of models not registered with admin. #### Trac ticket number ticket-36921 #### Branch description Added an if statement to avoid key error if model not registered in admin. Note this bug was introduced in another pull request I worked on [here](http...
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 7f35d7c2f455..fa9d9a2dc6f5 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -589,6 +589,31 @@ def test_popup_add_POST_with_invalid_source_model(self): self.assertIn("admin_views.nonexistent", str(messages[0]))...
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 9c787d232912..b67b023bd313 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1419,7 +1419,7 @@ def response_add(self, request, obj, post_url_continue=None): # Find the optgroup for th...
20,679
https://github.com/django/django/pull/20679
2026-02-11 23:07:40
36,921
https://github.com/django/django/pull/20679
59
["tests/admin_views/tests.py"]
[]
5.2
django__django-20628
django/django
7cf1c22d4dfdd46f2082cfc55b714b68c4fd2de3
# Fixed #36890 -- Supported StringAgg(distinct=True) on SQLite with the default delimiter. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36890 #### Branch description Currently, the generic ...
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index bf6bf2703112..0a975dcb529e 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -3,6 +3,7 @@ import re from decimal import Decimal from itertools import chain +from unittest import skipUnless from django.core.excepti...
diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py index 1cf82416cb73..d1139e8bcc3c 100644 --- a/django/db/models/aggregates.py +++ b/django/db/models/aggregates.py @@ -369,6 +369,24 @@ def as_mysql(self, compiler, connection, **extra_context): return sql, (*params, *delimiter_params)...
20,628
https://github.com/django/django/pull/20628
2026-02-10 21:47:45
36,890
https://github.com/django/django/pull/20628
43
["tests/aggregation/tests.py"]
[]
5.2
django__django-20498
django/django
56ed37e17e5b1a509aa68a0c797dcff34fcc1366
# Fixed #36841 -- Made multipart parser class pluggable on HttpRequest. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36841 #### Branch description Provide a concise overview of the issue or rationale...
diff --git a/tests/requests_tests/tests.py b/tests/requests_tests/tests.py index 36843df9b65b..e52989b0da78 100644 --- a/tests/requests_tests/tests.py +++ b/tests/requests_tests/tests.py @@ -13,7 +13,11 @@ RawPostDataException, UnreadablePostError, ) -from django.http.multipartparser import MAX_TOTAL_HEADER_...
diff --git a/django/http/request.py b/django/http/request.py index c8adde768d23..573ae2b229d6 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -56,6 +56,7 @@ class HttpRequest: # The encoding used in GET/POST dicts. None means use default setting. _encoding = None _upload_handlers = []...
20,498
https://github.com/django/django/pull/20498
2026-02-10 22:59:02
36,841
https://github.com/django/django/pull/20498
117
["tests/requests_tests/tests.py"]
[]
5.2
django__django-20338
django/django
7c54fee7760b1c61fd7f9cb7cc6a2965f4236137
# Refs #36036 -- Added m dimension to GEOSCoordSeq. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36036 #### Branch description As per the suggestion in https://github.com/django/django/pull/19013#iss...
diff --git a/tests/gis_tests/geos_tests/test_coordseq.py b/tests/gis_tests/geos_tests/test_coordseq.py index b6f5136dd19c..37c421f5c3b8 100644 --- a/tests/gis_tests/geos_tests/test_coordseq.py +++ b/tests/gis_tests/geos_tests/test_coordseq.py @@ -1,4 +1,11 @@ -from django.contrib.gis.geos import LineString +import math...
diff --git a/django/contrib/gis/geos/coordseq.py b/django/contrib/gis/geos/coordseq.py index dec3495d25c9..febeeebfa3bc 100644 --- a/django/contrib/gis/geos/coordseq.py +++ b/django/contrib/gis/geos/coordseq.py @@ -9,7 +9,7 @@ from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.base im...
20,338
https://github.com/django/django/pull/20338
2026-02-09 13:44:08
36,036
https://github.com/django/django/pull/20338
249
["tests/gis_tests/geos_tests/test_coordseq.py"]
[]
5.2
django__django-19256
django/django
0d31ca98830542088299d2078402891d08cc3a65
# Fixed #36246 -- Caught `GDALException` in `BaseGeometryWidget.deserialize`. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36246 #### Branch description @sarahboyce Thank you for providing the test c...
diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py index c351edaaad5a..b6068948f358 100644 --- a/tests/gis_tests/test_geoforms.py +++ b/tests/gis_tests/test_geoforms.py @@ -435,6 +435,19 @@ def test_get_context_attrs(self): context = widget.get_context("geometry", None, None) ...
diff --git a/django/contrib/gis/forms/fields.py b/django/contrib/gis/forms/fields.py index 1fd31530c135..bf6be709ed3a 100644 --- a/django/contrib/gis/forms/fields.py +++ b/django/contrib/gis/forms/fields.py @@ -1,5 +1,4 @@ from django import forms -from django.contrib.gis.gdal import GDALException from django.contrib...
19,256
https://github.com/django/django/pull/19256
2026-02-06 21:19:49
36,246
https://github.com/django/django/pull/19256
22
["tests/gis_tests/test_geoforms.py"]
[]
5.2
django__django-20458
django/django
6f8b2d1c6dfaab4b18a2b10bca4e54bdbabc10d8
# Fixed #36644 -- Enabled empty order_by() to avoid pk ordering by first()/last(). #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36644 #### Branch description Enabled calling `order_by()` without argu...
diff --git a/tests/get_earliest_or_latest/models.py b/tests/get_earliest_or_latest/models.py index bbf2075d368a..91725865b194 100644 --- a/tests/get_earliest_or_latest/models.py +++ b/tests/get_earliest_or_latest/models.py @@ -21,6 +21,14 @@ class Comment(models.Model): likes_count = models.PositiveIntegerField() ...
diff --git a/django/db/models/query.py b/django/db/models/query.py index 5649a83428f7..76d0f449a67e 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1158,7 +1158,7 @@ async def alatest(self, *fields): def first(self): """Return the first object of a query or None if no match is...
20,458
https://github.com/django/django/pull/20458
2026-02-06 20:45:45
36,644
https://github.com/django/django/pull/20458
52
["tests/get_earliest_or_latest/models.py", "tests/get_earliest_or_latest/tests.py", "tests/queries/test_qs_combinators.py"]
[]
5.2
django__django-20346
django/django
5d5f95da40afbaede9f483de891c14f5da0e8218
# Fixed #36233 -- Avoided quantizing integers stored in DecimalField on SQLite. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36233 #### Branch description Fixed a crash in DecimalField when using SQL...
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py index cdf3c00080c9..1d8a447dee8b 100644 --- a/tests/model_fields/models.py +++ b/tests/model_fields/models.py @@ -102,6 +102,7 @@ def get_choices(): class BigD(models.Model): d = models.DecimalField(max_digits=32, decimal_places=30) + l...
diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index 23c17054d260..18ff204ae37b 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -300,10 +300,15 @@ def convert_timefield_value(self, value, expression, connection): ...
20,346
https://github.com/django/django/pull/20346
2026-01-28 22:04:39
36,233
https://github.com/django/django/pull/20346
30
["tests/model_fields/models.py", "tests/model_fields/test_decimalfield.py"]
[]
5.2
django__django-20580
django/django
d725f6856d7488ba2a397dfe47dd851420188159
# Fixed #36879 -- Identified Django client in Redis client metadata. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36879 #### Branch description Redis documentation recommends that clients i...
diff --git a/tests/cache/tests.py b/tests/cache/tests.py index db5df2070124..b36e3a6a0602 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -15,6 +15,7 @@ from pathlib import Path from unittest import mock, skipIf +import django from django.conf import settings from django.core import management, si...
diff --git a/django/core/cache/backends/redis.py b/django/core/cache/backends/redis.py index bbf070a37573..727ea51f84d6 100644 --- a/django/core/cache/backends/redis.py +++ b/django/core/cache/backends/redis.py @@ -4,6 +4,7 @@ import random import re +import django from django.core.cache.backends.base import DEFAU...
20,580
https://github.com/django/django/pull/20580
2026-02-03 11:40:29
36,879
https://github.com/django/django/pull/20580
35
["tests/cache/tests.py"]
[]
5.2
django__django-20614
django/django
93dfb16e96797583a6f45eeb918e78c7f2817318
# Fixed #36893 -- Serialized elidable kwarg for RunSQL and RunPython operations. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36893 #### Branch description Fixed an issue where `elidable=...
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index ec4b772c13ed..235804adab60 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -5536,6 +5536,10 @@ def test_run_sql(self): elidable_operation = migrations.RunSQL("SELECT 1 FROM...
diff --git a/django/db/migrations/operations/special.py b/django/db/migrations/operations/special.py index 07000233253c..311271483ea9 100644 --- a/django/db/migrations/operations/special.py +++ b/django/db/migrations/operations/special.py @@ -93,6 +93,8 @@ def deconstruct(self): kwargs["state_operations"] ...
20,614
https://github.com/django/django/pull/20614
2026-02-03 02:05:44
36,893
https://github.com/django/django/pull/20614
12
["tests/migrations/test_operations.py"]
[]
5.2
django__django-20538
django/django
f87c2055b45356378a7c2a020eb872352d20f85e
# Fixed #36865 -- Removed casting from exact lookups in admin searches. Fixes https://code.djangoproject.com/ticket/36865 ## Description This PR fixes a performance regression introduced in PR #17885. The `Cast` to `CharField` for non-string field exact lookups prevents database index usage on primary key fie...
diff --git a/tests/admin_changelist/models.py b/tests/admin_changelist/models.py index a84c27a06662..0b594300d2a3 100644 --- a/tests/admin_changelist/models.py +++ b/tests/admin_changelist/models.py @@ -140,3 +140,10 @@ class CharPK(models.Model): class ProxyUser(User): class Meta: proxy = True + + +clas...
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 69b7031e8260..9c787d232912 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -41,7 +41,6 @@ from django.core.paginator import Paginator from django.db import models, router, transaction from djang...
20,538
https://github.com/django/django/pull/20538
2026-01-30 16:45:39
36,865
https://github.com/django/django/pull/20538
154
["tests/admin_changelist/models.py", "tests/admin_changelist/tests.py"]
[]
5.2
django__django-20586
django/django
2831eaed797627e6e6410b06f74dadeb63316e09
# Fixed #36847 -- Ensured auto_now_add fields are set before FileField.upload_to is called. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number. --> <!-- Or delete the line and write "N/A" if this is a trivial PR. --> ticket-36847 #### Branch description In Django 5.2 and earl...
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py index 1d8a447dee8b..a594b89adb0d 100644 --- a/tests/model_fields/models.py +++ b/tests/model_fields/models.py @@ -262,10 +262,20 @@ class DataModel(models.Model): # FileField +def upload_to_with_date(instance, filename): + return f"{instan...
diff --git a/django/db/models/base.py b/django/db/models/base.py index ad3f0c5e23a1..d53da600d792 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -1175,7 +1175,9 @@ def _save_table( ].features.can_return_columns_from_insert for field in insert_fields: v...
20,586
https://github.com/django/django/pull/20586
2026-01-29 13:11:33
36,847
https://github.com/django/django/pull/20586
25
["tests/model_fields/models.py", "tests/model_fields/test_filefield.py"]
[]
5.2
django__django-20574
django/django
5d5f95da40afbaede9f483de891c14f5da0e8218
# Fixed #36878 -- Unified data type for *_together options in ModelState. Ever since the beginning of Django's migration framework, there's been a bit of an inconsistency on how index_together and unique_together values have been stored on the ModelState[^1]. It's only really obvious, when looking at the current co...
diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py index e33362185555..7a66e500cb89 100644 --- a/tests/migrations/test_autodetector.py +++ b/tests/migrations/test_autodetector.py @@ -5590,6 +5590,51 @@ def test_remove_composite_pk(self): preserve_default=True, ...
diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 802aeb0b5e66..9e9cc58fae13 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -192,9 +192,10 @@ def alter_model_options(self, app_label, model_name, options, option_keys=None): def remove_model_options(s...
20,574
https://github.com/django/django/pull/20574
2026-01-28 21:13:05
36,878
https://github.com/django/django/pull/20574
86
["tests/migrations/test_autodetector.py", "tests/migrations/test_base.py", "tests/migrations/test_operations.py"]
[]
5.2
django__django-20505
django/django
68d110f1fe593b7a368486c41cd062563a74fe0a
# Fixed #36812 -- Dropped support for MariaDB < 10.11. #### Trac ticket number <!-- Replace XXXXX with the corresponding Trac ticket number, or delete the line and write "N/A" if this is a trivial PR. --> ticket-36812 #### Branch description Dropped the support for MariaDB 10.6-10.10. #### Checklist - [x]...
diff --git a/tests/backends/mysql/tests.py b/tests/backends/mysql/tests.py index 15228d254fc1..237e7f94472b 100644 --- a/tests/backends/mysql/tests.py +++ b/tests/backends/mysql/tests.py @@ -106,8 +106,8 @@ class Tests(TestCase): @mock.patch.object(connection, "get_database_version") def test_check_database_v...
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py index 4f61e2bdf9af..eb9601bcef44 100644 --- a/django/db/backends/mysql/features.py +++ b/django/db/backends/mysql/features.py @@ -64,7 +64,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def minimum_da...
20,505
https://github.com/django/django/pull/20505
2026-01-25 10:51:03
36,812
https://github.com/django/django/pull/20505
41
["tests/backends/mysql/tests.py"]
[]
5.2
django__django-18934
django/django
3851601b2e080df34fb9227fe5d2fd43af604263
# Refs #26709 -- Made Index raise ValueError on non-string fields.
diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py index 69570a806233..64e0e232290a 100644 --- a/tests/admin_views/admin.py +++ b/tests/admin_views/admin.py @@ -18,7 +18,12 @@ from django.utils.safestring import mark_safe from django.views.decorators.common import no_append_slash -from .forms impo...
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 2de07fde7e33..69b7031e8260 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -8,6 +8,7 @@ from urllib.parse import urlsplit from django import forms +from django.apps import apps from django.con...
18,934
https://github.com/django/django/pull/18934
2026-01-23 02:12:23
13,883
https://github.com/django/django/pull/13883
512
["tests/admin_views/admin.py", "tests/admin_views/forms.py", "tests/admin_views/tests.py", "tests/admin_views/urls.py", "tests/admin_widgets/tests.py"]
[]
5.2
django__django-20309
django/django
25416413470d8e6630528626ee8b033d2d77ff46
# Fixed #36030 -- Fixed precision loss in division of Decimal literals on SQLite. #### Trac ticket number ticket-36030 #### Branch description On SQLite, ``SQLiteNumericMixin.as_sqlite()`` currently wraps all ``DecimalField`` expressions in ``CAST(... AS NUMERIC)``, including literal ``Value(Decimal(...))`` exp...
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 981d84e9e8ec..02126fa89612 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -137,6 +137,16 @@ def test_annotate_values_aggregate(self): ) self.assertEqual(companies["result"], 2395) + def test_de...
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 6b90a42cf1d2..baa91cc2c173 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -1141,7 +1141,7 @@ def allowed_default(self): @deconstructible(path="django.db.models.Value") -class Value(SQLiteNume...
20,309
https://github.com/django/django/pull/20309
2026-01-20 15:42:29
36,030
https://github.com/django/django/pull/20309
24
["tests/expressions/tests.py"]
[]
5.2
End of preview.

SWE-bench Complex

A contamination-free, complexity-focused evaluation set for AI coding agents.

SWE-bench Complex is a curated dataset of 119 real-world GitHub issues from major Python open-source projects, designed specifically for studying code complexity in AI-generated patches. All tasks were merged between January–March 2026, guaranteeing they postdate the training cutoff of current frontier models.

Why SWE-bench Complex?

Existing benchmarks like SWE-bench Verified suffer from two problems for complexity research:

1. Data Contamination

Over 94% of SWE-bench issues predate current LLM training cutoffs. Aleithan et al. found that 32.67% of successful patches involve "cheating" through solution leakage, and resolution rates dropped from 12.47% to 3.97% when leaked instances were filtered out (SWE-bench+, 2024).

All SWE-bench Complex instances postdate the training cutoffs of:

Model Provider Training Cutoff Gap
Claude Opus 4.6 Anthropic Oct 2025 3+ months
GPT-5.3-Codex OpenAI Sep 2025 4+ months
GPT-5.4 OpenAI Nov 2025 2+ months
Gemini 3.1 Pro Google Oct 2025 3+ months

2. Trivial Patches

SWE-bench Verified has a median patch size of just 7 changed lines — 44.6% of tasks require only 1–5 lines. These trivial patches yield near-zero complexity deltas, reducing statistical power for quality studies.

SWE-bench Complex targets substantive patches with a median of 48 changed lines — 6.9× larger than SWE-bench Verified.

Dataset Comparison

Characteristic SWE-bench Verified SWE-bench Complex
Tasks 500 119
Repositories 12 8
Median changed lines 7 48
Mean changed lines 14.3 74.9
Mean Python files changed 1.2 3.9
Human ΔCC (mean) +1.14 +4.06
Human ΔLLOC (mean) +2.77 +19.08
Human ΔMI (mean) −0.230 −0.417
Human ΔCogC (mean) N/A +3.63
Post-training-cutoff <6% 100%

Complexity metrics measured using Wily v2:

  • ΔCC: Cyclomatic Complexity change (McCabe, 1976)
  • ΔLLOC: Logical Lines of Code change
  • ΔMI: Maintainability Index change (Oman & Hagemeister, 1992)
  • ΔCogC: Cognitive Complexity change (Campbell, 2018)

Repository Distribution

Repository Instances
django/django 38
astropy/astropy 22
pydata/xarray 17
scikit-learn/scikit-learn 14
pylint-dev/pylint 10
matplotlib/matplotlib 9
sympy/sympy 8
pallets/flask 1

Selection Criteria

Instances were collected from merged pull requests in the SWE-bench ecosystem repositories with the following filters:

  1. Date range: Merged January 1 – March 10, 2026 (post-training-cutoff)
  2. Issue linkage: PR explicitly references a GitHub issue via "fixes #N" or equivalent
  3. Test coverage: PR includes both implementation and test changes to Python files
  4. Minimum complexity: Implementation patch modifies ≥4 changed lines
  5. Python files: Only .py file changes retained
  6. Manual review: Each candidate reviewed for solvability — documentation-only changes, large-scale refactors (>300 lines or >10 files), and tasks requiring external domain knowledge were excluded

From 1,043 scraped PRs → 712 with issue references → 224 after automated filters → 119 after manual review.

Schema

Each instance contains:

Field Type Description
instance_id string Unique identifier ({owner}__{repo}-{pr_number})
repo string GitHub repository (owner/repo)
base_commit string Parent commit SHA
problem_statement string GitHub issue text (title + body)
test_patch string Unified diff of test-file changes
human_patch string Unified diff of implementation-file changes
pr_number int Pull request number
pr_url string Pull request URL
pr_merged_at string Merge timestamp (ISO 8601)
issue_number int Referenced issue number
issue_url string Issue URL
human_changed_lines int Total changed lines in the human patch
FAIL_TO_PASS string JSON array of test IDs that must go FAIL→PASS
PASS_TO_PASS string JSON array of test IDs that must remain PASS

SWE-bench Compatibility

SWE-bench Complex uses the same schema as SWE-bench Verified and can be evaluated using the standard SWE-bench harness:

python -m swebench.harness.run_evaluation \
    -d anthonypjshaw/SWE-bench_Complex \
    -s test \
    -p predictions.jsonl \
    -id my_run \
    --max_workers 4

Usage

from datasets import load_dataset

dataset = load_dataset("anthonypjshaw/SWE-bench_Complex", split="test")
print(f"Tasks: {len(dataset)}")
print(f"Repos: {len(set(dataset['repo']))}")

Citation

If you use SWE-bench Complex in your research, please cite:

@inproceedings{Shaw2026SWEbenchComplex,
  author    = {Shaw, Anthony},
  title     = {Beyond the Benchmark: A Contamination-Free Study of {AI} Code Complexity Across Four Frontier Models},
  booktitle = {Proceedings of the IEEE International Conference on Software Engineering (SSE)},
  year      = {2026},
}

License

MIT License. The dataset contains references to publicly available open-source code under their respective licenses.

Downloads last month
41

Paper for anthonypjshaw/SWE-bench_Complex