repo stringclasses 10
values | instance_id stringlengths 18 32 | base_commit stringlengths 40 40 | patch stringlengths 365 17.4k | test_patch stringlengths 394 6.74k | problem_statement stringlengths 190 5.36k | hints_text stringlengths 0 15.4k | created_at stringdate 2013-01-25 05:19:16 2023-07-24 22:46:12 | version stringlengths 3 7 | FAIL_TO_PASS stringlengths 12 32.6k | PASS_TO_PASS stringlengths 2 114k | environment_setup_commit stringlengths 40 40 | difficulty stringclasses 4
values | __index_level_0__ int64 0 497 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scikit-learn/scikit-learn | scikit-learn__scikit-learn-13439 | a62775e99f2a5ea3d51db7160fad783f6cd8a4c5 | diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py
--- a/sklearn/pipeline.py
+++ b/sklearn/pipeline.py
@@ -199,6 +199,12 @@ def _iter(self, with_final=True):
if trans is not None and trans != 'passthrough':
yield idx, name, trans
+ def __len__(self):
+ """
+ Returns ... | diff --git a/sklearn/tests/test_pipeline.py b/sklearn/tests/test_pipeline.py
--- a/sklearn/tests/test_pipeline.py
+++ b/sklearn/tests/test_pipeline.py
@@ -1069,5 +1069,6 @@ def test_make_pipeline_memory():
assert pipeline.memory is memory
pipeline = make_pipeline(DummyTransf(), SVC())
assert pipeline.mem... | Pipeline should implement __len__
#### Description
With the new indexing support `pipe[:len(pipe)]` raises an error.
#### Steps/Code to Reproduce
```python
from sklearn import svm
from sklearn.datasets import samples_generator
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection... | None should work just as well, but perhaps you're right that len should be
implemented. I don't think we should implement other things from sequences
such as iter, however.
I think len would be good to have but I would also try to add as little as possible.
+1
>
I am looking at it. | 2019-03-12T20:32:50Z | 0.21 | ["sklearn/tests/test_pipeline.py::test_make_pipeline_memory"] | ["sklearn/tests/test_pipeline.py::test_pipeline_init", "sklearn/tests/test_pipeline.py::test_pipeline_init_tuple", "sklearn/tests/test_pipeline.py::test_pipeline_methods_anova", "sklearn/tests/test_pipeline.py::test_pipeline_fit_params", "sklearn/tests/test_pipeline.py::test_pipeline_sample_weight_supported", "sklearn/... | 7813f7efb5b2012412888b69e73d76f2df2b50b6 | <15 min fix | 361 |
django/django | django__django-12155 | e8fcdaad5c428878d0a5d6ba820d957013f75595 | diff --git a/django/contrib/admindocs/utils.py b/django/contrib/admindocs/utils.py
--- a/django/contrib/admindocs/utils.py
+++ b/django/contrib/admindocs/utils.py
@@ -3,6 +3,7 @@
import re
from email.errors import HeaderParseError
from email.parser import HeaderParser
+from inspect import cleandoc
from django.url... | diff --git a/tests/admin_docs/test_utils.py b/tests/admin_docs/test_utils.py
--- a/tests/admin_docs/test_utils.py
+++ b/tests/admin_docs/test_utils.py
@@ -1,8 +1,9 @@
import unittest
from django.contrib.admindocs.utils import (
- docutils_is_available, parse_docstring, parse_rst, trim_docstring,
+ docutils_is... | docutils reports an error rendering view docstring when the first line is not empty
Description
Currently admindoc works correctly only with docstrings where the first line is empty, and all Django docstrings are formatted in this way.
However usually the docstring text starts at the first line, e.g.:
def test():
""... | Confirmed the patch fixes the issue, although it crashes for some tests with ValueError: min() arg is an empty sequence.
We should probably just switch to inspect.cleandoc as it implements the algorithm defined in PEP257.
Replying to Tim Graham: Confirmed the patch fixes the issue, although it crashes for some tests ... | 2019-11-28T16:24:23Z | 3.1 | ["test_parse_rst_with_docstring_no_leading_line_feed (admin_docs.test_utils.TestUtils)"] | ["test_description_output (admin_docs.test_utils.TestUtils)", "test_initial_header_level (admin_docs.test_utils.TestUtils)", "test_parse_docstring (admin_docs.test_utils.TestUtils)", "test_parse_rst (admin_docs.test_utils.TestUtils)", "test_publish_parts (admin_docs.test_utils.TestUtils)", "test_title_output (admin_doc... | 0668164b4ac93a5be79f5b87fae83c657124d9ab | 15 min - 1 hour | 73 |
scikit-learn/scikit-learn | scikit-learn__scikit-learn-25232 | f7eea978097085a6781a0e92fc14ba7712a52d75 | diff --git a/sklearn/impute/_iterative.py b/sklearn/impute/_iterative.py
--- a/sklearn/impute/_iterative.py
+++ b/sklearn/impute/_iterative.py
@@ -117,6 +117,15 @@ class IterativeImputer(_BaseImputer):
Which strategy to use to initialize the missing values. Same as the
`strategy` parameter in :class:`... | diff --git a/sklearn/impute/tests/test_impute.py b/sklearn/impute/tests/test_impute.py
--- a/sklearn/impute/tests/test_impute.py
+++ b/sklearn/impute/tests/test_impute.py
@@ -1524,6 +1524,21 @@ def test_iterative_imputer_keep_empty_features(initial_strategy):
assert_allclose(X_imputed[:, 1], 0)
+def test_itera... | IterativeImputer has no parameter "fill_value"
### Describe the workflow you want to enable
In the first imputation round of `IterativeImputer`, an initial value needs to be set for the missing values. From its [docs](https://scikit-learn.org/stable/modules/generated/sklearn.impute.IterativeImputer.html):
> **ini... | I think that we could consider that as a bug. We will have to add this parameter. Nowadays, I would find it easier just to pass a `SimpleImputer` instance.
@glemaitre
Thanks for your suggestion:
> pass a SimpleImputer instance.
Here is what I tried:
`from sklearn.experimental import enable_iterative_imputer # ... | 2022-12-24T15:32:44Z | 1.3 | ["sklearn/impute/tests/test_impute.py::test_iterative_imputer_constant_fill_value"] | ["sklearn/impute/tests/test_impute.py::test_imputation_shape[mean]", "sklearn/impute/tests/test_impute.py::test_imputation_shape[median]", "sklearn/impute/tests/test_impute.py::test_imputation_shape[most_frequent]", "sklearn/impute/tests/test_impute.py::test_imputation_shape[constant]", "sklearn/impute/tests/test_imput... | 1e8a5b833d1b58f3ab84099c4582239af854b23a | <15 min fix | 374 |
django/django | django__django-14434 | 5e04e84d67da8163f365e9f5fcd169e2630e2873 | diff --git a/django/db/backends/base/schema.py b/django/db/backends/base/schema.py
--- a/django/db/backends/base/schema.py
+++ b/django/db/backends/base/schema.py
@@ -1241,9 +1241,9 @@ def create_unique_name(*args, **kwargs):
return self.quote_name(self._create_index_name(*args, **kwargs))
compi... | diff --git a/tests/schema/tests.py b/tests/schema/tests.py
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -2198,6 +2198,22 @@ def test_remove_unique_together_does_not_remove_meta_constraints(self):
AuthorWithUniqueNameAndBirthday._meta.constraints = []
editor.remove_constraint(Auth... | Statement created by _create_unique_sql makes references_column always false
Description
This is due to an instance of Table is passed as an argument to Columns when a string is expected.
| 2021-05-23T12:27:14Z | 4.0 | ["test_unique_constraint (schema.tests.SchemaTests)"] | ["effective_default() should be used for DateField, DateTimeField, and", "Tests adding fields to models", "Tests binary fields get a sane default (#22851)", "test_add_field_db_collation (schema.tests.SchemaTests)", "test_add_field_default_dropped (schema.tests.SchemaTests)", "test_add_field_default_nullable (schema.tes... | 475cffd1d64c690cdad16ede4d5e81985738ceb4 | 15 min - 1 hour | 155 | |
django/django | django__django-13279 | 6e9c5ee88fc948e05b4a7d9f82a8861ed2b0343d | diff --git a/django/contrib/sessions/backends/base.py b/django/contrib/sessions/backends/base.py
--- a/django/contrib/sessions/backends/base.py
+++ b/django/contrib/sessions/backends/base.py
@@ -108,6 +108,9 @@ def _hash(self, value):
def encode(self, session_dict):
"Return the given session dictionary ... | diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py
--- a/tests/sessions_tests/tests.py
+++ b/tests/sessions_tests/tests.py
@@ -31,9 +31,11 @@
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from django.http import HttpResponse
from django.test import (
- Reques... | Session data cannot be decoded during the transition to Django 3.1.
Description
In d4fff711d4c97356bd6ba1273d2a5e349326eb5f (#31274) we've changed format for session data, that's why setting DEFAULT_HASHING_ALGORITHM to 'sha1' is not enough to support running multiple instances of the same project during the transiti... | 2020-08-07T05:15:16Z | 3.2 | ["test_default_hashing_algorith_legacy_decode (sessions_tests.tests.CookieSessionTests)", "test_default_hashing_algorith_legacy_decode (sessions_tests.tests.CacheSessionTests)", "test_default_hashing_algorith_legacy_decode (sessions_tests.tests.FileSessionTests)", "test_default_hashing_algorith_legacy_decode (sessions_... | ["test_clear (sessions_tests.tests.CookieSessionTests)", "test_custom_expiry_datetime (sessions_tests.tests.CookieSessionTests)", "test_custom_expiry_reset (sessions_tests.tests.CookieSessionTests)", "test_custom_expiry_seconds (sessions_tests.tests.CookieSessionTests)", "test_custom_expiry_timedelta (sessions_tests.te... | 65dfb06a1ab56c238cc80f5e1c31f61210c4577d | 15 min - 1 hour | 104 | |
sphinx-doc/sphinx | sphinx-doc__sphinx-7757 | 212fd67b9f0b4fae6a7c3501fdf1a9a5b2801329 | diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -518,19 +518,34 @@ def signature_from_str(signature: str) -> inspect.Signature:
# parameters
args = definition.args
+ defaults = list(args.defaults)
params = []
+ if hasattr(a... | diff --git a/tests/test_util_inspect.py b/tests/test_util_inspect.py
--- a/tests/test_util_inspect.py
+++ b/tests/test_util_inspect.py
@@ -335,10 +335,14 @@ def test_signature_from_str_kwonly_args():
@pytest.mark.skipif(sys.version_info < (3, 8),
reason='python-3.8 or above is required')
def test... | The default value for positional only argument has vanished
**Describe the bug**
The default value for positional only argument has vanished
**To Reproduce**
Build following document:
```
.. py:function:: foo(a, b=0, /, c=1)
```
Result:
<img width="148" alt="スクリーンショット 2020-05-30 23 43 01" src="https://use... | 2020-05-30T14:46:01Z | 3.1 | ["tests/test_util_inspect.py::test_signature_from_str_positionaly_only_args"] | ["tests/test_util_inspect.py::test_signature", "tests/test_util_inspect.py::test_signature_partial", "tests/test_util_inspect.py::test_signature_methods", "tests/test_util_inspect.py::test_signature_partialmethod", "tests/test_util_inspect.py::test_signature_annotations", "tests/test_util_inspect.py::test_signature_ann... | 5afc77ee27fc01c57165ab260d3a76751f9ddb35 | 15 min - 1 hour | 394 | |
scikit-learn/scikit-learn | scikit-learn__scikit-learn-25973 | 10dbc142bd17ccf7bd38eec2ac04b52ce0d1009e | diff --git a/sklearn/feature_selection/_sequential.py b/sklearn/feature_selection/_sequential.py
--- a/sklearn/feature_selection/_sequential.py
+++ b/sklearn/feature_selection/_sequential.py
@@ -8,12 +8,12 @@
import warnings
from ._base import SelectorMixin
-from ..base import BaseEstimator, MetaEstimatorMixin, clo... | diff --git a/sklearn/feature_selection/tests/test_sequential.py b/sklearn/feature_selection/tests/test_sequential.py
--- a/sklearn/feature_selection/tests/test_sequential.py
+++ b/sklearn/feature_selection/tests/test_sequential.py
@@ -6,11 +6,12 @@
from sklearn.preprocessing import StandardScaler
from sklearn.pipelin... | Unable to pass splits to SequentialFeatureSelector
### Describe the bug
This runs fine with e.g. `cv=5`, but according to the documentation, it should also be able to take an iterable of splits.
However, passing splits from the cross validator fails
Im fairly certain I have done similar things in the past to other... | The internal algorithm will use the `cv` parameter in a `for` loop. If `cv` is a generator, it will be consumed at the first iteration only. Later it trigger the error because we did not complete the other iteration of the `for` loop.
Passing a list (e.g. `cv=list(splits)`) will solve the problem because we can reus... | 2023-03-25T13:27:07Z | 1.3 | ["sklearn/feature_selection/tests/test_sequential.py::test_cv_generator_support"] | ["sklearn/feature_selection/tests/test_sequential.py::test_bad_n_features_to_select", "sklearn/feature_selection/tests/test_sequential.py::test_n_features_to_select[1-forward]", "sklearn/feature_selection/tests/test_sequential.py::test_n_features_to_select[1-backward]", "sklearn/feature_selection/tests/test_sequential.... | 1e8a5b833d1b58f3ab84099c4582239af854b23a | <15 min fix | 377 |
django/django | django__django-13670 | c448e614c60cc97c6194c62052363f4f501e0953 | diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py
--- a/django/utils/dateformat.py
+++ b/django/utils/dateformat.py
@@ -325,8 +325,8 @@ def W(self):
return self.data.isocalendar()[1]
def y(self):
- "Year, 2 digits; e.g. '99'"
- return str(self.data.year)[2:]
+ """... | diff --git a/tests/utils_tests/test_dateformat.py b/tests/utils_tests/test_dateformat.py
--- a/tests/utils_tests/test_dateformat.py
+++ b/tests/utils_tests/test_dateformat.py
@@ -165,3 +165,16 @@ def test_r_format_with_non_en_locale(self):
dateformat.format(dt, 'r'),
'Sun, 08 Jul 1979 ... | dateformat.y() doesn't support years < 1000.
Description
(last modified by Sam)
When using the the dateformat of django with a date before 999 (or 99 and 9 for similar matters) and the format character "y" no leading zero will be printed. This is not consistent with the way the python datetime module and PHP ha... | 2020-11-12T11:45:51Z | 3.2 | ["test_year_before_1000 (utils_tests.test_dateformat.DateFormatTests)"] | ["test_am_pm (utils_tests.test_dateformat.DateFormatTests)", "test_date (utils_tests.test_dateformat.DateFormatTests)", "test_date_formats (utils_tests.test_dateformat.DateFormatTests)", "test_dateformat (utils_tests.test_dateformat.DateFormatTests)", "test_datetime_with_local_tzinfo (utils_tests.test_dateformat.DateFo... | 65dfb06a1ab56c238cc80f5e1c31f61210c4577d | 15 min - 1 hour | 124 | |
django/django | django__django-11999 | 84633905273fc916e3d17883810d9969c03f73c2 | diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -763,8 +763,12 @@ def contribute_to_class(self, cls, name, private_only=False):
if not getattr(cls, self.attname, None):
... | diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py
--- a/tests/model_fields/tests.py
+++ b/tests/model_fields/tests.py
@@ -168,6 +168,16 @@ def test_get_FIELD_display_translated(self):
self.assertIsInstance(val, str)
self.assertEqual(val, 'translated')
+ def test_overriding_FI... | Cannot override get_FOO_display() in Django 2.2+.
Description
I cannot override the get_FIELD_display function on models since version 2.2. It works in version 2.1.
Example:
class FooBar(models.Model):
foo_bar = models.CharField(_("foo"), choices=[(1, 'foo'), (2, 'bar')])
def __str__(self):
return self.get_foo_ba... | Thanks for this report. Regression in a68ea231012434b522ce45c513d84add516afa60. Reproduced at 54a7b021125d23a248e70ba17bf8b10bc8619234.
OK, I have a lead on this. Not at all happy about how it looks at first pass, but I'll a proof of concept PR together for it tomorrow AM.
I don't think it should be marked as blocker s... | 2019-10-31T10:39:18Z | 3.1 | ["test_overriding_FIELD_display (model_fields.tests.GetFieldDisplayTests)"] | ["test_blank_in_choices (model_fields.tests.GetChoicesTests)", "test_blank_in_grouped_choices (model_fields.tests.GetChoicesTests)", "test_empty_choices (model_fields.tests.GetChoicesTests)", "test_lazy_strings_not_evaluated (model_fields.tests.GetChoicesTests)", "test_check (model_fields.tests.ChoicesTests)", "test_ch... | 0668164b4ac93a5be79f5b87fae83c657124d9ab | 15 min - 1 hour | 68 |
sympy/sympy | sympy__sympy-15599 | 5e17a90c19f7eecfa10c1ab872648ae7e2131323 | diff --git a/sympy/core/mod.py b/sympy/core/mod.py
--- a/sympy/core/mod.py
+++ b/sympy/core/mod.py
@@ -1,6 +1,7 @@
from __future__ import print_function, division
-from sympy.core.numbers import nan
+from sympy.core.numbers import nan, Integer
+from sympy.core.compatibility import integer_types
from .function impor... | diff --git a/sympy/core/tests/test_arit.py b/sympy/core/tests/test_arit.py
--- a/sympy/core/tests/test_arit.py
+++ b/sympy/core/tests/test_arit.py
@@ -1662,6 +1662,12 @@ def test_Mod():
assert Mod(Mod(x + 2, 4)*(x + 4), 4) == Mod(x*(x + 2), 4)
assert Mod(Mod(x + 2, 4)*4, 4) == 0
+ # issue 15493
+ i, j... | Mod(3*i, 2) unchanged
`Mod(3*i, 2)` should reduce to `Mod(i, 2)` (as reported in [this post](https://stackoverflow.com/questions/53302669/sympify-does-not-simplify-remainder-as-expected)) and will do so with a change something like this:
```diff
diff --git a/sympy/core/mod.py b/sympy/core/mod.py
index eae2563..b1ff8... | @smichr I would like to start working the issue
I would like to work on this as well
The diff is not right since it will indicate that `Mod(var('e',even=True)/2,2)==0` but that should remain unevaluated. So check the math and assumptions, first. If there is any merit to this idea, go ahead and open a PR. Maybe this c... | 2018-12-06T17:45:49Z | 1.4 | ["test_Mod"] | ["test_bug1", "test_Symbol", "test_arit0", "test_div", "test_pow", "test_pow2", "test_pow3", "test_mod_pow", "test_pow_E", "test_pow_issue_3516", "test_pow_im", "test_real_mul", "test_ncmul", "test_ncpow", "test_powerbug", "test_Mul_doesnt_expand_exp", "test_Add_Mul_is_integer", "test_Add_Mul_is_finite", "test_Mul_is_e... | 73b3f90093754c5ed1561bd885242330e3583004 | 15 min - 1 hour | 450 |
astropy/astropy | astropy__astropy-14309 | cdb66059a2feb44ee49021874605ba90801f9986 | diff --git a/astropy/io/fits/connect.py b/astropy/io/fits/connect.py
--- a/astropy/io/fits/connect.py
+++ b/astropy/io/fits/connect.py
@@ -65,10 +65,9 @@ def is_fits(origin, filepath, fileobj, *args, **kwargs):
fileobj.seek(pos)
return sig == FITS_SIGNATURE
elif filepath is not None:
- if ... | diff --git a/astropy/io/fits/tests/test_connect.py b/astropy/io/fits/tests/test_connect.py
--- a/astropy/io/fits/tests/test_connect.py
+++ b/astropy/io/fits/tests/test_connect.py
@@ -7,7 +7,14 @@
from astropy import units as u
from astropy.io import fits
-from astropy.io.fits import BinTableHDU, HDUList, ImageHDU, ... | IndexError: tuple index out of range in identify_format (io.registry)
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check... | cc @nstarman from #14274 | 2023-01-23T22:34:01Z | 5.1 | ["astropy/io/fits/tests/test_connect.py::test_is_fits_gh_14305"] | ["astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_pathlib", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_meta", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_meta_conflicting", "astr... | 5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5 | <15 min fix | 9 |
django/django | django__django-15503 | 859a87d873ce7152af73ab851653b4e1c3ffea4c | diff --git a/django/db/models/fields/json.py b/django/db/models/fields/json.py
--- a/django/db/models/fields/json.py
+++ b/django/db/models/fields/json.py
@@ -172,6 +172,10 @@ def as_sql(self, compiler, connection):
class HasKeyLookup(PostgresOperatorLookup):
logical_operator = None
+ def compile_json_path_f... | diff --git a/tests/model_fields/test_jsonfield.py b/tests/model_fields/test_jsonfield.py
--- a/tests/model_fields/test_jsonfield.py
+++ b/tests/model_fields/test_jsonfield.py
@@ -576,6 +576,33 @@ def test_has_any_keys(self):
[self.objs[3], self.objs[4], self.objs[6]],
)
+ def test_has_key_num... | has_key, has_keys, and has_any_keys JSONField() lookups don't handle numeric keys on SQLite, MySQL, and Oracle.
Description
(last modified by TheTerrasque)
Problem
When using models.JSONField() has_key lookup with numerical keys on SQLite database it fails to find the keys.
Versions:
Django: 4.0.3
Python: 3.9... | Duplicate of #30566, see comment.
Not a duplicate of #30566 This is django's models.JSONField() not postgres extension JSONField It works as expected on Postgresql, the bug is on SQLite #30566 goes directly against comments for https://code.djangoproject.com/ticket/29504 If different behavior is expected on SQLite (or ... | 2022-03-12T06:22:37Z | 4.1 | ["test_has_key_number (model_fields.test_jsonfield.TestQuerying)", "test_has_keys (model_fields.test_jsonfield.TestQuerying)"] | ["test_formfield (model_fields.test_jsonfield.TestFormField)", "test_formfield_custom_encoder_decoder (model_fields.test_jsonfield.TestFormField)", "test_custom_encoder (model_fields.test_jsonfield.TestValidation)", "test_invalid_decoder (model_fields.test_jsonfield.TestValidation)", "test_invalid_encoder (model_fields... | 647480166bfe7532e8c471fef0146e3a17e6c0c9 | 1-4 hours | 194 |
sphinx-doc/sphinx | sphinx-doc__sphinx-8551 | 57ed10c68057c96491acbd3e62254ccfaf9e3861 | diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -272,6 +272,8 @@ def make_xref(self, rolename: str, domain: str, target: str,
result = super().make_xref(rolename, domain, target, # type: ignore
... | diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py
--- a/tests/test_domain_py.py
+++ b/tests/test_domain_py.py
@@ -774,6 +774,53 @@ def test_pydecoratormethod_signature(app):
assert domain.objects['deco'] == ('index', 'deco', 'method')
+def test_info_field_list(app):
+ text = (".. py:module:: ex... | :type: and :rtype: gives false ambiguous class lookup warnings
**Describe the bug**
The implicit xrefs created by the info fields ``:type:`` and ``:rtype:`` seems to do lookup differently than explicit xref roles. For unqualified names it seems like they search for the name in every (sub)module instead of in the curre... | Also facing an issue similar to this.
The other side of this issue is that you can also get a silently wrong cross-reference where a warning should have been issued instead: in some module, make a class, and then make one of these cross-references in non-module scope. | 2020-12-19T09:34:31Z | 3.4 | ["tests/test_domain_py.py::test_info_field_list"] | ["tests/test_domain_py.py::test_function_signatures", "tests/test_domain_py.py::test_domain_py_xrefs", "tests/test_domain_py.py::test_domain_py_objects", "tests/test_domain_py.py::test_resolve_xref_for_properties", "tests/test_domain_py.py::test_domain_py_find_obj", "tests/test_domain_py.py::test_get_full_qualified_nam... | 3f560cd67239f75840cc7a439ab54d8509c855f6 | 15 min - 1 hour | 406 |
django/django | django__django-12663 | fa5e7e46d875d4143510944f19d79df7b1739bab | diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -233,7 +233,8 @@ def __init__(self, model, where=WhereNode, alias_cols=True):
@property
def output_field(self):
if len(self.select) == 1:
- ... | diff --git a/tests/expressions/models.py b/tests/expressions/models.py
--- a/tests/expressions/models.py
+++ b/tests/expressions/models.py
@@ -6,10 +6,15 @@
from django.db import models
+class Manager(models.Model):
+ name = models.CharField(max_length=50)
+
+
class Employee(models.Model):
firstname = mod... | Using SimpleLazyObject with a nested subquery annotation fails.
Description
(last modified by Jordan Ephron)
Prior to 35431298226165986ad07e91f9d3aca721ff38ec it was possible to use a SimpleLazyObject in a queryset as demonstrated below. This new behavior appears to be a regression.
Models
from django.contrib.a... | I agree that this behavior was changed in 35431298226165986ad07e91f9d3aca721ff38ec, but you can easily create a test with SimpleLazyObject() (which is not a public API) and Subquery() that always fails with TypeError, e.g. def test_subquery_filter_by_lazy(self): test_user = SimpleLazyObject(lambda: get_user_model().obj... | 2020-04-04T18:58:49Z | 3.1 | ["test_subquery_filter_by_lazy (expressions.tests.BasicExpressionsTests)"] | ["test_and (expressions.tests.CombinableTests)", "test_negation (expressions.tests.CombinableTests)", "test_or (expressions.tests.CombinableTests)", "test_reversed_and (expressions.tests.CombinableTests)", "test_reversed_or (expressions.tests.CombinableTests)", "test_deconstruct (expressions.tests.FTests)", "test_deepc... | 0668164b4ac93a5be79f5b87fae83c657124d9ab | 15 min - 1 hour | 84 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 8