repo string | instance_id string | base_commit string | patch string | test_patch string | problem_statement string | hints_text string | created_at int64 | version string | FAIL_TO_PASS string | PASS_TO_PASS string | environment_setup_commit string | target_file string | patch_range sequence | file_path string | OOP int64 | image_name string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
astropy/astropy | astropy__astropy-14182 | a5917978be39d13cd90b517e1de4e7a539ffaa48 | diff --git a/astropy/io/ascii/rst.py b/astropy/io/ascii/rst.py
--- a/astropy/io/ascii/rst.py
+++ b/astropy/io/ascii/rst.py
@@ -27,7 +27,6 @@ def get_fixedwidth_params(self, line):
class SimpleRSTData(FixedWidthData):
- start_line = 3
end_line = -1
splitter_class = FixedWidthTwoLineDataSplitter
@@ -3... | diff --git a/astropy/io/ascii/tests/test_rst.py b/astropy/io/ascii/tests/test_rst.py
--- a/astropy/io/ascii/tests/test_rst.py
+++ b/astropy/io/ascii/tests/test_rst.py
@@ -2,7 +2,11 @@
from io import StringIO
+import numpy as np
+
+import astropy.units as u
from astropy.io import ascii
+from astropy.table import Q... | Please support header rows in RestructuredText output
### Description
It would be great if the following would work:
```Python
>>> from astropy.table import QTable
>>> import astropy.units as u
>>> import sys
>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})
>>> tbl.write(sys.stdout,... | 1,671,189,217 | 5.1 | ["astropy/io/ascii/tests/test_rst.py::test_rst_with_header_rows"] | ["astropy/io/ascii/tests/test_rst.py::test_read_normal", "astropy/io/ascii/tests/test_rst.py::test_read_normal_names", "astropy/io/ascii/tests/test_rst.py::test_read_normal_names_include", "astropy/io/ascii/tests/test_rst.py::test_read_normal_exclude", "astropy/io/ascii/tests/test_rst.py::test_read_unbounded_right_colu... | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | # Licensed under a 3-clause BSD style license
"""
:Author: Simon Gibbons (simongibbons@gmail.com)
"""
from .core import DefaultSplitter
from .fixedwidth import (
FixedWidth,
FixedWidthData,
FixedWidthHeader,
FixedWidthTwoLineDataSplitter,
)
class SimpleRSTHeader(FixedWidthHeader):
position_line ... | [
[
27,
32
],
[
38,
66
],
[
73,
87
]
] | astropy/io/ascii/rst.py | 1 | python:3.11 | |
django/django | django__django-11039 | d5276398046ce4a102776a1e67dcac2884d80dfe | diff --git a/django/core/management/commands/sqlmigrate.py b/django/core/management/commands/sqlmigrate.py
--- a/django/core/management/commands/sqlmigrate.py
+++ b/django/core/management/commands/sqlmigrate.py
@@ -55,8 +55,9 @@ def handle(self, *args, **options):
migration_name, app_label))
t... | diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -536,7 +536,13 @@ def test_sqlmigrate_forwards(self):
index_op_desc_unique_together = output.find('-- alter unique_together')
index_tx_e... | sqlmigrate wraps it's outpout in BEGIN/COMMIT even if the database doesn't support transactional DDL
Description
(last modified by Simon Charette)
The migration executor only adds the outer BEGIN/COMMIT if the migration is atomic and the schema editor can rollback DDL but the current sqlmigrate logic only tak... | I marked the ticket as easy picking because I included the above guidelines but feel free to uncheck it if you deem it inappropriate. Super. We don't have enough Easy Pickings tickets for the demand, so this kind of thing is great. (IMO 🙂)
Hey, I'm working on this ticket, I would like you to know as this is my first t... | 1,551,435,878 | 3.0 | ["test_sqlmigrate_for_non_transactional_databases (migrations.test_commands.MigrateTests)"] | ["test_makemigrations_app_name_specified_as_label (migrations.test_commands.AppLabelErrorTests)", "test_makemigrations_nonexistent_app_label (migrations.test_commands.AppLabelErrorTests)", "test_migrate_app_name_specified_as_label (migrations.test_commands.AppLabelErrorTests)", "test_migrate_nonexistent_app_label (migr... | 419a78300f7cd27611196e1e464d50fd0385ff27 | from django.apps import apps
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections
from django.db.migrations.executor import MigrationExecutor
from django.db.migrations.loader import AmbiguityError
class Command(BaseCommand):
help = "Prints the SQL s... | [
[
55,
63
]
] | django/core/management/commands/sqlmigrate.py | 1 | python:3.11 |
django/django | django__django-11422 | df46b329e0900e9e4dc1d60816c1dce6dfc1094e | diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -114,7 +114,15 @@ def iter_modules_and_files(modules, extra_files):
# During debugging (with PyDev) the 'typing.io' and 'typing.re' objects
# are added to sys.modul... | diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py
--- a/tests/utils_tests/test_autoreload.py
+++ b/tests/utils_tests/test_autoreload.py
@@ -132,6 +132,10 @@ def test_module_without_spec(self):
del module.__spec__
self.assertEqual(autoreload.iter_modules_and_files... | Autoreloader with StatReloader doesn't track changes in manage.py.
Description
(last modified by Mariusz Felisiak)
This is a bit convoluted, but here we go.
Environment (OSX 10.11):
$ python -V
Python 3.6.2
$ pip -V
pip 19.1.1
$ pip install Django==2.2.1
Steps to reproduce:
Run a server python manage.py runserv... | Thanks for the report. I simplified scenario. Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca. Reproduced at 8d010f39869f107820421631111417298d1c5bb9.
Argh. I guess this is because manage.py isn't showing up in the sys.modules. I'm not sure I remember any specific manage.py handling in the old implementation, so... | 1,558,984,521 | 3.0 | ["test_main_module_is_resolved (utils_tests.test_autoreload.TestIterModulesAndFiles)"] | ["test_watchman_available (utils_tests.test_autoreload.GetReloaderTests)", "test_watchman_unavailable (utils_tests.test_autoreload.GetReloaderTests)", "test_calls_start_django (utils_tests.test_autoreload.RunWithReloaderTests)", "test_calls_sys_exit (utils_tests.test_autoreload.RunWithReloaderTests)", "test_swallows_ke... | 419a78300f7cd27611196e1e464d50fd0385ff27 | import functools
import itertools
import logging
import os
import pathlib
import signal
import subprocess
import sys
import threading
import time
import traceback
import weakref
from collections import defaultdict
from pathlib import Path
from types import ModuleType
from zipimport import zipimporter
from django.apps ... | [
[
114,
128
]
] | django/utils/autoreload.py | 1 | python:3.11 |
django/django | django__django-11583 | 60dc957a825232fdda9138e2f8878b2ca407a7c9 | diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -143,6 +143,10 @@ def iter_modules_and_files(modules, extra_files):
# The module could have been removed, don't fail loudly if this
# is the case.
... | diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py
--- a/tests/utils_tests/test_autoreload.py
+++ b/tests/utils_tests/test_autoreload.py
@@ -140,6 +140,17 @@ def test_main_module_without_file_is_not_resolved(self):
fake_main = types.ModuleType('__main__')
self.ass... | Auto-reloading with StatReloader very intermittently throws "ValueError: embedded null byte".
Description
Raising this mainly so that it's tracked, as I have no idea how to reproduce it, nor why it's happening. It ultimately looks like a problem with Pathlib, which wasn't used prior to 2.2.
Stacktrace:
Traceback (mos... | Thanks for the report, however as you've admitted there is too many unknowns to accept this ticket. I don't believe that it is related with pathlib, maybe samba connection is unstable it's hard to tell.
I don't believe that it is related with pathlib Well ... it definitely is, you can see that from the stacktrace. The ... | 1,563,742,574 | 3.0 | ["test_path_with_embedded_null_bytes (utils_tests.test_autoreload.TestIterModulesAndFiles)", "test_paths_are_pathlib_instances (utils_tests.test_autoreload.TestIterModulesAndFiles)"] | ["test_no_exception (utils_tests.test_autoreload.TestRaiseLastException)", "test_raises_custom_exception (utils_tests.test_autoreload.TestRaiseLastException)", "test_raises_exception (utils_tests.test_autoreload.TestRaiseLastException)", "test_raises_exception_with_context (utils_tests.test_autoreload.TestRaiseLastExce... | 419a78300f7cd27611196e1e464d50fd0385ff27 | import functools
import itertools
import logging
import os
import signal
import subprocess
import sys
import threading
import time
import traceback
import weakref
from collections import defaultdict
from pathlib import Path
from types import ModuleType
from zipimport import zipimporter
from django.apps import apps
fro... | [
[
143,
152
]
] | django/utils/autoreload.py | 1 | python:3.11 |
django/django | django__django-11620 | 514efa3129792ec2abb2444f3e7aeb3f21a38386 | diff --git a/django/views/debug.py b/django/views/debug.py
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -5,10 +5,10 @@
from pathlib import Path
from django.conf import settings
-from django.http import HttpResponse, HttpResponseNotFound
+from django.http import Http404, HttpResponse, HttpResponseNotFo... | diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -12,11 +12,13 @@
from django.core import mail
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db import DatabaseE... | When DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response
Description
This is the response I get (plain text):
A server error occurred. Please contact the administrator.
I understand a ValueError should be raised which tells the URL resolver "this path does no... | It seems that other exceptions correctly result in a technical 500 response.
The technical_404_response view performs a new URL resolving (cf https://github.com/django/django/blob/a8e492bc81fca829f5d270e2d57703c02e58701e/django/views/debug.py#L482) which will obviously raise a new Http404 which won't be caught as only... | 1,564,754,168 | 3.0 | ["test_technical_404_converter_raise_404 (view_tests.tests.test_debug.DebugViewTests)"] | ["test_repr (view_tests.tests.test_debug.CallableSettingWrapperTests)", "test_cleanse_setting_basic (view_tests.tests.test_debug.HelperFunctionTests)", "test_cleanse_setting_ignore_case (view_tests.tests.test_debug.HelperFunctionTests)", "test_cleanse_setting_recurses_in_dictionary (view_tests.tests.test_debug.HelperFu... | 419a78300f7cd27611196e1e464d50fd0385ff27 | import functools
import re
import sys
import types
from pathlib import Path
from django.conf import settings
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Context, Engine, TemplateDoesNotExist
from django.template.defaultfilters import pprint
from django.urls import Resolver404... | [
[
5,
14
],
[
483,
489
]
] | django/views/debug.py | 1 | python:3.11 |
django/django | django__django-11797 | 3346b78a8a872286a245d1e77ef4718fc5e6be1a | diff --git a/django/db/models/lookups.py b/django/db/models/lookups.py
--- a/django/db/models/lookups.py
+++ b/django/db/models/lookups.py
@@ -262,9 +262,9 @@ def process_rhs(self, compiler, connection):
from django.db.models.sql.query import Query
if isinstance(self.rhs, Query):
if self.... | diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
--- a/tests/lookup/tests.py
+++ b/tests/lookup/tests.py
@@ -5,6 +5,7 @@
from django.core.exceptions import FieldError
from django.db import connection
+from django.db.models import Max
from django.db.models.expressions import Exists, OuterRef
from django.... | Filtering on query result overrides GROUP BY of internal query
Description
from django.contrib.auth import models
a = models.User.objects.filter(email__isnull=True).values('email').annotate(m=Max('id')).values('m')
print(a.query) # good
# SELECT MAX("auth_user"."id") AS "m" FROM "auth_user" WHERE "auth_user"."email" ... | Workaround: from django.contrib.auth import models a = models.User.objects.filter(email__isnull=True).values('email').aggregate(Max('id'))['id_max'] b = models.User.objects.filter(id=a)
Thanks for tackling that one James! If I can provide you some guidance I'd suggest you have a look at lookups.Exact.process_rhs https... | 1,568,946,199 | 3.1 | ["test_exact_query_rhs_with_selected_columns (lookup.tests.LookupTests)"] | ["test_chain_date_time_lookups (lookup.tests.LookupTests)", "test_count (lookup.tests.LookupTests)", "test_custom_field_none_rhs (lookup.tests.LookupTests)", "Lookup.can_use_none_as_rhs=True allows None as a lookup value.", "test_error_messages (lookup.tests.LookupTests)", "test_escaping (lookup.tests.LookupTests)", "t... | 0668164b4ac93a5be79f5b87fae83c657124d9ab | import itertools
import math
from copy import copy
from django.core.exceptions import EmptyResultSet
from django.db.models.expressions import Case, Exists, Func, Value, When
from django.db.models.fields import (
BooleanField, DateTimeField, Field, IntegerField,
)
from django.db.models.query_utils import RegisterLo... | [
[
262,
270
]
] | django/db/models/lookups.py | 1 | python:3.11 |
django/django | django__django-11815 | e02f67ef2d03d48128e7a118bf75f0418e24e8ac | diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py
--- a/django/db/migrations/serializer.py
+++ b/django/db/migrations/serializer.py
@@ -120,9 +120,10 @@ class EnumSerializer(BaseSerializer):
def serialize(self):
enum_class = self.value.__class__
module = enum_cl... | diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -257,6 +257,10 @@ class TextEnum(enum.Enum):
A = 'a-value'
B = 'value-b'
+ class TextTranslatedEnum(enum.Enum):
+ A ... | Migrations uses value of enum object instead of its name.
Description
(last modified by oasl)
When using Enum object as a default value for a CharField, the generated migration file uses the value of the Enum object instead of the its name. This causes a problem when using Django translation on the value of the... | Thanks for this report, however I'm not sure how translated values can brake migrations. Can you provide a sample project to reproduce this issue? Migrations with translatable strings works fine for me: >>> class TextEnum(enum.Enum): ... C = _('translatable value') ... >>> TextEnum(_('translatable value')) <TextEnum.C:... | 1,569,361,536 | 3.1 | ["test_serialize_class_based_validators (migrations.test_writer.WriterTests)", "test_serialize_enums (migrations.test_writer.WriterTests)"] | ["test_args_kwargs_signature (migrations.test_writer.OperationWriterTests)", "test_args_signature (migrations.test_writer.OperationWriterTests)", "test_empty_signature (migrations.test_writer.OperationWriterTests)", "test_expand_args_signature (migrations.test_writer.OperationWriterTests)", "test_kwargs_signature (migr... | 0668164b4ac93a5be79f5b87fae83c657124d9ab | import builtins
import collections.abc
import datetime
import decimal
import enum
import functools
import math
import re
import types
import uuid
from django.conf import SettingsReference
from django.db import models
from django.db.migrations.operations.base import Operation
from django.db.migrations.utils import COMP... | [
[
120,
129
]
] | django/db/migrations/serializer.py | 1 | python:3.11 |
django/django | django__django-11905 | 2f72480fbd27896c986c45193e1603e35c0b19a7 | "diff --git a/django/db/models/lookups.py b/django/db/models/lookups.py\n--- a/django/db/models/look(...TRUNCATED) | "diff --git a/tests/lookup/models.py b/tests/lookup/models.py\n--- a/tests/lookup/models.py\n+++ b/t(...TRUNCATED) | "Prevent using __isnull lookup with non-boolean value.\nDescription\n\t \n\t\t(last modified by Mari(...TRUNCATED) | "PR here: https://github.com/django/django/pull/11873\nAfter the reconsideration I don't think th(...TRUNCATED) | 1,570,817,979 | 3.1 | "[\"test_isnull_non_boolean_value (lookup.tests.LookupTests)\", \"test_iterator (lookup.tests.Lookup(...TRUNCATED) | "[\"test_chain_date_time_lookups (lookup.tests.LookupTests)\", \"test_count (lookup.tests.LookupTest(...TRUNCATED) | 0668164b4ac93a5be79f5b87fae83c657124d9ab | "import itertools\nimport math\nfrom copy import copy\n\nfrom django.core.exceptions import EmptyRes(...TRUNCATED) | [
[
1,
6
],
[
10,
16
],
[
465,
481
]
] | django/db/models/lookups.py | 1 | python:3.11 |
django/django | django__django-11910 | d232fd76a85870daf345fd8f8d617fe7802ae194 | "diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py\n--- a/dja(...TRUNCATED) | "diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py\n--- a/t(...TRUNCATED) | "ForeignKey's to_field parameter gets the old field's name when renaming a PrimaryKey.\nDescription\(...TRUNCATED) | "Thanks for this ticket. It looks like a regression in dcdd219ee1e062dc6189f382e0298e0adf5d5ddf, bec(...TRUNCATED) | 1,571,018,209 | 3.1 | ["test_rename_referenced_primary_key (migrations.test_autodetector.AutodetectorTests)"] | "[\"test_add_alter_order_with_respect_to (migrations.test_autodetector.AutodetectorTests)\", \"test_(...TRUNCATED) | 0668164b4ac93a5be79f5b87fae83c657124d9ab | "import functools\nimport re\nfrom itertools import chain\n\nfrom django.conf import settings\nfrom (...TRUNCATED) | [
[
927,
936
]
] | django/db/migrations/autodetector.py | 1 | python:3.11 |
django/django | django__django-12113 | 62254c5202e80a68f4fe6572a2be46a3d953de1a | "diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py\n--- a(...TRUNCATED) | "diff --git a/tests/backends/sqlite/test_creation.py b/tests/backends/sqlite/test_creation.py\nnew f(...TRUNCATED) | "admin_views.test_multidb fails with persistent test SQLite database.\nDescription\n\t \n\t\t(last m(...TRUNCATED) | "This is only an issue when setting TEST[\"NAME\"], but not NAME. The following works: DATABASES = {(...TRUNCATED) | 1,574,272,146 | 3.1 | ["test_custom_test_name (backends.sqlite.test_creation.TestDbSignatureTests)"] | [] | 0668164b4ac93a5be79f5b87fae83c657124d9ab | "import os\nimport shutil\nimport sys\nfrom pathlib import Path\n\nfrom django.db.backends.base.crea(...TRUNCATED) | [
[
98,
103
]
] | django/db/backends/sqlite3/creation.py | 1 | python:3.11 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 26