Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringclasses
1 value
base_commit
stringlengths
40
40
patch
stringlengths
356
10.8k
test_patch
stringlengths
399
19.2k
problem_statement
stringlengths
146
9.25k
hints_text
stringlengths
0
13.8k
created_at
stringlengths
20
20
version
stringclasses
9 values
FAIL_TO_PASS
stringlengths
38
32.6k
PASS_TO_PASS
stringlengths
2
107k
environment_setup_commit
stringclasses
9 values
difficulty
stringclasses
3 values
id
stringlengths
19
20
image_name
stringclasses
1 value
django/django
b9cf764be62e77b4777b3a75ec256f6209a57671
diff --git a/django/core/validators.py b/django/core/validators.py --- a/django/core/validators.py +++ b/django/core/validators.py @@ -94,7 +94,7 @@ class URLValidator(RegexValidator): regex = _lazy_re_compile( r'^(?:[a-z0-9\.\-\+]*)://' # scheme is validated separately - r'(?:\S+(?::\S*)?@)?' ...
diff --git a/tests/validators/invalid_urls.txt b/tests/validators/invalid_urls.txt --- a/tests/validators/invalid_urls.txt +++ b/tests/validators/invalid_urls.txt @@ -57,3 +57,9 @@ http://example.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. http://example.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
Make URLValidator reject invalid characters in the username and password Description (last modified by Tim Bell) Since #20003, core.validators.URLValidator accepts URLs with usernames and passwords. RFC 1738 section 3.1 requires "Within the user and password field, any ":", "@", or "/" must be encoded"; however...
2018-06-26T23:30:51Z
2.2
["test_ascii_validator (auth_tests.test_validators.UsernameValidatorsTests)", "test_unicode_validator (auth_tests.test_validators.UsernameValidatorsTests)", "test_help_text (auth_tests.test_validators.UserAttributeSimilarityValidatorTest)", "test_validate (auth_tests.test_validators.UserAttributeSimilarityValidatorTest...
["test_defaults (str.tests.SimpleTests)", "test_international (str.tests.SimpleTests)", "test_default (model_fields.test_decimalfield.DecimalFieldTests)", "test_filter_with_strings (model_fields.test_decimalfield.DecimalFieldTests)", "test_get_prep_value (model_fields.test_decimalfield.DecimalFieldTests)", "test_lookup...
4fc35a9c3efdc9154efce28cb23cb84f8834517e
<15 min fix
django__django-10097
python:3.11
django/django
14d026cccb144c6877294ba4cd4e03ebf0842498
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -356,7 +356,12 @@ def get_order_by(self): resolved.set_source_expressions([RawSQL('%d' % (idx + 1), ())]) br...
diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py --- a/tests/queries/test_qs_combinators.py +++ b/tests/queries/test_qs_combinators.py @@ -153,6 +153,29 @@ def test_union_with_values_list_on_annotated_and_unannotated(self): qs2 = Number.objects.filter(num=9) sel...
Union queryset with ordering breaks on ordering with derived querysets Description (last modified by Sergei Maertens) May be related to #29692 Simple reproduction (the exact models are not relevant I think): >>> Dimension.objects.values_list('id', flat=True) <QuerySet [10, 11, 12, 13, 14, 15, 16, 17, 18]> >>> q...
Looks like a bug caused by a .query attribute change without performing a prior copy() of the query/queryset. Attaching a regression test that fails on master (tested at f3d3338e06d571a529bb2046428eeac8e56bcbf6). ​PR Tests aren't passing. Needs more tests, at the least. But discussion on PR suggests we've not hit the r...
2018-10-24T14:24:45Z
3.0
["test_union_with_values_list_and_order (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_union_with_values_list_on_annotated_and_unannotated (queries.test_qs_combinators.QuerySetSetOperationTests)"]
["test_combining_multiple_models (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_difference (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_intersection (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_union (queries.test_qs_combinators.QuerySetSetOperati...
419a78300f7cd27611196e1e464d50fd0385ff27
1-4 hours
django__django-10554
python:3.11
django/django
838e432e3e5519c5383d12018e6c78f8ec7833c1
diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py --- a/django/db/models/aggregates.py +++ b/django/db/models/aggregates.py @@ -68,7 +68,7 @@ def get_group_by_cols(self): return [] def as_sql(self, compiler, connection, **extra_context): - extra_context['distinct'] = 'D...
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -8,6 +8,7 @@ Avg, Count, DecimalField, DurationField, F, FloatField, Func, IntegerField, Max, Min, Sum, Value, ) +from django.db.models.expressions import Case, When from...
Query syntax error with condition and distinct combination Description A Count annotation containing both a Case condition and a distinct=True param produces a query error on Django 2.2 (whatever the db backend). A space is missing at least (... COUNT(DISTINCTCASE WHEN ...).
Failing test example Bisected to [bc05547cd8c1dd511c6b6a6c873a1bc63417b111] Fixed #28658 -- Added DISTINCT handling to the Aggregate class.
2019-01-21T00:22:36Z
3.0
["test_count_distinct_expression (aggregation.tests.AggregateTestCase)"]
["test_add_implementation (aggregation.tests.AggregateTestCase)", "test_aggregate_alias (aggregation.tests.AggregateTestCase)", "test_aggregate_annotation (aggregation.tests.AggregateTestCase)", "test_aggregate_in_order_by (aggregation.tests.AggregateTestCase)", "test_aggregate_multi_join (aggregation.tests.AggregateTe...
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django__django-10880
python:3.11
django/django
e7fd69d051eaa67cb17f172a39b57253e9cb831a
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -304,7 +304,7 @@ def gettext_noop(s): # The numeric mode to set newly-uploaded files to. The value should be a mode # you'd pass directly to os.chmod; see https:/...
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -1099,7 +1099,7 @@ def test_override_file_upload_permissions(self): the file_permissions_mode attribute of django.core.files.storage.default_storage. """ - ...
Set default FILE_UPLOAD_PERMISSION to 0o644. Description Hello, As far as I can see, the ​File Uploads documentation page does not mention any permission issues. What I would like to see is a warning that in absence of explicitly configured FILE_UPLOAD_PERMISSIONS, the permissions for a file uploaded to FileSystemSto...
I think you're talking about ef70af77ec53160d5ffa060c1bdf5ed93322d84f (#28540). I guess the question is whether or not that documentation should be duplicated elsewhere. Thank you Tim, this is precisely what I was looking for! I can only see one issue with the current docs (if you excuse me for bothering you with such ...
2019-01-30T13:13:20Z
3.0
["test_override_file_upload_permissions (test_utils.tests.OverrideSettingsTests)"]
["test_allowed_database_chunked_cursor_queries (test_utils.tests.AllowedDatabaseQueriesTests)", "test_allowed_database_queries (test_utils.tests.AllowedDatabaseQueriesTests)", "test_skip_if_db_feature (test_utils.tests.SkippingTestCase)", "test_skip_unless_db_feature (test_utils.tests.SkippingTestCase)", "test_equal_pa...
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django__django-10914
python:3.11
django/django
ddb293685235fd09e932805771ae97f72e817181
diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py --- a/django/db/backends/postgresql/client.py +++ b/django/db/backends/postgresql/client.py @@ -2,17 +2,9 @@ import signal import subprocess -from django.core.files.temp import NamedTemporaryFile from django.db.backends....
diff --git a/tests/dbshell/test_postgresql.py b/tests/dbshell/test_postgresql.py --- a/tests/dbshell/test_postgresql.py +++ b/tests/dbshell/test_postgresql.py @@ -1,5 +1,6 @@ import os import signal +import subprocess from unittest import mock from django.db.backends.postgresql.client import DatabaseClient @@ -11...
Use subprocess.run and PGPASSWORD for client in postgres backend Description ​subprocess.run was added in python 3.5 (which is the minimum version since Django 2.1). This function allows you to pass a custom environment for the subprocess. Using this in django.db.backends.postgres.client to set PGPASSWORD simplifies ...
2019-02-11T01:19:56Z
3.0
["test_accent (dbshell.test_postgresql.PostgreSqlDbshellCommandTestCase)", "test_basic (dbshell.test_postgresql.PostgreSqlDbshellCommandTestCase)", "test_column (dbshell.test_postgresql.PostgreSqlDbshellCommandTestCase)", "test_nopass (dbshell.test_postgresql.PostgreSqlDbshellCommandTestCase)", "SIGINT is ignored in Py...
[]
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
django__django-10973
python:3.11
django/django
36300ef336e3f130a0dadc1143163ff3d23dc843
diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py --- a/django/utils/dateparse.py +++ b/django/utils/dateparse.py @@ -29,9 +29,10 @@ standard_duration_re = re.compile( r'^' r'(?:(?P<days>-?\d+) (days?, )?)?' - r'((?:(?P<hours>-?\d+):)(?=\d+:\d+))?' - r'(?:(?P<minutes>-?\d+):)?' - r'...
diff --git a/tests/utils_tests/test_dateparse.py b/tests/utils_tests/test_dateparse.py --- a/tests/utils_tests/test_dateparse.py +++ b/tests/utils_tests/test_dateparse.py @@ -113,9 +113,12 @@ def test_negative(self): test_values = ( ('-4 15:30', timedelta(days=-4, minutes=15, seconds=30)), ...
Fix parse_duration() for some negative durations Description The ​https://docs.djangoproject.com/en/2.1/_modules/django/utils/dateparse/ defines: standard_duration_re = re.compile( r'^' r'(?:(?P<days>-?\d+) (days?, )?)?' r'((?:(?P<hours>-?\d+):)(?=\d+:\d+))?' r'(?:(?P<minutes>-?\d+):)?' r'(?P<seconds>-?\d+)' r'...
Please give an example valid that's not working. There are ​some tests for negative values. Right, this should have been fixed by #27699 which is included in 1.11.x. Example cases, can be discussed: parse_duration('-00:01:01') => plus 61 seconds, so it is not -(00:01:01) but (-00):(+01):(+01) parse_duration('00:-01:-01...
2019-02-16T07:44:50Z
3.0
["test_negative (utils_tests.test_dateparse.DurationParseTests)", "test_parse_postgresql_format (utils_tests.test_dateparse.DurationParseTests)"]
["test_parse_date (utils_tests.test_dateparse.DateParseTests)", "test_parse_datetime (utils_tests.test_dateparse.DateParseTests)", "test_parse_time (utils_tests.test_dateparse.DateParseTests)", "test_days (utils_tests.test_dateparse.DurationParseTests)", "test_fractions_of_seconds (utils_tests.test_dateparse.DurationPa...
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django__django-10999
python:3.11
django/django
4b45b6c8e4d7c9701a332e80d3b1c84209dc36e2
"diff --git a/django/contrib/contenttypes/management/__init__.py b/django/contrib/contenttypes/manag(...TRUNCATED)
"diff --git a/tests/contenttypes_tests/test_operations.py b/tests/contenttypes_tests/test_operations(...TRUNCATED)
"RenameContentType._rename() doesn't save the content type on the correct database\nDescription\n\t\(...TRUNCATED)
"Added a pull request with the fix. ​https://github.com/django/django/pull/10332\nHi, I spent all (...TRUNCATED)
2019-03-09T13:03:14Z
3.0
"[\"test_existing_content_type_rename_other_database (contenttypes_tests.test_operations.ContentType(...TRUNCATED)
"[\"test_content_type_rename_conflict (contenttypes_tests.test_operations.ContentTypeOperationsTests(...TRUNCATED)
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django__django-11066
python:3.11
django/django
8180ffba21bf10f4be905cb0d4890dc2bcff2788
"diff --git a/django/db/models/deletion.py b/django/db/models/deletion.py\n--- a/django/db/models/de(...TRUNCATED)
"diff --git a/tests/delete/models.py b/tests/delete/models.py\n--- a/tests/delete/models.py\n+++ b/t(...TRUNCATED)
"Optimize .delete() to use only required fields.\nDescription\n\t\nHi!\nWe're in the process of upgr(...TRUNCATED)
"I think this would have been better posted elsewhere. See TicketClosingReasons/UseSupportChannels. (...TRUNCATED)
2019-03-16T22:59:57Z
3.0
["test_only_referenced_fields_selected (delete.tests.DeletionTests)"]
"[\"test_fast_delete_empty_no_update_can_self_select (delete.tests.FastDeleteTests)\", \"test_fast_d(...TRUNCATED)
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
django__django-11087
python:3.11
django/django
7d49ad76562e8c0597a0eb66046ab423b12888d8
"diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py\n--- a/django/contri(...TRUNCATED)
"diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py\n--- a/tests(...TRUNCATED)
"add ModelAdmin.get_inlines() hook to allow set inlines based on the request or model instance.\nDes(...TRUNCATED)
"Are you going to offer a patch to show exactly what you have in mind? I'm not immediately convinced(...TRUNCATED)
2019-03-19T15:17:28Z
3.0
"[\"test_get_inline_instances_override_get_inlines (generic_inline_admin.tests.GenericInlineModelAdm(...TRUNCATED)
"[\"test_no_deletion (generic_inline_admin.tests.NoInlineDeletionTest)\", \"test_custom_form_meta_ex(...TRUNCATED)
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
django__django-11095
python:3.11
django/django
d26b2424437dabeeca94d7900b37d2df4410da0c
"diff --git a/django/contrib/auth/validators.py b/django/contrib/auth/validators.py\n--- a/django/co(...TRUNCATED)
"diff --git a/tests/auth_tests/test_validators.py b/tests/auth_tests/test_validators.py\n--- a/tests(...TRUNCATED)
"UsernameValidator allows trailing newline in usernames\nDescription\n\t\nASCIIUsernameValidator and(...TRUNCATED)
2019-03-20T03:46:18Z
3.0
"[\"test_ascii_validator (auth_tests.test_validators.UsernameValidatorsTests)\", \"test_unicode_vali(...TRUNCATED)
"[\"test_help_text (auth_tests.test_validators.MinimumLengthValidatorTest)\", \"test_validate (auth_(...TRUNCATED)
419a78300f7cd27611196e1e464d50fd0385ff27
<15 min fix
django__django-11099
python:3.11
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
156