selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
700 | swe_bench_verified::test::421 | swe_bench_verified | test | 421 | sphinx-doc__sphinx-9658 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 232dbe41c5250eb7d559d40438c4743483e95f15 | Inherited classes not correctly documented when mocked
### Describe the bug
We're experiencing an issue when documenting classes that inherit mocked classes. However, classes which inherit other classes from our own package are ok.
This issue appears to be dependent on the `sphinx` version:
- `sphinx<3.0`: Everythin... | diff --git a/sphinx/ext/autodoc/mock.py b/sphinx/ext/autodoc/mock.py
--- a/sphinx/ext/autodoc/mock.py
+++ b/sphinx/ext/autodoc/mock.py
@@ -26,6 +26,7 @@ class _MockObject:
"""Used by autodoc_mock_imports."""
__display_name__ = '_MockObject'
+ __name__ = ''
__sphinx_mock__ = True
__sphinx_decora... | diff --git a/tests/test_util_typing.py b/tests/test_util_typing.py
--- a/tests/test_util_typing.py
+++ b/tests/test_util_typing.py
@@ -17,6 +17,7 @@
import pytest
+from sphinx.ext.autodoc import mock
from sphinx.util.typing import restify, stringify
@@ -170,6 +171,12 @@ def test_restify_broken_type_hints():
... | ["tests/test_util_typing.py::test_restify_mock"] | ["tests/test_util_typing.py::test_restify", "tests/test_util_typing.py::test_restify_type_hints_containers", "tests/test_util_typing.py::test_restify_type_hints_Callable", "tests/test_util_typing.py::test_restify_type_hints_Union", "tests/test_util_typing.py::test_restify_type_hints_typevars", "tests/test_util_typing.p... | null | true | 2021-09-20T17:04:23Z | 1 | 4 | 1 | 2,586 | 0 | 1 | 1 | 0.85 | 0.8 | 0.444333 | 87.308 | ||
701 | swe_gym::train::79 | swe_gym | train | 79 | getmoto__moto-5843 | getmoto/moto | getmoto/moto | python | e47a2fd120cb7d800aa19c41b88a6c3a907d8682 | [dynamodb] No validation on attributes
We ran into this issue in production. Moto fails to validate that an attribute must be of a proper type when using `put_object`:
```python
import boto3
from moto import mock_dynamodb
@mock_dynamodb
def test_whatever():
session = boto3.Session()
dynamodb = session.resourc... | Thanks for raising this and providing the test case @Lilja - marking it as an enhancement to add validation here.
Would you like to submit a PR for this yourself?
> Would you like to submit a PR for this yourself?
Not at this time, maybe in the future.
i would like to contribute to this issue
Sounds good @aarush... | diff --git a/moto/dynamodb/models/__init__.py b/moto/dynamodb/models/__init__.py
--- a/moto/dynamodb/models/__init__.py
+++ b/moto/dynamodb/models/__init__.py
@@ -1422,7 +1422,7 @@ def get_schema(self, table_name, index_name):
else:
return table.schema
- def get_table(self, table_name):
+ ... | diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
--- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
+++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
@@ -899,3 +899,43 @@ def test_put_item__string_as_integer... | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_gsi_key_cannot_be_empty"] | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_expression_with_trailing_comma", ... | null | true | 2023-01-14 13:32:52 | 2 | 22 | 1 | 2,937 | 0 | 0.85 | 1 | 0.7 | 1 | 0.562833 | 87.2885 | |
702 | swe_bench_verified::test::261 | swe_bench_verified | test | 261 | matplotlib__matplotlib-22865 | matplotlib/matplotlib | matplotlib/matplotlib | python | c6c7ec1978c22ae2c704555a873d0ec6e1e2eaa8 | [Bug]: Colorbar with drawedges=True and extend='both' does not draw edges at extremities
### Bug summary
When creating a matplotlib colorbar, it is possible to set drawedges to True which separates the colors of the colorbar with black lines. However, when the colorbar is extended using extend='both', the black lines ... | diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py
--- a/lib/matplotlib/colorbar.py
+++ b/lib/matplotlib/colorbar.py
@@ -651,8 +651,12 @@ def _add_solids(self, X, Y, C):
if not self.drawedges:
if len(self._y) >= self.n_rasterize:
self.solids.set_raste... | diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
--- a/lib/matplotlib/tests/test_colorbar.py
+++ b/lib/matplotlib/tests/test_colorbar.py
@@ -919,6 +919,30 @@ def test_proportional_colorbars():
fig.colorbar(CS3, spacing=spacings[j], ax=axs[i, j])
+@pytest.mark.p... | ["lib/matplotlib/tests/test_colorbar.py::test_colorbar_extend_drawedges[both-1-res0]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extend_drawedges[min-0-res1]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extend_drawedges[max-0-res2]"] | ["lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_shape[png]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_length[png]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_inverted_axis[min-expected0-horizontal]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_exte... | null | true | 2022-04-20T15:15:11Z | 1 | 8 | 3 | 1,492 | 0 | 1 | 1 | 0.7 | 1 | 0.275333 | 87.276 | ||
703 | swe_gym::train::273 | swe_gym | train | 273 | getmoto__moto-5873 | getmoto/moto | getmoto/moto | python | 667c40e58a1dbf4a2619660464a845d2b5195cf7 | client.transact_write_items allows blank value(empty string) for secondary index
Fails in Moto3 and Moto4. Meaning moto allows inserting an empty string for a GSI and does not throw an error.
1. Create a mock dynamodb client object.
2. Create a table with a global secondary index
`
def _create_test_table(mock_... | Hi @mcormier, thanks for raising this! Marking it as an enhancement to add validation for this. | diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py
--- a/moto/dynamodb/models/table.py
+++ b/moto/dynamodb/models/table.py
@@ -34,6 +34,7 @@ def __init__(
self.schema = schema
self.table_key_attrs = table_key_attrs
self.projection = projection
+ self.schema_key_... | diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
--- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
+++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
@@ -803,6 +803,45 @@ def test_transact_write_items_multip... | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_transact_write_items_with_empty_gsi_key"] | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_expression_with_trailing_comma", ... | null | true | 2023-01-24 00:14:27 | 2 | 53 | 1 | 2,291 | 0 | 0.85 | 1 | 0.7 | 1 | 0.5585 | 87.2755 | |
704 | swe_gym::train::1050 | swe_gym | train | 1,050 | pydantic__pydantic-6293 | pydantic/pydantic | pydantic/pydantic | python | 78f0ce65295bba764784da15eca83173f9ccf9b6 | [PYD-142] pydantic.dataclass does not work with typing.Annotated
Firstly, thanks to all contributors for a very useful library!
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](http... | I can confirm this is still an issue in v2. I think it should be fixable, but I couldn't figure it out quickly.
PR fixing it in v2 would be appreciated, or we'll get to it eventually.
This is still an issue in v2 as of v2.0b3. | diff --git a/pydantic/fields.py b/pydantic/fields.py
--- a/pydantic/fields.py
+++ b/pydantic/fields.py
@@ -164,7 +164,7 @@ def __init__(self, **kwargs: Unpack[_FieldInfoInputs]) -> None:
See the signature of `pydantic.fields.Field` for more details about the expected arguments.
"""
- self.ann... | diff --git a/tests/test_annotated.py b/tests/test_annotated.py
--- a/tests/test_annotated.py
+++ b/tests/test_annotated.py
@@ -92,8 +92,13 @@ class M(BaseModel):
'hint_fn,value,exc_handler',
[
(
- lambda: Annotated[int, Field(0)],
- Field(default=5, ge=0),
+ lambda: A... | ["tests/test_dataclasses.py::test_pydantic_field_annotation", "tests/test_annotated.py::test_annotated_model_exceptions[<lambda>-0-exc_handler0]", "tests/test_dataclasses.py::test_combined_field_annotations"] | ["tests/test_dataclasses.py::test_dataclass_equality_for_field_values[pydantic_pydantic]", "tests/test_dataclasses.py::test_default_value[None]", "tests/test_dataclasses.py::test_validate_assignment_extra_unknown_field_assigned_errors[config2]", "tests/test_dataclasses.py::test_allow_extra", "tests/test_dataclasses.py:... | null | true | 2023-06-28T21:23:04Z | 1 | 21 | 3 | 2,877 | 0 | 0.85 | 1 | 0.7 | 1 | 0.5495 | 87.2485 | |
705 | swe_bench_verified::test::357 | swe_bench_verified | test | 357 | scikit-learn__scikit-learn-13124 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 9f0b959a8c9195d1b6e203f08b698e052b426ca9 | sklearn.model_selection.StratifiedKFold either shuffling is wrong or documentation is misleading
#### Description
Regarding the shuffle parameter, the documentation states: "Whether to shuffle each stratification of the data before splitting into batches". However, instead of shuffling samples within each stratum, the... | thanks for the report.
It's a regression introduced in #7823, the problem is that we're shuffling each stratification in the same way (i.e, with the same random state). I think we should provide different splits when users provide different random state. | diff --git a/sklearn/model_selection/_split.py b/sklearn/model_selection/_split.py
--- a/sklearn/model_selection/_split.py
+++ b/sklearn/model_selection/_split.py
@@ -576,8 +576,7 @@ class StratifiedKFold(_BaseKFold):
``n_splits`` default value will change from 3 to 5 in v0.22.
shuffle : boolean, op... | diff --git a/sklearn/model_selection/tests/test_split.py b/sklearn/model_selection/tests/test_split.py
--- a/sklearn/model_selection/tests/test_split.py
+++ b/sklearn/model_selection/tests/test_split.py
@@ -493,6 +493,17 @@ def test_shuffle_stratifiedkfold():
assert_not_equal(set(test0), set(test1))
check... | ["sklearn/model_selection/tests/test_split.py::test_shuffle_stratifiedkfold"] | ["sklearn/model_selection/tests/test_split.py::test_cross_validator_with_default_params", "sklearn/model_selection/tests/test_split.py::test_2d_y", "sklearn/model_selection/tests/test_split.py::test_kfold_valueerrors", "sklearn/model_selection/tests/test_split.py::test_kfold_indices", "sklearn/model_selection/tests/tes... | null | true | 2019-02-09T02:15:23Z | 1 | 5 | 1 | 4,708 | 0 | 1 | 1 | 0.77 | 0.8 | 0.516667 | 87.245 | |
706 | swe_gym::train::2030 | swe_gym | train | 2,030 | Project-MONAI__MONAI-5129 | Project-MONAI/MONAI | project-monai/monai | python | 39081319d70f151ed61d65f5f9d87123f438a3dd | RandRotated transform error
**Describe the bug**
When applying the RandRotated transform to MetaTensor converted from numpy arrays, an error showed up:
`RuntimeError: result type Float can't be cast to the desired output type Int`
I am not sure if this is caused by my implementation error or bugs.
Before this error ap... | thanks for narrowing down this issue, I think it's the inconsistent output type causing the bug, from https://github.com/Project-MONAI/MONAI/blob/39081319d70f151ed61d65f5f9d87123f438a3dd/monai/transforms/spatial/array.py#L1480
setting `prob=0.0` and `prob=1.0` shows different dtype `print(batch['label'].dtype)`
I'... | diff --git a/monai/apps/auto3dseg/hpo_gen.py b/monai/apps/auto3dseg/hpo_gen.py
--- a/monai/apps/auto3dseg/hpo_gen.py
+++ b/monai/apps/auto3dseg/hpo_gen.py
@@ -38,7 +38,8 @@ def get_hyperparameters(self):
raise NotImplementedError
@abstractmethod
- def update_params(self, *args, **kwargs): # type: ig... | diff --git a/tests/test_rand_rician_noise.py b/tests/test_rand_rician_noise.py
--- a/tests/test_rand_rician_noise.py
+++ b/tests/test_rand_rician_noise.py
@@ -32,6 +32,8 @@ def test_correct_results(self, _, in_type, mean, std):
rician_fn.set_random_state(seed)
im = in_type(self.imt)
noised = ... | ["tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_14", "tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_05", "tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_16", "tests/test_rand_rotated.py::TestRandRotated3D::test_correct_shapes_10", "tests/test_rand_rotated.py... | ["tests/test_rand_rotated.py::TestRandRotated2D::test_correct_results_03", "tests/test_rand_rotate.py::TestRandRotate3D::test_correct_results_01", "tests/test_rand_rotate.py::TestRandRotate2D::test_correct_results_02", "tests/test_rand_std_shift_intensity.py::TestRandStdShiftIntensity::test_value_0", "tests/test_rand_r... | null | true | 2022-09-12T13:12:59Z | 6 | 85 | 24 | 6,130 | 0 | 0.85 | 1 | 0.8 | 0.85 | 0.783333 | 87.2375 | |
707 | swe_bench_pro::test::334 | swe_bench_pro | test | 334 | instance_gravitational__teleport-53814a2d600ccd74c1e9810a567563432b98386e-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | gravitational/teleport | gravitational/teleport | go | b8394b3bd388d81a5007d3671e3248d3542f6a22 | # Unable to connect to databases in trusted clusters due to missing Database CA
## Description
After upgrading Teleport to a recent version, users cannot connect to databases hosted in trusted (leaf) clusters. Connections fail with TLS errors indicating that the client does not present a certificate because the Datab... | ## Requirements
- During migration, a Database Certificate Authority (Database CA) must be created for every existing cluster, including the local cluster and all trusted clusters, if one does not already exist.
- If a database CA does not exist for a cluster, the migration must create it by copying only the TLS portio... | diff --git a/lib/auth/init.go b/lib/auth/init.go
index 05656aed5f950..0c88e7db14d06 100644
--- a/lib/auth/init.go
+++ b/lib/auth/init.go
@@ -1051,60 +1051,75 @@ func migrateCertAuthorities(ctx context.Context, asrv *Server) error {
//
// DELETE IN 11.0
func migrateDBAuthority(ctx context.Context, asrv *Server) error... | diff --git a/lib/auth/tls_test.go b/lib/auth/tls_test.go
index 3bbf5c5ae03d4..1e0cd845525a8 100644
--- a/lib/auth/tls_test.go
+++ b/lib/auth/tls_test.go
@@ -2602,7 +2602,7 @@ func (s *TLSSuite) TestTLSFailover(c *check.C) {
err = otherServer.Stop()
c.Assert(err, check.IsNil)
- // client detects closed sockets and... | ["TestRemoteDBCAMigration"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-53814a2d600ccd74c1e9810a567563432b98386e-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | true | null | 2 | 101 | 1 | 1,451 | 0 | 0.95 | 1 | 0.7 | 1 | 0.5785 | 87.2355 | |
708 | swe_bench_verified::test::5 | swe_bench_verified | test | 5 | astropy__astropy-13579 | astropy/astropy | astropy/astropy | python | 0df94ff7097961e92fd7812036a24b145bc13ca8 | Inconsistent behavior of `world_to_pixel` in `SlicedLowLevelWCS`
### Description
I have a 3D WCS with dimensions corresponding to space, space, and wavelength and what some might call a non-trivial PCij matrix that couples the spectral and spatial dimensions. I find that when I perform a world_to_pixel on the full (u... | A slightly shorter script to reproduce the issue is this (starting from the definition of `fits_wcs` in the OP):
```python
sl = SlicedLowLevelWCS(fits_wcs, 0)
world = fits_wcs.pixel_to_world_values(0,0,0)
out_pix = sl.world_to_pixel_values(world[0], world[1])
assert np.allclose(out_pix[0], 0)
```
The root ... | diff --git a/astropy/wcs/wcsapi/wrappers/sliced_wcs.py b/astropy/wcs/wcsapi/wrappers/sliced_wcs.py
--- a/astropy/wcs/wcsapi/wrappers/sliced_wcs.py
+++ b/astropy/wcs/wcsapi/wrappers/sliced_wcs.py
@@ -243,6 +243,8 @@ def pixel_to_world_values(self, *pixel_arrays):
return world_arrays
def world_to_pixel_va... | diff --git a/astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py b/astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py
--- a/astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py
+++ b/astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py
@@ -899,3 +899,39 @@ def test_pixel_to_world_values_different_int_types():
f... | ["astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py::test_coupled_world_slicing"] | ["astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py::test_invalid_slices", "astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py::test_sanitize_slice[item0-4-expected0]", "astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py::test_sanitize_slice[item1-5-expected1]", "astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs... | null | true | 2022-08-26T15:06:53Z | 1 | 4 | 1 | 3,095 | 0 | 1 | 1 | 0.77 | 0.8 | 0.513333 | 87.235 | |
709 | swe_gym::train::2051 | swe_gym | train | 2,051 | Project-MONAI__MONAI-3255 | Project-MONAI/MONAI | project-monai/monai | python | 4deb590dec2e7dc27e535a1f208aaec4b8661ef3 | Numpy Loader doesn't create the right metadata
**Describe the bug**
The Numpy loader creates the wrong spatial_shape metadata field.
**To Reproduce**
Use this code:
```
import numpy as np
from monai.transforms.io.dictionary import LoadImageD
from monai.transforms.utility.dictionary import ToTensorD
from monai.transfo... | diff --git a/monai/data/image_reader.py b/monai/data/image_reader.py
--- a/monai/data/image_reader.py
+++ b/monai/data/image_reader.py
@@ -485,16 +485,18 @@ class NumpyReader(ImageReader):
Args:
npz_keys: if loading npz file, only load the specified keys, if None, load all the items.
stack th... | diff --git a/tests/test_numpy_reader.py b/tests/test_numpy_reader.py
--- a/tests/test_numpy_reader.py
+++ b/tests/test_numpy_reader.py
@@ -10,12 +10,15 @@
# limitations under the License.
import os
+import sys
import tempfile
import unittest
import numpy as np
+import torch
-from monai.data import NumpyReade... | ["tests/test_numpy_reader.py::TestNumpyReader::test_channel_dim", "tests/test_numpy_reader.py::TestNumpyReader::test_dataloader"] | ["tests/test_numpy_reader.py::TestNumpyReader::test_npy_pickle", "tests/test_numpy_reader.py::TestNumpyReader::test_npz3", "tests/test_numpy_reader.py::TestNumpyReader::test_kwargs", "tests/test_numpy_reader.py::TestNumpyReader::test_npz1", "tests/test_numpy_reader.py::TestNumpyReader::test_npy", "tests/test_numpy_read... | null | true | 2021-11-03T23:59:10Z | 1 | 14 | 2 | 3,714 | 0 | 0.85 | 1 | 0.77 | 1 | 0.546667 | 87.235 | ||
710 | swe_gym::train::130 | swe_gym | train | 130 | getmoto__moto-7579 | getmoto/moto | getmoto/moto | python | dfda856838734dab577ea154699809f2bd767812 | AWS TgwRT : Attachment Propagations should be a list of dicts
https://github.com/getmoto/moto/blob/a7ce969b260ac87604d7b87a171d8ce5d3c7b60c/moto/ec2/models/transit_gateway_route_tables.py#L31
FROM:
```
self.route_table_association: Dict[str, str] = {}
self.route_table_propagation: Dict[str, str] = {}
`... | Hi @Cupidazul, thanks for raising this! I've verified this against AWS, and they indeed record/return multiple propagations.
Marking it as an enhancement - I'll probably have a PR with a fix ready for this either today or tomorrow. | diff --git a/moto/ec2/models/transit_gateway_attachments.py b/moto/ec2/models/transit_gateway_attachments.py
--- a/moto/ec2/models/transit_gateway_attachments.py
+++ b/moto/ec2/models/transit_gateway_attachments.py
@@ -222,6 +222,18 @@ def delete_transit_gateway_vpc_attachment(
transit_gateway_attachment_i... | diff --git a/tests/test_ec2/test_transit_gateway.py b/tests/test_ec2/test_transit_gateway.py
--- a/tests/test_ec2/test_transit_gateway.py
+++ b/tests/test_ec2/test_transit_gateway.py
@@ -1,3 +1,4 @@
+from time import sleep
from unittest import SkipTest
import boto3
@@ -781,50 +782,197 @@ def test_disassociate_trans... | ["tests/test_ec2/test_transit_gateway.py::test_disable_transit_gateway_route_table_propagation", "tests/test_ec2/test_transit_gateway.py::test_disable_transit_gateway_route_table_propagation_without_enabling_first", "tests/test_ec2/test_transit_gateway.py::test_enable_transit_gateway_route_table_propagation"] | ["tests/test_ec2/test_transit_gateway.py::test_search_transit_gateway_routes_by_state", "tests/test_ec2/test_transit_gateway.py::test_describe_transit_gateway_by_id", "tests/test_ec2/test_transit_gateway.py::test_describe_transit_gateway_by_tags", "tests/test_ec2/test_transit_gateway.py::test_create_transit_gateway_rou... | null | true | 2024-04-08 13:22:08 | 3 | 64 | 3 | 1,983 | 0 | 0.85 | 1 | 0.7 | 1 | 0.543833 | 87.2315 | |
711 | swe_bench_verified::test::183 | swe_bench_verified | test | 183 | django__django-15268 | django/django | django/django | python | 0ab58c120939093fea90822f376e1866fc714d1f | Optimize multiple AlterFooTogether operations into one
Description
Hi,
In #31503 we split the AlterFooTogether (AlterUniqueTogether and AlterIndexTogether) operations into two types of operations.
First, a migration will have operations to remove constraints, and then other operations adds the new constraints. This al... | diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -34,9 +34,12 @@ def references_model(self, name, app_label):
def reduce(self, operation, app_label):
return ... | diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py
--- a/tests/migrations/test_autodetector.py
+++ b/tests/migrations/test_autodetector.py
@@ -1573,21 +1573,13 @@ def test_foo_together_ordering(self):
self.assertOperationTypes(changes, 'otherapp', 0, [
'Alte... | ["index/unique_together also triggers on ordering changes.", "Removed fields will be removed after updating index/unique_together.", "Fields are renamed before updating index/unique_together."] | ["test_auto (migrations.test_autodetector.MigrationSuggestNameTests)", "test_many_operations_suffix (migrations.test_autodetector.MigrationSuggestNameTests)", "test_no_operations (migrations.test_autodetector.MigrationSuggestNameTests)", "test_no_operations_initial (migrations.test_autodetector.MigrationSuggestNameTest... | null | true | 2022-01-01T09:57:13Z | 1 | 13 | 3 | 1,303 | 0 | 1 | 1 | 0.7 | 1 | 0.2605 | 87.2315 | ||
712 | swe_bench_verified::test::266 | swe_bench_verified | test | 266 | matplotlib__matplotlib-23476 | matplotlib/matplotlib | matplotlib/matplotlib | python | 33a0599711d26dc2b79f851c6daed4947df7c167 | [Bug]: DPI of a figure is doubled after unpickling on M1 Mac
### Bug summary
When a figure is unpickled, it's dpi is doubled. This behaviour happens every time and if done in a loop it can cause an `OverflowError`.
### Code for reproduction
```python
import numpy as np
import matplotlib
import matplotlib.pyplot as p... | I suspect this will also affect anything that know how to deal with high-dpi screens.
For, .... reasons..., when we handle high-dpi cases by doubling the dpi on the figure (we have ideas how to fix this, but it is a fair amount of work) when we show it. We are saving the doubled dpi which when re-loaded in doubled ... | diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py
--- a/lib/matplotlib/figure.py
+++ b/lib/matplotlib/figure.py
@@ -3023,6 +3023,9 @@ def __getstate__(self):
# Set cached renderer to None -- it can't be pickled.
state["_cachedRenderer"] = None
+ # discard any changes to the dpi... | diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
--- a/lib/matplotlib/tests/test_figure.py
+++ b/lib/matplotlib/tests/test_figure.py
@@ -2,6 +2,7 @@
from datetime import datetime
import io
from pathlib import Path
+import pickle
import platform
from threading import Timer
fro... | ["lib/matplotlib/tests/test_figure.py::test_unpickle_with_device_pixel_ratio"] | ["lib/matplotlib/tests/test_figure.py::test_align_labels[png]", "lib/matplotlib/tests/test_figure.py::test_align_labels_stray_axes", "lib/matplotlib/tests/test_figure.py::test_figure_label", "lib/matplotlib/tests/test_figure.py::test_fignum_exists", "lib/matplotlib/tests/test_figure.py::test_clf_keyword", "lib/matplotl... | null | true | 2022-07-22T18:58:22Z | 1 | 3 | 1 | 3,094 | 0 | 1 | 1 | 0.77 | 0.8 | 0.51 | 87.225 | |
713 | swe_bench_pro::test::329 | swe_bench_pro | test | 329 | instance_gravitational__teleport-3ff19cf7c41f396ae468797d3aeb61515517edc9-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | gravitational/teleport | gravitational/teleport | go | e3a8fb7a0fa7e32504a714c370c3a8dbf71b1d6f | ## Title: Teleport does not support proxy protocol v2
## Description
Currently, teleport only supports the test based version 1 of the proxy protocol, which is used to identify a client´s original IP address for auditing, a critical incompatibility exist because modern load balancers, such as AWS Network Load Balanc... | ## Requirements
- A new protocol marker `ProtoProxyV2` needs to be introduced to represent the HAProxy Proxy Protocol version 2 (binary format).
- A new byte sequence constant `proxyV2Prefix` must be defined with the exact value: 0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A
- The `detectProt... | diff --git a/lib/multiplexer/multiplexer.go b/lib/multiplexer/multiplexer.go
index 2cff65c8f834f..b617936b30676 100644
--- a/lib/multiplexer/multiplexer.go
+++ b/lib/multiplexer/multiplexer.go
@@ -294,6 +294,17 @@ func detect(conn net.Conn, enableProxyProtocol bool) (*Conn, error) {
if err != nil {
return nil,... | diff --git a/lib/multiplexer/multiplexer_test.go b/lib/multiplexer/multiplexer_test.go
index f87af998a11dc..83cf212376b9e 100644
--- a/lib/multiplexer/multiplexer_test.go
+++ b/lib/multiplexer/multiplexer_test.go
@@ -189,6 +189,57 @@ func TestMux(t *testing.T) {
require.Equal(t, out, remoteAddr.String())
})
+ //... | ["TestMux/ProxyLineV2", "TestMux"] | ["TestMux/TLSSSH", "TestMux/ProxyLine", "TestMux/DisabledProxy", "TestMux/Timeout", "TestMux/UnknownProtocol", "TestMux/DisableSSH", "TestMux/DisableTLS", "TestMux/NextProto", "TestMux/PostgresProxy", "TestMux/WebListener"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-3ff19cf7c41f396ae468797d3aeb61515517edc9-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | true | null | 2 | 104 | 2 | 1,352 | 0 | 0.95 | 1 | 0.7 | 1 | 0.572 | 87.216 | |
714 | swe_bench_pro::test::603 | swe_bench_pro | test | 603 | instance_qutebrowser__qutebrowser-85b867fe8d4378c8e371f055c70452f546055854-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | c97257cac01d9f7d67fb42d0344cb4332c7a0833 | # Inconsistent Coordinate String Parsing
## Description
The qutebrowser codebase lacks a standardized method for parsing user-provided coordinate strings (such as "13,-42") into QPoint objects. Currently, coordinate parsing is handled inconsistently across different parts of the application, leading to manual string ... | ## Requirements
- A function for parsing coordinate strings should accept a string in "x,y" format and return a QPoint whose x and y coordinates are the two integer values from the string.
- Parsing should split the input on a comma into exactly two values and convert each value to an integer, so that a string such as... | diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc
index 6003c0f1f08..e84e36c3a8c 100644
--- a/doc/help/commands.asciidoc
+++ b/doc/help/commands.asciidoc
@@ -254,20 +254,27 @@ Clear all message notifications.
[[click-element]]
=== click-element
-Syntax: +:click-element [*--target* 'target'] [*--f... | diff --git a/tests/end2end/data/click_element.html b/tests/end2end/data/click_element.html
index acf0cf77c09..b2a691e084c 100644
--- a/tests/end2end/data/click_element.html
+++ b/tests/end2end/data/click_element.html
@@ -6,9 +6,11 @@
<span id='test' onclick='console.log("click_element clicked")'>Test Element</... | ["tests/unit/utils/test_utils.py::TestParsePoint::test_valid[1,1-expected0]", "tests/unit/utils/test_utils.py::TestParsePoint::test_valid[123,789-expected1]", "tests/unit/utils/test_utils.py::TestParsePoint::test_valid[-123,-789-expected2]", "tests/unit/utils/test_utils.py::TestParsePoint::test_hypothesis_text", "tests... | ["tests/unit/utils/test_utils.py::TestVersionNumber::test_repr[num2-VersionNumber(5)]", "tests/unit/utils/test_utils.py::TestVersionNumber::test_str[num0-5.15.2]", "tests/unit/utils/test_utils.py::TestVersionNumber::test_str[num1-5.15]", "tests/unit/utils/test_utils.py::TestVersionNumber::test_str[num2-5]", "tests/unit... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-85b867fe8d4378c8e371f055c70452f546055854-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 3 | 106 | 5 | 1,293 | 0 | 0.95 | 1 | 0.7 | 1 | 0.568833 | 87.2065 | |
715 | swe_gym::train::668 | swe_gym | train | 668 | conan-io__conan-10686 | conan-io/conan | conan-io/conan | python | 606ff7ca246a44cec3fdb5b1abe9863dbf0298d3 | [bug] Bazel generator does not put transitive dependencies in the 'deps' attribute
When using Conan with Bazel the generated `BUILD` files do not include any of the dependency's transitive dependencies in the included `deps` attribute, so when building a binary depending on the dependency, the transitive dependencies a... | diff --git a/conan/tools/google/bazeldeps.py b/conan/tools/google/bazeldeps.py
--- a/conan/tools/google/bazeldeps.py
+++ b/conan/tools/google/bazeldeps.py
@@ -83,6 +83,9 @@ def _get_dependency_buildfile_content(self, dependency):
{% for lib in libs %}
":{{ lib }}_precompiled",
... | diff --git a/conans/test/unittests/tools/google/test_bazeldeps.py b/conans/test/unittests/tools/google/test_bazeldeps.py
--- a/conans/test/unittests/tools/google/test_bazeldeps.py
+++ b/conans/test/unittests/tools/google/test_bazeldeps.py
@@ -39,6 +39,56 @@ def test_bazeldeps_dependency_buildfiles():
asser... | ["conans/test/unittests/tools/google/test_bazeldeps.py::test_bazeldeps_dependency_transitive"] | ["conans/test/unittests/tools/google/test_bazeldeps.py::test_bazeldeps_dependency_buildfiles", "conans/test/unittests/tools/google/test_bazeldeps.py::test_bazeldeps_main_buildfile", "conans/test/unittests/tools/google/test_bazeldeps.py::test_bazeldeps_build_dependency_buildfiles", "conans/test/unittests/tools/google/te... | null | true | 2022-03-01T15:48:37Z | 1 | 10 | 1 | 5,057 | 0 | 0.85 | 1 | 0.77 | 1 | 0.533333 | 87.195 | ||
716 | swe_gym::train::693 | swe_gym | train | 693 | iterative__dvc-9533 | iterative/dvc | iterative/dvc | python | 5c1487e2ec537a786127ada50c9638ac7eb042be | --allow-missing: skips stages even if deps have changed
# Bug Report
## Description
`--allow-missing` is skipping stages unexpectedly (in cases where pulling the data and then running the pipeline will not skip the stages).
### Reproduce
In https://github.com/dberenbaum/example-get-started-experiments/tree/split-0.... | @daavoo I think it's a borderline p0 since it blocks the intended `--allow-missing` workflow.
> @daavoo I think it's a borderline p0 since it blocks the intended `--allow-missing` workflow.
Will take a look today.
Perhaps I am misunderstanding but this is about `--dry`, right? I thought without `--dry` and combi... | diff --git a/dvc/repo/reproduce.py b/dvc/repo/reproduce.py
--- a/dvc/repo/reproduce.py
+++ b/dvc/repo/reproduce.py
@@ -163,7 +163,7 @@ def _reproduce_stages( # noqa: C901
steps = _get_steps(graph, stages, downstream, single_item)
force_downstream = kwargs.pop("force_downstream", False)
- result = []
+ ... | diff --git a/tests/func/repro/__init__.py b/tests/func/repro/__init__.py
new file mode 100644
diff --git a/tests/func/test_repro.py b/tests/func/repro/test_repro.py
similarity index 100%
rename from tests/func/test_repro.py
rename to tests/func/repro/test_repro.py
diff --git a/tests/func/repro/test_repro_allow_missing.... | ["tests/func/repro/test_repro_allow_missing.py::test_repro_allow_missing_upstream_stage_modified"] | ["tests/func/repro/test_repro.py::test_repro_list_of_commands_in_order[True]", "tests/func/repro/test_repro.py::test_repro_pipelines_cli", "tests/func/repro/test_repro.py::test_repro_shell", "tests/func/repro/test_repro_pull.py::test_repro_skip_pull_if_no_run_cache_is_passed", "tests/func/repro/test_repro.py::test_non_... | null | true | 2023-06-02T15:03:16Z | 2 | 32 | 1 | 2,537 | 0 | 0.85 | 1 | 0.7 | 1 | 0.5295 | 87.1885 | |
717 | swe_bench_verified::test::330 | swe_bench_verified | test | 330 | pytest-dev__pytest-10051 | pytest-dev/pytest | pytest-dev/pytest | python | aa55975c7d3f6c9f6d7f68accc41bb7cadf0eb9a | caplog.get_records and caplog.clear conflict
# Description
`caplog.get_records()` gets decoupled from actual caplog records when `caplog.clear()` is called. As a result, after `caplog.clear()` is called, `caplog.get_records()` is frozen: it does not get cleared, nor does it get new records.
During test set up it is [... | diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py
--- a/src/_pytest/logging.py
+++ b/src/_pytest/logging.py
@@ -40,7 +40,6 @@
else:
logging_StreamHandler = logging.StreamHandler
-
DEFAULT_LOG_FORMAT = "%(levelname)-8s %(name)s:%(filename)s:%(lineno)d %(message)s"
DEFAULT_LOG_DATE_FORMAT = "%H:%M:%S... | diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py
--- a/testing/logging/test_fixture.py
+++ b/testing/logging/test_fixture.py
@@ -172,6 +172,24 @@ def test_caplog_captures_for_all_stages(caplog, logging_during_setup_and_teardow
assert set(caplog._item.stash[caplog_records_key]) == {"se... | ["testing/logging/test_fixture.py::test_clear_for_call_stage"] | ["testing/logging/test_fixture.py::test_change_level", "testing/logging/test_fixture.py::test_with_statement", "testing/logging/test_fixture.py::test_log_access", "testing/logging/test_fixture.py::test_messages", "testing/logging/test_fixture.py::test_record_tuples", "testing/logging/test_fixture.py::test_unicode", "te... | null | true | 2022-06-15T17:39:53Z | 1 | 7 | 1 | 1,333 | 0 | 1 | 1 | 0.7 | 1 | 0.2455 | 87.1865 | ||
718 | swe_gym::train::980 | swe_gym | train | 980 | dask__dask-9285 | dask/dask | dask/dask | python | ac74939697c328bd6456aa9fad7d9520328db6e5 | IndexError when slicing dask Array with unknown chunk sizes.
When doing fancy indexing on an index with missing chunks we raise an IndexError.
```pytb
In [21]: a = da.ones((10, 5), chunks=5)
In [22]: a._chunks = ((np.nan, np.nan), (5,))
In [23]: a[[0, 5]].compute()
---------------------------------------------------... | To me this feels like a case where maybe we should raise
On Tue, Sep 1, 2020 at 10:50 AM Tom Augspurger <notifications@github.com>
wrote:
> When doing fancy indexing on an index with missing chunks we raise an
> IndexError.
>
> In [21]: a = da.ones((10, 5), chunks=5)
>
> In [22]: a._chunks = ((np.nan, np.nan), (5,))
... | diff --git a/dask/array/chunk.py b/dask/array/chunk.py
--- a/dask/array/chunk.py
+++ b/dask/array/chunk.py
@@ -414,10 +414,18 @@ def getitem(obj, index):
Selection obj[index]
"""
- result = obj[index]
+ try:
+ result = obj[index]
+ except IndexError as e:
+ raise ValueError(
+ ... | diff --git a/dask/array/tests/test_slicing.py b/dask/array/tests/test_slicing.py
--- a/dask/array/tests/test_slicing.py
+++ b/dask/array/tests/test_slicing.py
@@ -421,6 +421,13 @@ def test_slicing_and_chunks():
assert t.chunks == ((8, 8), (6, 6))
+def test_slicing_and_unknown_chunks():
+ a = da.ones((10, 5)... | ["dask/array/tests/test_slicing.py::test_slicing_and_unknown_chunks"] | ["dask/array/tests/test_slicing.py::test_slicing_with_Nones[index1-shape0]", "dask/array/tests/test_slicing.py::test_negative_n_slicing", "dask/array/tests/test_slicing.py::test_gh4043[True-True-True]", "dask/array/tests/test_slicing.py::test_take_sorted", "dask/array/tests/test_slicing.py::test_index_with_int_dask_arr... | null | true | 2022-07-16T20:46:04Z | 1 | 10 | 1 | 2,968 | 0 | 0.85 | 1 | 0.7 | 1 | 0.528 | 87.184 | |
719 | swe_gym::train::2088 | swe_gym | train | 2,088 | Project-MONAI__MONAI-3198 | Project-MONAI/MONAI | project-monai/monai | python | f43a9273313a8c86f0c61ec6eab0861e7a9821a2 | CSVIterableDataset doesn't work in the same way as CSVDataset
**Is your feature request related to a problem? Please describe.**
Here is the feedback from @holgerroth :
When I am using `CSVIterableDataset`, I get this error
```
Traceback (most recent call last):
File "run_classification_criteo_monai_mlp.py", line 22... | Thanks for @holgerroth 's feedback, let me try to enhance the doc-string of `CSVIterableDataset` to make the usage much more clear. And may also enhance the `CSVIterableDataset` with more features.
Thanks.
| diff --git a/monai/data/__init__.py b/monai/data/__init__.py
--- a/monai/data/__init__.py
+++ b/monai/data/__init__.py
@@ -28,7 +28,7 @@
from .grid_dataset import GridPatchDataset, PatchDataset, PatchIter
from .image_dataset import ImageDataset
from .image_reader import ImageReader, ITKReader, NibabelReader, NumpyRe... | diff --git a/tests/test_csv_iterable_dataset.py b/tests/test_csv_iterable_dataset.py
--- a/tests/test_csv_iterable_dataset.py
+++ b/tests/test_csv_iterable_dataset.py
@@ -146,16 +146,19 @@ def prepare_csv_file(data, filepath):
# test transform
dataset = CSVIterableDataset(
+ c... | ["tests/test_csv_iterable_dataset.py::TestCSVIterableDataset::test_values"] | [] | null | true | 2021-10-27T00:23:24Z | 2 | 104 | 1 | 1,073 | 0 | 0.85 | 1 | 0.7 | 1 | 0.5255 | 87.1765 | |
720 | swe_gym::train::435 | swe_gym | train | 435 | python__mypy-14486 | python/mypy | python/mypy | python | 8f4da0e6f07a15a1d4acae98a588796c8ad81fb6 | Incorrect asynchronous comprehension cause an internal error
**Crash Report**
When a asynchronous comprehension is outside of an asynchronous function, mypy crashes with an internal error. See the following example 'test.py'
test.py:
`[await asyncio.sleep(1, x) for x in range(5)]`
**Traceback**
```
xxm@xxm:~$ mypy -... | diff --git a/mypy/semanal.py b/mypy/semanal.py
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -5163,10 +5163,11 @@ def visit_yield_expr(self, e: YieldExpr) -> None:
e.expr.accept(self)
def visit_await_expr(self, expr: AwaitExpr) -> None:
- if not self.is_func_scope():
- self.fail('... | diff --git a/test-data/unit/check-async-await.test b/test-data/unit/check-async-await.test
--- a/test-data/unit/check-async-await.test
+++ b/test-data/unit/check-async-await.test
@@ -943,3 +943,15 @@ async def bar(x: Union[A, B]) -> None:
[builtins fixtures/async_await.pyi]
[typing fixtures/typing-async.pyi]
+
+[ca... | ["mypy/test/testcheck.py::TypeCheckSuite::check-async-await.test::testInvalidComprehensionNoCrash"] | [] | null | true | 2023-01-21T10:53:08Z | 1 | 7 | 1 | 4,620 | 0 | 0.85 | 1 | 0.77 | 1 | 0.523333 | 87.165 | ||
721 | swe_gym::train::692 | swe_gym | train | 692 | iterative__dvc-4670 | iterative/dvc | iterative/dvc | python | 15b1e7072bf4c133a640507f59011d32501a968f | `dvc pull --run-cache` does not work if remote path is a relative path
## Bug Report
`dvc push --run-cache` or plain `dvc push/pull` works though.
### Please provide information about your setup
**Additional Information (if any):**
```console
❯ dvc pull --run-cache -v
2020-09-29 16:50:06,143 DEBUG: Check for update i... | I tried to replicate this here https://gist.github.com/musa-atlihan/e01e652a291bd3d36f4ccee5fe04836b
no error though - any ideas?
So this is how to replicate it:
https://gist.github.com/musa-atlihan/b7307d8a33f01a7f2cc8343273dfd976
happens when the cache folder is the local remote
and when there is the "runs"... | diff --git a/dvc/path_info.py b/dvc/path_info.py
--- a/dvc/path_info.py
+++ b/dvc/path_info.py
@@ -75,6 +75,17 @@ def isin(self, other):
n = len(other._cparts)
return len(self._cparts) > n and self._cparts[:n] == other._cparts
+ def relative_to(self, other): # pylint: disable=arguments-differ
+ ... | diff --git a/tests/unit/test_path_info.py b/tests/unit/test_path_info.py
--- a/tests/unit/test_path_info.py
+++ b/tests/unit/test_path_info.py
@@ -1,4 +1,5 @@
import copy
+import os
import pathlib
import pytest
@@ -102,3 +103,17 @@ def test_url_replace_path():
assert u.params == new_u.params
assert u.que... | ["tests/unit/test_path_info.py::test_relative_to_different_subpath[/foo/bar-../baz]", "tests/unit/test_path_info.py::test_relative_to_different_subpath[/baz-/foo/bar]", "tests/unit/test_path_info.py::test_relative_to_different_subpath[../baz-/foo/bar]", "tests/unit/test_path_info.py::test_relative_to_different_subpath[... | ["tests/unit/test_path_info.py::test_path_info_as_posix[/some/abs/path-/some/abs/path-posix]", "tests/unit/test_path_info.py::test_https_url_info_str", "tests/unit/test_path_info.py::test_url_info_parent[URLInfo]", "tests/unit/test_path_info.py::test_url_info_eq[CloudURLInfo]", "tests/unit/test_path_info.py::test_url_i... | null | true | 2020-10-06T18:00:22Z | 1 | 11 | 4 | 2,895 | 0 | 0.85 | 1 | 0.7 | 1 | 0.519167 | 87.1575 | |
722 | swe_gym::train::882 | swe_gym | train | 882 | iterative__dvc-8177 | iterative/dvc | iterative/dvc | python | e815bbe211ac931e816435a0a90127141223d2a2 | `plots diff` & `exp show`: unexpected error - Empty git repo
# Bug Report
## Description
After initialising a repository with both `Git` and `DVC` both `plots diff` and `exp show` throw `ERROR: unexpected error - Empty git repo`.
### Reproduce
1. `mkdir new`
2. `cd new`
3. `git init`
4. `dvc init`
5. `dvc exp show`... | Thanks @mattseddon! Could you describe how it impacts VS Code and how important it is?
I see that it's inconsistent with other commands, but both behaviors seem initially reasonable to me, and since I have never seen a user complaint about it, I would only prioritize it based on your needs.
This broke the workflow o... | diff --git a/dvc/commands/experiments/diff.py b/dvc/commands/experiments/diff.py
--- a/dvc/commands/experiments/diff.py
+++ b/dvc/commands/experiments/diff.py
@@ -27,7 +27,7 @@ def run(self):
if self.args.json:
ui.write_json(diff)
- else:
+ elif diff:
from dvc.compare ... | diff --git a/tests/func/experiments/test_diff.py b/tests/func/experiments/test_diff.py
--- a/tests/func/experiments/test_diff.py
+++ b/tests/func/experiments/test_diff.py
@@ -1,6 +1,17 @@
from funcy import first
+def test_diff_no_commits(tmp_dir):
+ from scmrepo.git import Git
+
+ from dvc.repo import Repo
+... | ["tests/func/experiments/test_show.py::test_show_no_commits", "tests/func/plots/test_diff.py::test_no_commits"] | ["tests/func/experiments/test_diff.py::test_diff_no_commits"] | null | true | 2022-08-25T08:17:52Z | 5 | 13 | 2 | 1,425 | 0 | 0.85 | 1 | 0.85 | 0.85 | 0.280833 | 87.155 | |
723 | swe_gym::train::2367 | swe_gym | train | 2,367 | modin-project__modin-7225 | modin-project/modin | modin-project/modin | python | 9fa326f6fd53eb0e3192b3eca72382a6388117fe | BUG: Importing `modin.pandas.api.extensions` overwrites re-export of `pandas.api` submodules
### Modin version checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest released version of Modin.
- [X] I have confirmed this bug exists on the main ... | diff --git a/modin/pandas/api/__init__.py b/modin/pandas/api/__init__.py
--- a/modin/pandas/api/__init__.py
+++ b/modin/pandas/api/__init__.py
@@ -11,6 +11,10 @@
# ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
+
+# Re-export... | diff --git a/modin/tests/pandas/extensions/test_api_reexport.py b/modin/tests/pandas/extensions/test_api_reexport.py
new file mode 100644
--- /dev/null
+++ b/modin/tests/pandas/extensions/test_api_reexport.py
@@ -0,0 +1,33 @@
+# Licensed to Modin Development Team under one or more contributor license agreements.
+# See... | ["modin/tests/pandas/extensions/test_api_reexport.py::test_extensions_does_not_overwrite_pandas_api"] | [] | null | true | 2024-04-26T19:53:31Z | 1 | 6 | 1 | 4,003 | 0 | 0.85 | 1 | 0.77 | 1 | 0.52 | 87.155 | ||
724 | swe_bench_pro::test::385 | swe_bench_pro | test | 385 | instance_internetarchive__openlibrary-1351c59fd43689753de1fca32c78d539a116ffc1-v29f82c9cf21d57b242f8d8b0e541525d259e2d63 | internetarchive/openlibrary | internetarchive/openlibrary | python | ddbbdd64ecde64f314b9083953af63d07305f640 | # Inconsistency in author identifier generation when comparing editions.
## Description
When the system compares different editions to determine whether they describe the same work, it relies on an author identifier derived from the author's name (combined with any available date information). The logic that generates... | ## Requirements
- A single shared function must be available that, given a record dictionary, adds to each of its authors an identifier derived from the author's name together with any available date information for that author, modifying the record in place. When an author has no date information, the identifier is si... | diff --git a/openlibrary/catalog/add_book/__init__.py b/openlibrary/catalog/add_book/__init__.py
index 4d9c7cc7b13..8528a86a077 100644
--- a/openlibrary/catalog/add_book/__init__.py
+++ b/openlibrary/catalog/add_book/__init__.py
@@ -574,8 +574,6 @@ def find_enriched_match(rec, edition_pool):
:return: None or the e... | diff --git a/openlibrary/catalog/add_book/tests/test_add_book.py b/openlibrary/catalog/add_book/tests/test_add_book.py
index 84226125742..7db615cf057 100644
--- a/openlibrary/catalog/add_book/tests/test_add_book.py
+++ b/openlibrary/catalog/add_book/tests/test_add_book.py
@@ -1,10 +1,8 @@
import os
import pytest
-f... | ["openlibrary/catalog/merge/tests/test_merge_marc.py::TestRecordMatching::test_match_low_threshold"] | ["openlibrary/catalog/merge/tests/test_merge_marc.py::TestAuthors::test_author_contrib", "openlibrary/catalog/merge/tests/test_merge_marc.py::TestTitles::test_build_titles", "openlibrary/catalog/merge/tests/test_merge_marc.py::TestTitles::test_build_titles_ampersand", "openlibrary/catalog/merge/tests/test_merge_marc.py... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-1351c59fd43689753de1fca32c78d539a116ffc1-v29f82c9cf21d57b242f8d8b0e541525d259e2d63 | true | null | 3 | 73 | 1 | 1,844 | 0 | 0.95 | 1 | 0.7 | 1 | 0.550667 | 87.152 | |
725 | swe_gym::train::617 | swe_gym | train | 617 | conan-io__conan-13757 | conan-io/conan | conan-io/conan | python | a8074a2be4f7e48b328ced4417846a1b318a925e | [question] Conan 2.0 custom deployer + output folder
### What is your question?
Hi, I am trying to deploy the binaries of a package with Conan 2.0. I created a simple custom deployer (my_deployer.py) that basically copies the binaries directly to the output folder:
```
from conan.tools.files import copy
def deploy(g... | Hi @malonsorightware, thanks for your question.
The deployers do not get an independent output folder from the install one. The trick here would be to change your custom deployer to something relative to the `output_folder`. This is also how the built-in ones do it:
```
import os
from conan.tools.files import cop... | diff --git a/conan/api/subapi/install.py b/conan/api/subapi/install.py
--- a/conan/api/subapi/install.py
+++ b/conan/api/subapi/install.py
@@ -3,7 +3,6 @@
from conans.client.generators import write_generators
from conans.client.installer import BinaryInstaller
from conans.errors import ConanInvalidConfiguration
-fro... | diff --git a/conans/test/functional/command/test_install_deploy.py b/conans/test/functional/command/test_install_deploy.py
--- a/conans/test/functional/command/test_install_deploy.py
+++ b/conans/test/functional/command/test_install_deploy.py
@@ -74,7 +74,7 @@ def deploy(graph, output_folder, **kwargs):
"m... | ["conans/test/functional/command/test_install_deploy.py::test_deploy_output_locations"] | ["conans/test/integration/command/info/info_test.py::TestEditables::test_info_paths", "conans/test/integration/command/info/info_test.py::TestDeployers::test_custom_deploy", "conans/test/functional/command/test_install_deploy.py::test_deploy_reference", "conans/test/integration/command/info/info_test.py::TestErrorsInGr... | null | true | 2023-04-24T09:48:55Z | 4 | 19 | 1 | 1,283 | 0 | 0.85 | 1 | 0.85 | 0.85 | 0.277167 | 87.144 | |
726 | swe_gym::train::1949 | swe_gym | train | 1,949 | bokeh__bokeh-13443 | bokeh/bokeh | bokeh/bokeh | python | b0a59ca015568d8b6229cdb7ddb1508e4c7f504b | Unable to clone models with readonly properties
```py
In [1]: from bokeh.models import *
In [2]: source = ColumnDataSource()
In [3]: source.clone()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[3], line 1... | Can I be assigned this problem? I want to try to fix it!
@UFCarlosMartinez We don't assign issues to people. If there not an existing PR to fix it then feel free to work on it.
~~I think I have a fix for this, but don't seem to have permission to push?~~
yes I need a fork! sorry. I will get on it.
@daydin only memb... | diff --git a/src/bokeh/core/has_props.py b/src/bokeh/core/has_props.py
--- a/src/bokeh/core/has_props.py
+++ b/src/bokeh/core/has_props.py
@@ -50,6 +50,9 @@ def lru_cache(arg: int | None) -> Callable[[F], F]: ...
else:
from functools import lru_cache
+if TYPE_CHECKING:
+ from typing_extensions import Self
+
... | diff --git a/tests/unit/bokeh/core/test_properties.py b/tests/unit/bokeh/core/test_properties.py
--- a/tests/unit/bokeh/core/test_properties.py
+++ b/tests/unit/bokeh/core/test_properties.py
@@ -392,14 +392,17 @@ class ReadonlyModel(HasProps):
o.y
assert o.z == 'xyz'
+ obj0 = ReadonlyMode... | ["tests/unit/bokeh/core/test_properties.py::TestBasic::test_readonly", "tests/unit/bokeh/core/test_properties.py::test_HasProps_clone"] | ["tests/unit/bokeh/core/test_properties.py::Test___all__::test_contents[validate]", "tests/unit/bokeh/core/test_properties.py::Test___all__::test_contents[MarkerSpec]", "tests/unit/bokeh/core/test_properties.py::Test___all__::test_contents[Angle]", "tests/unit/bokeh/core/test_properties.py::Test___all__::test_contents[... | null | true | 2023-10-14T16:59:20Z | 2 | 7 | 2 | 2,914 | 0 | 0.85 | 1 | 0.7 | 1 | 0.509 | 87.127 | |
727 | swe_gym::train::455 | swe_gym | train | 455 | python__mypy-15629 | python/mypy | python/mypy | python | ebfea94c9f1dc081f8f3f0de9e78a5c83ff8af40 | Crash when iterating a Tuple list of @dataclass Protocol
**Crash Report**
MyPy crashes when trying to validate a code bit enumerating a `List[Tuple[MyType, MyType]]` where `MyType` is a `@dataclass` decorated `Protocol` (see example code below).
**Traceback**
(Paths redacted)
```
kevin.lovato@laptop folder % mypy -... | This is a valid crash report (since mypy should never crash on syntactically valid Python code). But the quick fix is "don't do that" — it doesn't really make much sense to add `@dataclass` to a protocol :)
> This is a valid crash report (since mypy should never crash on syntactically valid Python code). But the quick ... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -1194,9 +1194,10 @@ def check_func_def(
elif isinstance(arg_type, TypeVarType):
# Refuse covariant parameter type variables
# TODO: check recursively for i... | diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test
--- a/test-data/unit/check-dataclasses.test
+++ b/test-data/unit/check-dataclasses.test
@@ -744,6 +744,17 @@ s: str = a.bar() # E: Incompatible types in assignment (expression has type "in
[builtins fixtures/dataclasses.pyi]
... | ["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testProtocolNoCrashOnJoining"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testDataclassUntypedGenericInheritance", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testDataclassGenericCovariant"] | null | true | 2023-07-09T12:01:10Z | 2 | 144 | 1 | 7,200 | 0 | 0.85 | 1 | 0.65 | 1 | 0.98 | 87.115 | |
728 | swe_gym::train::1027 | swe_gym | train | 1,027 | dask__dask-9342 | dask/dask | dask/dask | python | 5bbf072177fabdfc3421a5902aa23ee2bbf57ef4 | Sparse .var() getting wrong fill values
This has come up in CI (example: https://github.com/dask/dask/pull/6896/checks?check_run_id=1831740059) when testing with newer versions numpy 1.20.
Some of the sparse tests are marked with `xfail` and a sparse issue.
https://github.com/dask/dask/blob/0bb8766d659ba77805ba75cb43... | Thanks for tracking this @jsignell. Digging into `var` briefly it looks like the origin of non-zero `fill_value`s stems from
https://github.com/dask/dask/blob/5166be6f15d9d04c6d9948db1b67a7f1b09b1a3e/dask/array/reductions.py#L696
where `A` is a sparse array with `fill_value=0` and `u` is a NumPy array.
```py... | diff --git a/dask/array/backends.py b/dask/array/backends.py
--- a/dask/array/backends.py
+++ b/dask/array/backends.py
@@ -1,10 +1,15 @@
+import math
+
import numpy as np
+from dask.array import chunk
from dask.array.dispatch import (
concatenate_lookup,
divide_lookup,
einsum_lookup,
empty_looku... | diff --git a/dask/array/tests/test_reductions.py b/dask/array/tests/test_reductions.py
--- a/dask/array/tests/test_reductions.py
+++ b/dask/array/tests/test_reductions.py
@@ -17,31 +17,44 @@
@pytest.mark.parametrize("dtype", ["f4", "i4"])
@pytest.mark.parametrize("keepdims", [True, False])
-def test_numel(dtype, ke... | ["dask/array/tests/test_sparse.py::test_numel[False-axis1-numel]", "dask/array/tests/test_sparse.py::test_basic[<lambda>13]", "dask/array/tests/test_sparse.py::test_basic[<lambda>17]", "dask/array/tests/test_sparse.py::test_numel[True-None-numel]", "dask/array/tests/test_sparse.py::test_numel[True-0-nannumel]", "dask/a... | ["dask/array/tests/test_reductions.py::test_chunk_structure_independence[axes11-4-chunks0]", "dask/array/tests/test_reductions.py::test_array_cumreduction_axis[blelloch-None-True-nancumsum]", "dask/array/tests/test_reductions.py::test_array_reduction_out[argmax]", "dask/array/tests/test_reductions.py::test_chunk_struct... | null | true | 2022-08-02T20:07:44Z | 3 | 144 | 18 | 6,100 | 0 | 0.85 | 1 | 0.65 | 1 | 0.98 | 87.115 | |
729 | swe_gym::train::1061 | swe_gym | train | 1,061 | pydantic__pydantic-9023 | pydantic/pydantic | pydantic/pydantic | python | 534a446032adaa7576f7ac7aa9c2c41d55695d7f | Support for Python 3.11 typing.Self type
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing
### Description
A new type Self was introduced in PEP 673, but... | Good idea, I'd been keen to support `Self` as a type annotation in V2.
We should support both `typing.Self` and `typing_extensions.Self` - shouldn't be too hard as we already support building a core schema for forward refs to the current model.
I just encountered this myself. Using `Self` would be especially conveni... | diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py
--- a/pydantic/_internal/_generate_schema.py
+++ b/pydantic/_internal/_generate_schema.py
@@ -77,10 +77,8 @@
from ._fields import collect_dataclass_fields, get_type_hints_infer_globalns
from ._forward_ref import PydanticRecur... | diff --git a/tests/test_types_self.py b/tests/test_types_self.py
new file mode 100644
--- /dev/null
+++ b/tests/test_types_self.py
@@ -0,0 +1,171 @@
+import dataclasses
+import typing
+from typing import List, Optional, Union
+
+import pytest
+import typing_extensions
+from typing_extensions import NamedTuple, TypedDic... | ["tests/test_types_self.py::test_self_type_in_named_tuple[t_e.Self]", "tests/test_types_self.py::test_self_type_in_dataclass[t_e.Self]", "tests/test_types_self.py::test_recursive_model[t_e.Self]", "tests/test_types_self.py::test_recursive_model_with_subclass[t_e.Self]", "tests/test_types_self.py::test_recursive_model_w... | ["tests/test_types_self.py::test_self_type_with_field[t_e.Self]"] | null | true | 2024-03-15T17:08:25Z | 2 | 56 | 9 | 1,903 | 0 | 0.85 | 1 | 0.7 | 1 | 0.503833 | 87.1115 | |
730 | swe_bench_verified::test::41 | swe_bench_verified | test | 41 | django__django-11239 | django/django | django/django | python | d87bd29c4f8dfcdf3f4a4eb8340e6770a2416fe3 | Add support for postgresql client certificates and key to dbshell.
Description
This bug is very similar to the #28322
A common security procedure for DB access is to require mutual TLS for the DB connection.
This involves specifying a server certificate, client certificate, and client key when connecting.
Django alrea... | 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
@@ -17,6 +17,10 @@ def runshell_db(cls, conn_params):
dbname = conn_params.get('database', '')
user = conn_params.g... | 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
@@ -14,15 +14,16 @@ def _run_it(self, dbinfo):
That function invokes the runshell command, while mocking
subprocess.run(). It returns a 2-tuple... | ["test_ssl_certificate (dbshell.test_postgresql.PostgreSqlDbshellCommandTestCase)"] | ["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... | null | true | 2019-04-16T09:44:54Z | 1 | 12 | 1 | 1,054 | 0 | 1 | 1 | 0.7 | 1 | 0.215667 | 87.097 | ||
731 | swe_bench_verified::test::100 | swe_bench_verified | test | 100 | django__django-13128 | django/django | django/django | python | 2d67222472f80f251607ae1b720527afceba06ad | make temporal subtraction work without ExpressionWrapper
Description
class Experiment(models.Model):
start = models.DateTimeField()
end = models.DateTimeField()
Experiment.objects.annotate(
delta=F('end') - F('start') + Value(datetime.timedelta(), output_field=DurationField())
)
This gives:
django.core.exceptions.F... | diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py
--- a/django/db/models/expressions.py
+++ b/django/db/models/expressions.py
@@ -443,23 +443,6 @@ def set_source_expressions(self, exprs):
self.lhs, self.rhs = exprs
def as_sql(self, compiler, connection):
- try:
- ... | diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -1493,9 +1493,7 @@ def test_duration_expressions(self):
@skipUnlessDBFeature('supports_temporal_subtraction')
def test_date_subtraction(self):
queryset = Experimen... | ["test_date_case_subtraction (expressions.tests.FTimeDeltaTests)", "test_date_subquery_subtraction (expressions.tests.FTimeDeltaTests)", "test_date_subtraction (expressions.tests.FTimeDeltaTests)", "test_datetime_subquery_subtraction (expressions.tests.FTimeDeltaTests)", "test_datetime_subtraction_microseconds (express... | ["test_deconstruct (expressions.tests.FTests)", "test_deepcopy (expressions.tests.FTests)", "test_equal (expressions.tests.FTests)", "test_hash (expressions.tests.FTests)", "test_not_equal_Value (expressions.tests.FTests)", "test_and (expressions.tests.CombinableTests)", "test_negation (expressions.tests.CombinableTest... | null | true | 2020-06-30T18:06:56Z | 1 | 43 | 7 | 420 | 0 | 1 | 1 | 0.7 | 1 | 0.213333 | 87.09 | ||
732 | swe_gym::train::906 | swe_gym | train | 906 | dask__dask-8375 | dask/dask | dask/dask | python | fccddfb9eceb03bd91cc8ef4be0333228e3273ce | Empty chunk causes exception in nanmin/nanmax
**What happened**:
I want to get the nanmin of a specific set of pixels in an array. Some of the chunks are empty which is causing an exception when this dask array is passed to `nanmin` (`dask.array` or `numpy`).
**What you expected to happen**:
Get the minimum value f... | I realize I misread the docstring for nanmin which says:
> Return minimum of an array or minimum along an axis, ignoring any NaNs. When all-NaN slices are encountered a RuntimeWarning is raised and Nan is returned for that slice.
I read "all-NaN slices" and thought that includes empty slices. Maybe this is unreal... | diff --git a/dask/array/reductions.py b/dask/array/reductions.py
--- a/dask/array/reductions.py
+++ b/dask/array/reductions.py
@@ -17,7 +17,7 @@
from ..utils import deepmap, derived_from, funcname, getargspec, is_series_like
from . import chunk
from .blockwise import blockwise
-from .core import Array, _concatenate2... | diff --git a/dask/array/tests/test_reductions.py b/dask/array/tests/test_reductions.py
--- a/dask/array/tests/test_reductions.py
+++ b/dask/array/tests/test_reductions.py
@@ -725,6 +725,38 @@ def test_object_reduction(method):
assert result == 1
+@pytest.mark.parametrize("func", ["nanmin", "nanmax"])
+def test... | ["dask/array/tests/test_reductions.py::test_empty_chunk_nanmin_nanmax[nanmax]", "dask/array/tests/test_reductions.py::test_empty_chunk_nanmin_nanmax[nanmin]"] | ["dask/array/tests/test_reductions.py::test_median[False--1-nanmedian]", "dask/array/tests/test_reductions.py::test_array_cumreduction_out[cumsum]", "dask/array/tests/test_reductions.py::test_regres_3940[blelloch-min0]", "dask/array/tests/test_reductions.py::test_topk_argtopk1[None-argsort-argtopk]", "dask/array/tests/... | null | true | 2021-11-12T05:10:20Z | 1 | 40 | 2 | 2,163 | 0 | 0.85 | 1 | 0.7 | 1 | 0.493833 | 87.0815 | |
733 | swe_bench_pro::test::131 | swe_bench_pro | test | 131 | instance_element-hq__element-web-4c6b0d35add7ae8d58f71ea1711587e31081444b-vnan | element-hq/element-web | element-hq/element-web | javascript | 6da3cc8ca1baf268d768ed63e4b9cb16e40ce33d | # Title:
PosthogAnalytics fails to reliably handle initialization, anonymity, and event tracking under different configuration and privacy scenarios
## Description
The `PosthogAnalytics` module does not consistently enforce correct behavior when analytics is initialized under varying conditions. Using a single boole... | ## Requirements
- The instance should maintain an anonymity state using the `Anonymity` enum, defaulting to `Anonymous`, and apply it consistently for tracking, identification, and URL redaction decisions.
- When initializing, if `navigator.doNotTrack === "1"`, anonymity should be forced to `Anonymous` regardless of t... | diff --git a/src/PosthogAnalytics.ts b/src/PosthogAnalytics.ts
index d5f9b1d83ca..63cb3bc4226 100644
--- a/src/PosthogAnalytics.ts
+++ b/src/PosthogAnalytics.ts
@@ -66,10 +66,11 @@ export async function getRedactedCurrentLocation(origin: string, hash: string, p
}
export class PosthogAnalytics {
- private onlyTra... | diff --git a/test/PosthogAnalytics-test.ts b/test/PosthogAnalytics-test.ts
index e9efeffa7..531ddf9ff 100644
--- a/test/PosthogAnalytics-test.ts
+++ b/test/PosthogAnalytics-test.ts
@@ -7,11 +7,13 @@ class FakePosthog {
public capture;
public init;
public identify;
+ public reset;
constructor() ... | ["test/PosthogAnalytics-test.ts | Initialisation | Should not initialise if config is not set", "test/PosthogAnalytics-test.ts | Initialisation | Should initialise if config is set", "test/PosthogAnalytics-test.ts | Initialisation | Should force anonymous if DNT is enabled", "test/PosthogAnalytics-test.ts | Tracking | ... | ["test/PosthogAnalytics-test.ts | Tracking | Should silently not track if not inititalised", "test/PosthogAnalytics-test.ts | Tracking | Should not track non-anonymous messages if anonymous", "test/PosthogAnalytics-test.ts | Tracking | Should pseudonymise a location of a known screen", "test/PosthogAnalytics-test.ts | ... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-4c6b0d35add7ae8d58f71ea1711587e31081444b-vnan | true | null | 1 | 60 | 9 | 1,946 | 0 | 0.95 | 1 | 0.7 | 1 | 0.524333 | 87.073 | |
734 | swe_bench_pro::test::408 | swe_bench_pro | test | 408 | instance_internetarchive__openlibrary-5de7de19211e71b29b2f2ba3b1dff2fe065d660f-v08d8e8889ec945ab821fb156c04c7d2e2810debb | internetarchive/openlibrary | internetarchive/openlibrary | python | 5f7d8d190e2f0d837545e582fd5db99aae51a979 | # Bug: Edition.from_isbn() does not recognize ASIN and fails identifier validation for edition retrieval
## Description
In openlibrary/core/models.py, the Edition.from_isbn() method does not properly distinguish between ISBN and ASIN identifiers (Amazon codes that begin with "B"). As a result, valid inputs are reject... | ## Requirements
- The method `get_isbn_or_asin(isbn_or_asin: str)` must return a tuple `(isbn, asin)` where one element is a non-empty string representing the normalized identifier and the other is an empty string.
- Any ASIN input to `get_isbn_or_asin()` must be converted to uppercase, regardless of input case.
- Th... | diff --git a/openlibrary/core/models.py b/openlibrary/core/models.py
index d57e382cc0c..285be446224 100644
--- a/openlibrary/core/models.py
+++ b/openlibrary/core/models.py
@@ -373,10 +373,35 @@ def get_ia_download_link(self, suffix):
if filename:
return f"https://archive.org/download/{sel... | diff --git a/openlibrary/tests/core/test_models.py b/openlibrary/tests/core/test_models.py
index 8c054052f57..0b49e2082dd 100644
--- a/openlibrary/tests/core/test_models.py
+++ b/openlibrary/tests/core/test_models.py
@@ -1,5 +1,7 @@
from openlibrary.core import models
+import pytest
+
class MockSite:
def get... | ["openlibrary/tests/core/test_models.py::TestEdition::test_get_isbn_or_asin[1111111111-expected0]", "openlibrary/tests/core/test_models.py::TestEdition::test_get_isbn_or_asin[9780747532699-expected1]", "openlibrary/tests/core/test_models.py::TestEdition::test_get_isbn_or_asin[B06XYHVXVJ-expected2]", "openlibrary/tests/... | ["openlibrary/tests/core/test_models.py::TestEdition::test_url", "openlibrary/tests/core/test_models.py::TestEdition::test_get_ebook_info", "openlibrary/tests/core/test_models.py::TestEdition::test_is_not_in_private_collection", "openlibrary/tests/core/test_models.py::TestEdition::test_in_borrowable_collection_cuz_not_... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-5de7de19211e71b29b2f2ba3b1dff2fe065d660f-v08d8e8889ec945ab821fb156c04c7d2e2810debb | true | null | 3 | 88 | 16 | 1,378 | 0 | 0.95 | 1 | 0.7 | 1 | 0.523 | 87.069 | |
735 | swe_bench_pro::test::508 | swe_bench_pro | test | 508 | instance_navidrome__navidrome-eebfbc5381a1e506ff17b5f1371d1ad83d5fd642 | navidrome/navidrome | navidrome/navidrome | go | a5dfd2d4a14ac5a5b87fc6016e57b94d2b964a69 | ## [Bug]: After upgrade, all albums are missing due to "Skipping unreadable directory"
**Version**
0.50.0
**Current Behavior**
After upgrading from 0.49.3 to 0.50.0, all albums went missing from the library view. The logs show that the scanner discovers the top-level album directories but ends up skipping all of the... | ## Requirements
- The directory-tree walking functions in the scanner must operate directly on native filesystem paths rather than through an `io/fs.FS` abstraction. The `walkDirTree` function must accept the root folder as a plain `string` path (no `fs.FS` parameter) and traverse the tree using the `os` and `path/file... | diff --git a/scanner/tag_scanner.go b/scanner/tag_scanner.go
index c4c8935566c..1317581bc2f 100644
--- a/scanner/tag_scanner.go
+++ b/scanner/tag_scanner.go
@@ -80,10 +80,9 @@ func (s *TagScanner) Scan(ctx context.Context, lastModifiedSince time.Time, prog
// Special case: if lastModifiedSince is zero, re-import al... | diff --git a/scanner/walk_dir_tree_test.go b/scanner/walk_dir_tree_test.go
index e0cea007819..a7d68f4a057 100644
--- a/scanner/walk_dir_tree_test.go
+++ b/scanner/walk_dir_tree_test.go
@@ -16,12 +16,11 @@ import (
var _ = Describe("walk_dir_tree", func() {
dir, _ := os.Getwd()
baseDir := filepath.Join(dir, "tests"... | ["TestScanner"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-eebfbc5381a1e506ff17b5f1371d1ad83d5fd642 | true | null | 2 | 62 | 1 | 1,876 | 0 | 0.95 | 1 | 0.7 | 1 | 0.519333 | 87.058 | |
736 | swe_bench_pro::test::141 | swe_bench_pro | test | 141 | instance_element-hq__element-web-6961c256035bed0b7640a6e5907652c806968478-vnan | element-hq/element-web | element-hq/element-web | javascript | 29c193210fc5297f0839f02eddea36aa63977516 | ## Title:
The interactive authentication flow does not support registration tokens
## Description:
In Element Web, when a home server requires a registration token authentication step, the client does not present a token entry step within the InteractiveAuth flow, so registration cannot continue.
## Impact:
Users ... | ## Requirements
- The authentication flow must recognize the `m.login.registration_token` step and direct to a dedicated view for entering the token.
- The view must display a text field for the token with `name="registrationTokenField"`.
- The primary action must be rendered as an `AccessibleButton` with `kind="prim... | diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.tsx b/src/components/views/auth/InteractiveAuthEntryComponents.tsx
index 78fcdf7c2ee..4a995e4d06b 100644
--- a/src/components/views/auth/InteractiveAuthEntryComponents.tsx
+++ b/src/components/views/auth/InteractiveAuthEntryComponents.tsx
@@ -692,6 +... | diff --git a/test/components/views/auth/RegistrationToken-test.tsx b/test/components/views/auth/RegistrationToken-test.tsx
new file mode 100644
index 0000000000..05bb6c8196
--- /dev/null
+++ b/test/components/views/auth/RegistrationToken-test.tsx
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 OpenMarket Ltd
+Copyright 2022 The ... | ["test/components/views/auth/RegistrationToken-test.tsx | InteractiveAuthComponent | Should successfully complete a registration token flow", "test/components/views/auth/RegistrationToken-test.tsx | InteractiveAuthComponent | Should successfully complete an unstable registration token flow"] | ["test/components/views/settings/devices/filter-test.ts | filterDevicesBySecurityRecommendation() | returns all devices when no securityRecommendations are passed", "test/components/views/settings/devices/filter-test.ts | filterDevicesBySecurityRecommendation() | returns devices older than 90 days as inactive", "test/c... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-6961c256035bed0b7640a6e5907652c806968478-vnan | true | null | 2 | 90 | 2 | 1,252 | 0 | 0.95 | 1 | 0.7 | 1 | 0.508667 | 87.026 | |
737 | swe_gym::train::96 | swe_gym | train | 96 | getmoto__moto-5086 | getmoto/moto | getmoto/moto | python | 3b68be55d3f97130effedcbe7b01b561d3191df6 | CognitoIDP: The global_sign_out action has not been implemented
self = <moto.cognitoidp.responses.CognitoIdpResponse object at 0x000002058799AA60>
def call_action(self):
headers = self.response_headers
try:
self._authenticate_and_authorize_normal_action()
except HTTPException a... | Thanks for raising this @farmankazmieshaafi - will mark it as an enhancement to add this feature! | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -578,6 +578,14 @@ def get_user_extra_data_by_client_id(self, client_id, username):
extra_data.update({attribute[0]["Name"]: attribute[0]["Value"]})
return e... | diff --git a/tests/terraformtests/terraform-tests.success.txt b/tests/terraformtests/terraform-tests.success.txt
--- a/tests/terraformtests/terraform-tests.success.txt
+++ b/tests/terraformtests/terraform-tests.success.txt
@@ -24,6 +24,7 @@ cloudwatch:
- TestAccCloudWatchLogsGroupDataSource
cognitoidp:
- TestAcc... | ["tests/test_cognitoidp/test_cognitoidp.py::test_update_user_attributes_unknown_accesstoken", "tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out_unknown_accesstoken", "tests/test_cognitoidp/test_cognitoidp.py::test_update_group", "tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out", "tests/test... | ["tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required", "tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up", "tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken", "tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool", "tests/t... | null | true | 2022-05-01 19:20:43 | 2 | 80 | 5 | 1,238 | 0 | 0.85 | 1 | 0.7 | 1 | 0.473 | 87.019 | |
738 | swe_bench_pro::test::565 | swe_bench_pro | test | 565 | instance_qutebrowser__qutebrowser-01d1d1494411380d97cac14614a829d3a69cecaf-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 71451483f4f380c2f70f6e5b28025af79b1168e5 | ## Title:
Unreliable behavior in version reporting and blocklist download notifications
#### Description:
The system shows inconsistent behavior when reporting installed module versions and when signaling the completion of blocklist downloads. This makes it unclear whether modules are recognized correctly and whether ... | ## Requirements
- Ensure version reporting renders one line per module in the exact formats: `name: version` when a version is known, and `name: yes` when installed without a readable version.
- Provide for invalidating cached module-version detection via a method named `_reset_cache` available on each module's versio... | diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index 36b7f481e52..e60a5a0ef8f 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -44,14 +44,9 @@
except ImportError:
adblock = None # type: ignore[assignment]
+# If the... | diff --git a/tests/unit/components/test_blockutils.py b/tests/unit/components/test_blockutils.py
index 3f1507eea64..bef61de7345 100644
--- a/tests/unit/components/test_blockutils.py
+++ b/tests/unit/components/test_blockutils.py
@@ -59,7 +59,6 @@ def pretend_blocklists(tmpdir):
def test_blocklist_dl(qtbot, pretend_blo... | ["tests/unit/utils/test_version.py::TestModuleVersions::test_version_attribute[VERSION-expected_modules0]", "tests/unit/utils/test_version.py::TestModuleVersions::test_version_attribute[SIP_VERSION_STR-expected_modules1]", "tests/unit/utils/test_version.py::TestModuleVersions::test_version_attribute[None-expected_modul... | ["tests/unit/components/test_blockutils.py::test_blocklist_dl", "tests/unit/utils/test_version.py::test_distribution[None-None]", "tests/unit/utils/test_version.py::test_is_sandboxed[None-False]", "tests/unit/utils/test_version.py::test_is_sandboxed[distribution1-True]", "tests/unit/utils/test_version.py::test_is_sandb... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-01d1d1494411380d97cac14614a829d3a69cecaf-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 2 | 95 | 3 | 1,138 | 0 | 0.95 | 1 | 0.7 | 1 | 0.506333 | 87.019 | |
739 | swe_bench_verified::test::336 | swe_bench_verified | test | 336 | pytest-dev__pytest-5809 | pytest-dev/pytest | pytest-dev/pytest | python | 8aba863a634f40560e25055d179220f0eefabe9a | Lexer "python3" in --pastebin feature causes HTTP errors
The `--pastebin` option currently submits the output of `pytest` to `bpaste.net` using `lexer=python3`: https://github.com/pytest-dev/pytest/blob/d47b9d04d4cf824150caef46c9c888779c1b3f58/src/_pytest/pastebin.py#L68-L73
For some `contents`, this will raise a "HTT... | diff --git a/src/_pytest/pastebin.py b/src/_pytest/pastebin.py
--- a/src/_pytest/pastebin.py
+++ b/src/_pytest/pastebin.py
@@ -77,11 +77,7 @@ def create_new_paste(contents):
from urllib.request import urlopen
from urllib.parse import urlencode
- params = {
- "code": contents,
- "lex... | diff --git a/testing/test_pastebin.py b/testing/test_pastebin.py
--- a/testing/test_pastebin.py
+++ b/testing/test_pastebin.py
@@ -126,7 +126,7 @@ def test_create_new_paste(self, pastebin, mocked_urlopen):
assert len(mocked_urlopen) == 1
url, data = mocked_urlopen[0]
assert type(data) is byte... | ["testing/test_pastebin.py::TestPaste::test_create_new_paste"] | ["testing/test_pastebin.py::TestPasteCapture::test_failed", "testing/test_pastebin.py::TestPasteCapture::test_all", "testing/test_pastebin.py::TestPasteCapture::test_non_ascii_paste_text"] | null | true | 2019-09-01T04:40:09Z | 1 | 6 | 1 | 951 | 0 | 1 | 1 | 0.7 | 1 | 0.1785 | 86.9855 | ||
740 | swe_bench_verified::test::473 | swe_bench_verified | test | 473 | sympy__sympy-19954 | sympy/sympy | sympy/sympy | python | 6f54459aa0248bf1467ad12ee6333d8bc924a642 | sylow_subgroup() IndexError
I use sympy 1.6.1, with numpy 1.18.5, scipy 1.4.1, under Python '3.8.5 (default, Aug 5 2020, 09:44:06) [MSC v.1916 64 bit (AMD64)]'.
The code that I run as the following gives IndexError for sylow_subgroup():
from sympy.combinatorics import DihedralGroup, PermutationGroup, Permutation
G ... | diff --git a/sympy/combinatorics/perm_groups.py b/sympy/combinatorics/perm_groups.py
--- a/sympy/combinatorics/perm_groups.py
+++ b/sympy/combinatorics/perm_groups.py
@@ -2194,18 +2194,19 @@ def _number_blocks(blocks):
# check if the system is minimal with
# respect to the already disc... | diff --git a/sympy/combinatorics/tests/test_perm_groups.py b/sympy/combinatorics/tests/test_perm_groups.py
--- a/sympy/combinatorics/tests/test_perm_groups.py
+++ b/sympy/combinatorics/tests/test_perm_groups.py
@@ -905,6 +905,14 @@ def test_sylow_subgroup():
assert G.order() % S.order() == 0
assert G.order()/... | ["test_sylow_subgroup"] | ["test_has", "test_generate", "test_order", "test_equality", "test_stabilizer", "test_center", "test_centralizer", "test_coset_rank", "test_coset_factor", "test_orbits", "test_is_normal", "test_eq", "test_derived_subgroup", "test_is_solvable", "test_rubik1", "test_direct_product", "test_orbit_rep", "test_schreier_vecto... | null | true | 2020-08-12T06:07:32Z | 1 | 9 | 1 | 891 | 0 | 1 | 1 | 0.7 | 1 | 0.1785 | 86.9855 | ||
741 | swe_gym::train::51 | swe_gym | train | 51 | getmoto__moto-4895 | getmoto/moto | getmoto/moto | python | 9ab0ac4fb30de9eddda0de4401265943a2d13828 | MOTO_ALLOW_NONEXISTENT_REGION with DynamoDB not creating table with invalid region.
I have following code and test.
ddbresource.py
```
import boto3
class UseDynamoDb:
dynamo_db = None
def __init__(self, dynamo_db):
self.dynamo_db = dynamo_db
def create_table(self):
table = self.dynamo_db... | Hi @mika-koivusaari, thanks for raising this! Can confirm this is a bug - will push a fix shortly. | diff --git a/moto/core/utils.py b/moto/core/utils.py
--- a/moto/core/utils.py
+++ b/moto/core/utils.py
@@ -416,6 +416,8 @@ def __contains__(self, item):
return item in self.regions or item in self.keys()
def __getitem__(self, item):
+ if item in self.keys():
+ return super().__getitem_... | diff --git a/tests/test_core/test_mock_regions.py b/tests/test_core/test_mock_regions.py
--- a/tests/test_core/test_mock_regions.py
+++ b/tests/test_core/test_mock_regions.py
@@ -2,7 +2,7 @@
import mock
import os
import pytest
-from moto import mock_sns, settings
+from moto import mock_dynamodb2, mock_sns, settings
... | ["tests/test_core/test_mock_regions.py::test_use_unknown_region_from_env_but_allow_it__dynamo"] | ["tests/test_core/test_mock_regions.py::test_use_invalid_region", "tests/test_core/test_mock_regions.py::test_use_unknown_region_from_env", "tests/test_core/test_mock_regions.py::test_use_unknown_region_from_env_but_allow_it", "tests/test_core/test_mock_regions.py::test_use_region_from_env"] | null | true | 2022-02-27 20:30:00 | 2 | 10 | 1 | 2,546 | 0 | 0.85 | 1 | 0.7 | 1 | 0.457667 | 86.973 | |
742 | swe_gym::train::765 | swe_gym | train | 765 | iterative__dvc-5907 | iterative/dvc | iterative/dvc | python | 708587a159991ffde2946b970c964d38968521fc | add: confusing interaction with gitignore'd subdirectories
# Bug Report
## Description
`dvc add` will happily complete when targeting subdirectories that appear transiently in a `.gitignore`. The tracked data has a corresponding `.dvc` file generated and appears in the cache correctly, but attempts to push to a remot... | Following test should fail:
```python
def test_add_ignored(tmp_dir, scm, dvc):
tmp_dir.gen({"dir": {"subdir": {"file": "content"}}, ".gitignore": "dir/"})
dvc.add(targets=[os.path.join("dir", "subdir")])
```
@mattlbeck
> I don't fully understand why adding gitignored subdirectories is not allowed ho... | diff --git a/dvc/dvcfile.py b/dvc/dvcfile.py
--- a/dvc/dvcfile.py
+++ b/dvc/dvcfile.py
@@ -37,8 +37,12 @@
class FileIsGitIgnored(DvcException):
- def __init__(self, path):
- super().__init__(f"'{path}' is git-ignored.")
+ def __init__(self, path, pipeline_file=False):
+ super().__init__(
+ ... | diff --git a/tests/func/test_add.py b/tests/func/test_add.py
--- a/tests/func/test_add.py
+++ b/tests/func/test_add.py
@@ -823,7 +823,7 @@ def test_add_from_data_dir(tmp_dir, scm, dvc):
tmp_dir.gen({"dir": {"file2": "file2 content"}})
with pytest.raises(OverlappingOutputPathsError) as e:
- dvc.add(os... | ["tests/func/test_add.py::test_add_ignored"] | ["tests/func/test_add.py::test_add_to_cache_invalid_combinations[--no-commit-kwargs1]", "tests/func/test_add.py::test_add_symlink_dir[False]", "tests/unit/test_dvcfile.py::test_pipelines_file[custom-pipelines.yaml]", "tests/func/test_add.py::test_add_to_cache_invalid_combinations[multiple", "tests/unit/test_dvcfile.py:... | null | true | 2021-05-03T06:29:59Z | 2 | 41 | 1 | 1,912 | 0 | 0.85 | 1 | 0.7 | 1 | 0.455333 | 86.966 | |
743 | swe_bench_pro::test::158 | swe_bench_pro | test | 158 | instance_element-hq__element-web-ca58617cee8aa91c93553449bfdf9b3465a5119b-vnan | element-hq/element-web | element-hq/element-web | javascript | 5583d07f25071ceb4f84462150717b68a244f166 | ## Title:
Call sounds may remain muted and fail to play during calls
#### Description:
When initiating call sounds (such as ring or ringback), the system does not guarantee that muted audio elements will be unmuted before playback. As a result, audio cues can fail silently, leaving users without audible notification... | ## Requirements
- Call notification sounds (ring, ringback, busy, call-end) should always be audible when playback is triggered during call flows.
- The system should automatically recover from muted audio elements by unmuting them before attempting playback when a call sound is requested.
- Playback logic should be ... | diff --git a/src/LegacyCallHandler.tsx b/src/LegacyCallHandler.tsx
index e13b0ec85c3..ef1effdaf7b 100644
--- a/src/LegacyCallHandler.tsx
+++ b/src/LegacyCallHandler.tsx
@@ -71,13 +71,52 @@ export const PROTOCOL_SIP_VIRTUAL = 'im.vector.protocol.sip_virtual';
const CHECK_PROTOCOLS_ATTEMPTS = 3;
-enum AudioID {
+typ... | diff --git a/test/LegacyCallHandler-test.ts b/test/LegacyCallHandler-test.ts
index 2fd774ae509..5d1ff162615 100644
--- a/test/LegacyCallHandler-test.ts
+++ b/test/LegacyCallHandler-test.ts
@@ -28,7 +28,7 @@ import { mocked } from 'jest-mock';
import { CallEventHandlerEvent } from 'matrix-js-sdk/src/webrtc/callEventHan... | ["test/LegacyCallHandler-test.ts | incoming calls | should unmute <audio> before playing"] | ["test/modules/ModuleRunner-test.ts | invoke | should invoke to every registered module", "test/components/views/settings/devices/filter-test.ts | filterDevicesBySecurityRecommendation() | returns all devices when no securityRecommendations are passed", "test/components/views/settings/devices/filter-test.ts | filterDev... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-ca58617cee8aa91c93553449bfdf9b3465a5119b-vnan | true | null | 2 | 101 | 1 | 909 | 0 | 0.95 | 1 | 0.7 | 1 | 0.488167 | 86.9645 | |
744 | swe_bench_pro::test::423 | swe_bench_pro | test | 423 | instance_internetarchive__openlibrary-7f7e53aa4cf74a4f8549a5bcd4810c527e2f6d7e-v13642507b4fc1f8d234172bf8129942da2c2ca26 | internetarchive/openlibrary | internetarchive/openlibrary | python | 630221ab686c64e75a2ce253c893c033e4814b2e | # Title:
Normalization of non-MARC language identifiers in `format_languages` is incomplete.
## Description:
Some inputs specify languages using ISO-639-1 two-letter codes or full names (in English or the native language) rather than MARC 3-letter codes. The current normalization is inconsistent across these forms, wh... | ## Requirements
- `format_languages` should accept ISO-639-1 2-letter codes and map them to the corresponding MARC 3-letter codes before returning the `key`.
- `format_languages` should accept full language names (English and native) and resolve them to the correct MARC 3-letter code.
- `format_languages` should de-d... | diff --git a/openlibrary/catalog/utils/__init__.py b/openlibrary/catalog/utils/__init__.py
index 36b2e9fc8e4..58f5649d0fd 100644
--- a/openlibrary/catalog/utils/__init__.py
+++ b/openlibrary/catalog/utils/__init__.py
@@ -6,6 +6,15 @@
import web
+from openlibrary.plugins.upstream.utils import (
+ LanguageMultipl... | diff --git a/openlibrary/catalog/add_book/tests/conftest.py b/openlibrary/catalog/add_book/tests/conftest.py
index 463ccd070bb..1e2676b32ea 100644
--- a/openlibrary/catalog/add_book/tests/conftest.py
+++ b/openlibrary/catalog/add_book/tests/conftest.py
@@ -1,22 +1,31 @@
import pytest
+from openlibrary.plugins.upstre... | ["openlibrary/tests/catalog/test_utils.py::test_format_languages[languages2-expected2]"] | ["openlibrary/tests/catalog/test_utils.py::test_author_dates_match", "openlibrary/tests/catalog/test_utils.py::test_flip_name", "openlibrary/tests/catalog/test_utils.py::test_pick_first_date", "openlibrary/tests/catalog/test_utils.py::test_pick_best_name", "openlibrary/tests/catalog/test_utils.py::test_pick_best_author... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-7f7e53aa4cf74a4f8549a5bcd4810c527e2f6d7e-v13642507b4fc1f8d234172bf8129942da2c2ca26 | true | null | 1 | 49 | 1 | 1,943 | 0 | 0.95 | 1 | 0.7 | 1 | 0.487167 | 86.9615 | |
745 | swe_gym::train::536 | swe_gym | train | 536 | python__mypy-9577 | python/mypy | python/mypy | python | 952ca239e6126aff52067a37869bd394eb08cf21 | Check first argument of NamedTuple/namedtuple
Mypy doesn't complain about this code, even though the name arguments to `NamedTuple` and `namedtuple` are inconsistent with the assignment targets:
```py
from typing import NamedTuple
from collections import namedtuple
A = NamedTuple('X', [('a', int)]) # First argument ... | By the way I have noticed this kind of mistake several times during last week, so it may be important to fix. | diff --git a/mypy/plugin.py b/mypy/plugin.py
--- a/mypy/plugin.py
+++ b/mypy/plugin.py
@@ -359,7 +359,7 @@ def final_iteration(self) -> bool:
# A context for querying for configuration data about a module for
# cache invalidation purposes.
ReportConfigContext = NamedTuple(
- 'DynamicClassDefContext', [
+ 'Repo... | diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test
--- a/test-data/unit/check-incremental.test
+++ b/test-data/unit/check-incremental.test
@@ -5056,7 +5056,9 @@ from typing import NamedTuple
NT = NamedTuple('BadName', [('x', int)])
[builtins fixtures/tuple.pyi]
[out]
+tmp/b.py... | ["mypy/test/testcheck.py::TypeCheckSuite::testNamedTupleTypeNameMatchesVariableName", "mypy/test/testcheck.py::TypeCheckSuite::testNewAnalyzerIncrementalBrokenNamedTupleNested"] | ["mypy/test/testcheck.py::TypeCheckSuite::testNewAnalyzerIncrementalMethodNamedTuple"] | null | true | 2020-10-11T14:56:42Z | 3 | 111 | 2 | 468 | 0 | 0.85 | 1 | 0.7 | 1 | 0.448 | 86.944 | |
746 | swe_bench_verified::test::419 | swe_bench_verified | test | 419 | sphinx-doc__sphinx-9591 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 9ed054279aeffd5b1d0642e2d24a8800389de29f | Cross-references don't work in property's type annotations
### Describe the bug
A documented type in property's type annotation does not get cross-referenced:
```py
from typing import Optional
class Point:
"""
A class representing a point.
Attributes:
x: Position X.
y: Position Y.
"""... | diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -861,7 +861,8 @@ def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]
typ = self.options.get('type')
if typ:
- signode += addnodes.... | 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
@@ -833,13 +833,15 @@ def test_pyproperty(app):
entries=[('single', 'prop1 (Class property)', 'Class.prop1', '', None)])
assert_node(doctree[1][1][1], ([desc_signature, ([desc... | ["tests/test_domain_py.py::test_pyproperty"] | ["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_xrefs_abbreviations", "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_f... | null | true | 2021-08-29T15:26:24Z | 1 | 3 | 1 | 1,872 | 0 | 1 | 1 | 0.85 | 0.8 | 0.322 | 86.941 | ||
747 | swe_gym::train::23 | swe_gym | train | 23 | getmoto__moto-7153 | getmoto/moto | getmoto/moto | python | 909855490384d1f42926c12d277b03ea7b8c4d36 | Route53 record with multivalue_answer_routing_policy cannot be destroyed
# Problem
I am unable to destroy a route53 record with `multivalue_answer_routing_policy = true`. If you comment out the `multivalue_answer_routing_policy` or set it to `false` in the below code, then it applies and destroys properly.
# Reproduct... | Hi @jrindy-iterable, thanks for raising this.
The `boto3` [documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53/client/change_resource_record_sets.html) states:
> To delete a resource record set, you must specify all the same values that you specified when you created it... | diff --git a/moto/route53/models.py b/moto/route53/models.py
--- a/moto/route53/models.py
+++ b/moto/route53/models.py
@@ -314,6 +314,27 @@ def __contains__(self, item: Any) -> bool:
item["ResourceRecordSet"]["Name"] = item["ResourceRecordSet"]["Name"].strip(".")
return super().__contains__(item)
+ ... | diff --git a/.github/workflows/tests_terraform_examples.yml b/.github/workflows/tests_terraform_examples.yml
--- a/.github/workflows/tests_terraform_examples.yml
+++ b/.github/workflows/tests_terraform_examples.yml
@@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- service: ["acm"]
+... | ["tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[True]", "tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[False]"] | ["tests/test_route53/test_route53.py::test_update_hosted_zone_comment", "tests/test_route53/test_route53.py::test_use_health_check_in_resource_record_set", "tests/test_route53/test_route53.py::test_get_dns_sec", "tests/test_route53/test_route53.py::test_get_unknown_hosted_zone", "tests/test_route53/test_route53.py::tes... | null | true | 2023-12-21 21:22:18 | 1 | 30 | 2 | 2,034 | 0 | 0.85 | 1 | 0.7 | 1 | 0.439 | 86.917 | |
748 | swe_gym::train::678 | swe_gym | train | 678 | iterative__dvc-3876 | iterative/dvc | iterative/dvc | python | 2fecc66cb96442a8bf5d296e71a72766341d6e35 | forbid using subrepo as a target
**Please provide information about your setup**
DVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))
After introducing support for multiple DVC roots in #3257, in case of following setup:
```
.
├── .dvc
├... | Ok, so discussed with @pmrowla and @pared that it makes sense to forbid it. If someone asks for this in the future, we could introduce `--subrepos` or smth like that for push/pull/etc.
The reason it does't throw an error right now is https://github.com/iterative/dvc/blob/1.0.0a1/dvc/repo/__init__.py#L210 . It opens dvc... | diff --git a/dvc/ignore.py b/dvc/ignore.py
--- a/dvc/ignore.py
+++ b/dvc/ignore.py
@@ -5,7 +5,9 @@
from pathspec import PathSpec
from pathspec.patterns import GitWildMatchPattern
+from dvc.path_info import PathInfo
from dvc.scm.tree import BaseTree
+from dvc.utils import relpath
logger = logging.getLogger(__nam... | diff --git a/tests/func/test_tree.py b/tests/func/test_tree.py
--- a/tests/func/test_tree.py
+++ b/tests/func/test_tree.py
@@ -3,6 +3,7 @@
from dvc.ignore import CleanTree
from dvc.path_info import PathInfo
+from dvc.repo import Repo
from dvc.repo.tree import RepoTree
from dvc.scm import SCM
from dvc.scm.git imp... | ["tests/func/test_tree.py::test_cleantree_subrepo"] | ["tests/func/test_tree.py::TestGitTree::test_isfile", "tests/func/test_tree.py::TestWorkingTree::test_isdir", "tests/func/test_tree.py::TestGitSubmoduleTree::test_isdir", "tests/func/test_tree.py::TestWalkInGit::test_nobranch", "tests/func/test_tree.py::TestWalkInGit::test_branch", "tests/func/test_tree.py::TestGitTree... | null | true | 2020-05-26T06:47:08Z | 1 | 76 | 1 | 1,097 | 0 | 0.85 | 1 | 0.7 | 1 | 0.436167 | 86.9085 | |
749 | swe_gym::train::1104 | swe_gym | train | 1,104 | pydantic__pydantic-8190 | pydantic/pydantic | pydantic/pydantic | python | fb81b32683782069fe9708efcb99de5cafb6fbe7 | `JsonValue` union validation chooses wrong member type
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
Related/Possible duplicate of: #7294 #6830
When using `JsonValue` as a member of a union, `bool`s are serialized to `int`s:
```py
from pydantic import BaseModel, JsonValue
class Str... | @psychedelicious,
Thanks for reporting this. We'll get a fix out for this soon. | diff --git a/pydantic/types.py b/pydantic/types.py
--- a/pydantic/types.py
+++ b/pydantic/types.py
@@ -2731,9 +2731,9 @@ def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHa
List['JsonValue'],
Dict[str, 'JsonValue'],
str,
+ bool,
int,
float... | diff --git a/tests/test_types.py b/tests/test_types.py
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -6120,3 +6120,12 @@ def test_json_value():
'type': 'invalid-json-value',
}
]
+
+
+def test_json_value_roundtrip() -> None:
+ # see https://github.com/pydantic/pydantic/issues/8175
... | ["tests/test_types.py::test_json_value_roundtrip"] | ["tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_types.py::test_decimal_validation[condecimal-type_args46-value46-result46]", "tests/test_types.py::test_types_repr[PastDate-PastDate]", "tests/test_types.py::test_d... | null | true | 2023-11-21T14:47:10Z | 1 | 6 | 1 | 2,473 | 0 | 0.85 | 1 | 0.7 | 1 | 0.432167 | 86.8965 | |
750 | swe_gym::train::215 | swe_gym | train | 215 | getmoto__moto-5439 | getmoto/moto | getmoto/moto | python | 53efd628c44d35528a2908924fc722c5d9b97ead | `put_item` using `batch_writer` does not validate empty strings
Issue similar to #1129
When putting items with empty strings using `batch_writer` `ClientError` is not raised.
Using `moto==3.1.16`
Failing test case:
```python
import pytest
import boto3
import botocore
from moto import mock_dynamodb
@pytest.fixture
de... | Thanks for raising this @pawelarybak - marking it as an enhancement to add validation for this use-case | diff --git a/moto/dynamodb/models/__init__.py b/moto/dynamodb/models/__init__.py
--- a/moto/dynamodb/models/__init__.py
+++ b/moto/dynamodb/models/__init__.py
@@ -1381,9 +1381,7 @@ def get_table_keys_name(self, table_name, keys):
for key in keys:
if key in table.hash_key_names:
... | diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
--- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
+++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
@@ -625,3 +625,45 @@ def test_update_expression_with_trai... | ["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_batch_put_item_with_empty_value"] | ["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_hash_key_can_only_use_equals_operations[<]", "tests/test_dynamodb/test_dynamodb.py::test_basic_projection_expressions_using_query_with_attr_expression_names", ... | null | true | 2022-08-31 18:51:06 | 2 | 36 | 1 | 1,865 | 0 | 0.85 | 1 | 0.7 | 1 | 0.430833 | 86.8925 | |
751 | swe_gym::train::948 | swe_gym | train | 948 | dask__dask-8538 | dask/dask | dask/dask | python | 3c46e89aea2af010e69049cd638094fea2ddd576 | Dask interprets boolean array as an index array
**What happened**: setting items on a dask array with a bool array incorrectly casts the array to an index array.
**What you expected to happen**: no broadcastig error.
**Minimal Complete Verifiable Example**:
```python
>>> import dask
>>> import dask.array as da
>>> ar... | Thanks for writing this up! I am able to reproduce, but I'm having trouble tracking down the exact issue. I think it is likely in this funciton: https://github.com/dask/dask/blob/e4799c0498b5e5877705bb5542d8d01116ee1320/dask/array/slicing.py#L1350 Maybe @davidhassell will be able to get to the bottom of it :)
As a w... | diff --git a/dask/array/slicing.py b/dask/array/slicing.py
--- a/dask/array/slicing.py
+++ b/dask/array/slicing.py
@@ -1375,24 +1375,32 @@ def parse_assignment_indices(indices, shape):
parsed_indices : `list`
The reformated indices that are equivalent to the input
indices.
- indices_shape : `l... | diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py
--- a/dask/array/tests/test_array_core.py
+++ b/dask/array/tests/test_array_core.py
@@ -3855,6 +3855,15 @@ def test_setitem_extended_API_1d():
),
-1,
],
+ [
+ (
+ sl... | ["dask/array/tests/test_array_core.py::test_setitem_extended_API_2d[index18-value18]"] | ["dask/array/tests/test_array_core.py::test_normalize_chunks_nan", "dask/array/tests/test_array_core.py::test_stack_scalars", "dask/array/tests/test_array_core.py::test_astype", "dask/array/tests/test_array_core.py::test_meta[dtype1]", "dask/array/tests/test_array_core.py::test_vindex_basic", "dask/array/tests/test_arr... | null | true | 2022-01-06T17:52:37Z | 1 | 83 | 1 | 914 | 0 | 0.85 | 1 | 0.7 | 1 | 0.429 | 86.887 | |
752 | swe_gym::train::607 | swe_gym | train | 607 | conan-io__conan-13390 | conan-io/conan | conan-io/conan | python | cc6c1d568021a5ebb6de6f14a8d93557cb7f7829 | [bug] Error in generator 'PremakeDeps': '_Component' object has no attribute 'aggregate_components'
### Environment details
* Operating System+version: Windows 11 (10.0.22621 Build 22621)
* Compiler+version: MSVC 193
* Conan version: 2.0.0
* Python version: 3.11.0
### Steps to reproduce
1. Create an empty/default co... | I think I see the issue in the source code. I'm also seeing that `PremakeDeps` still does not support multi build. If thats ok for you guys, I can try fixing both issues while still maintaining compatibility with existing premake implementations.
The changes would be realy simple. The problem ist that line:
https:/... | diff --git a/conan/tools/premake/premakedeps.py b/conan/tools/premake/premakedeps.py
--- a/conan/tools/premake/premakedeps.py
+++ b/conan/tools/premake/premakedeps.py
@@ -1,10 +1,88 @@
+import itertools
+import glob
+import re
+
from conan.internal import check_duplicated_generator
from conans.model.build_info impor... | diff --git a/conans/test/integration/toolchains/premake/test_premakedeps.py b/conans/test/integration/toolchains/premake/test_premakedeps.py
--- a/conans/test/integration/toolchains/premake/test_premakedeps.py
+++ b/conans/test/integration/toolchains/premake/test_premakedeps.py
@@ -2,15 +2,62 @@
from conans.test.uti... | ["conans/test/integration/toolchains/premake/test_premakedeps.py::test_premakedeps"] | [] | null | true | 2023-03-08T20:24:40Z | 1 | 269 | 1 | 2,899 | 0 | 0.85 | 1 | 0.85 | 0.75 | 0.983167 | 86.887 | |
753 | swe_gym::train::1066 | swe_gym | train | 1,066 | pydantic__pydantic-6100 | pydantic/pydantic | pydantic/pydantic | python | 13aefcf109adeba4d3d1e023d42f0e3d8e053f77 | `to_string_ser_schema` doesn't work properly anymore
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
I have a test to check how some schemas work, and it is broken after an update.
`model.model_dump(mode='json') == {'flag': str(f... | ```py
core_schema.no_info_after_validator_function(
function=cls.validate,
schema=schema,
serialization=core_schema.SimpleSerSchema(type='str'),
)
```
`core_schema.SimpleSerSchema(type='str')` gives the same result :shrimp:
It looks like `__get_pydantic_core_schema__` is not called at all. I forgot ... | diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py
--- a/pydantic/_internal/_generate_schema.py
+++ b/pydantic/_internal/_generate_schema.py
@@ -9,6 +9,7 @@
import typing
from contextlib import contextmanager
from copy import copy
+from enum import Enum
from functools impor... | diff --git a/tests/test_types.py b/tests/test_types.py
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -5553,3 +5553,39 @@ def test_annotated_default_value_functional_validator() -> None:
)
def test_types_repr(pydantic_type, expected):
assert repr(pydantic_type()) == expected
+
+
+def test_enum_custom_sch... | ["tests/test_types.py::test_enum_custom_schema"] | ["tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_types.py::test_decimal_validation[condecimal-type_args46-value46-result46]", "tests/test_types.py::test_types_repr[PastDate-PastDate]", "tests/test_types.py::test_d... | null | true | 2023-06-12T16:29:27Z | 2 | 10 | 1 | 2,368 | 0 | 0.85 | 1 | 0.7 | 1 | 0.428 | 86.884 | |
754 | swe_bench_pro::test::567 | swe_bench_pro | test | 567 | instance_qutebrowser__qutebrowser-0aa57e4f7243024fa4bba8853306691b5dbd77b3-v5149fcda2a9a6fe1d35dfed1bade1444a11ef271 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | e8a7c6b257478bd39810f19c412f484ada6a3dc6 | ## Title:
QtWebEngine >= 6.4: Dark mode brightness threshold for foreground is not applied or can't be set correctly
## Description:
In QtWebEngine 6.4 and higher, Chromium changed the internal key for the dark mode brightness threshold from `TextBrightnessThreshold` to `ForegroundBrightnessThreshold`. Currently, th... | ## Requirements
- Expose the public `colors.webpage.darkmode.threshold.foreground` option of type Int with default=256, so that its value controls the foreground inversion threshold in dark mode; it should be settable (e.g., `100`) and applied to the backend.
- In Qt WebEngine < 6.4, translate `colors.webpage.darkmode... | diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc
index de42839ce6d..b5c8e61a4dd 100644
--- a/doc/help/settings.asciidoc
+++ b/doc/help/settings.asciidoc
@@ -124,7 +124,7 @@
|<<colors.webpage.darkmode.policy.images,colors.webpage.darkmode.policy.images>>|Which images to apply dark mode to.
|<<color... | diff --git a/tests/unit/browser/webengine/test_darkmode.py b/tests/unit/browser/webengine/test_darkmode.py
index 53d3246d66e..d2f9742f13a 100644
--- a/tests/unit/browser/webengine/test_darkmode.py
+++ b/tests/unit/browser/webengine/test_darkmode.py
@@ -104,6 +104,7 @@ def test_basics(config_stub, settings, expected):
... | ["tests/unit/browser/webengine/test_darkmode.py::test_qt_version_differences[5.15.2-expected0]", "tests/unit/browser/webengine/test_darkmode.py::test_qt_version_differences[5.15.3-expected1]", "tests/unit/browser/webengine/test_darkmode.py::test_qt_version_differences[6.4-expected2]", "tests/unit/browser/webengine/test... | ["tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-5.15.2-expected0]", "tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-5.15.3-expected1]", "tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-6.2.0-expected2]", "tests/unit/browser/webengine/test_darkmode.py::te... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-0aa57e4f7243024fa4bba8853306691b5dbd77b3-v5149fcda2a9a6fe1d35dfed1bade1444a11ef271 | true | null | 3 | 59 | 4 | 1,573 | 0 | 0.95 | 1 | 0.7 | 1 | 0.458833 | 86.8765 | |
755 | swe_bench_promax::test::78 | swe_bench_promax | test | 78 | apache__maven-10975 | apache/maven | apache/maven | java | 335baf58fb499ee4e14cd1fe0c3cc2c1c9ed4ffe | When building multi-module Maven projects, the build process may encounter issues while parsing or validating multiple Project Object Model (POM) files across different modules. In such scenarios, a `ProjectBuildingException` is thrown to signal failures during project construction. However, the exception currently sur... | diff --git a/impl/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingException.java b/impl/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingException.java
--- a/impl/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingException.java
+++ b/impl/maven-core/src/main/java/org/apac... | diff --git a/impl/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingExceptionTest.java b/impl/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingExceptionTest.java
new file mode 100644
--- /dev/null
+++ b/impl/maven-core/src/test/java/org/apache/maven/project/ProjectBuildingExceptionTest.ja... | null | null | key4127/refactor-dockerhub:apache__maven-10975 | true | 1753557357 | 1 | 84 | null | 2,959 | 0 | 0.9 | 1 | 0.7 | 1 | 0.773167 | 86.8695 | ||
756 | swe_gym::train::1055 | swe_gym | train | 1,055 | pydantic__pydantic-9137 | pydantic/pydantic | pydantic/pydantic | python | 932b025f892c5bbfa0a5da0d671179da7f93666e | coerce_numbers_to_str needs a per-field variant
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing
### Description
We are migrating our code from Pydantic... | @jkugler,
Seems like a reasonable feature request 👍. I think we should still stick with `True` and `False` as the allowed settings, but we could support `Field(..., coerce_numbers_to_str=True)` or something along those lines.
Seems perfectly reasonable. I'm a Pydantic newbie thrown in the deep end by migrating a pr... | diff --git a/pydantic/_internal/_known_annotated_metadata.py b/pydantic/_internal/_known_annotated_metadata.py
--- a/pydantic/_internal/_known_annotated_metadata.py
+++ b/pydantic/_internal/_known_annotated_metadata.py
@@ -19,7 +19,15 @@
INEQUALITY = {'le', 'ge', 'lt', 'gt'}
NUMERIC_CONSTRAINTS = {'multiple_of', 'all... | diff --git a/tests/test_fields.py b/tests/test_fields.py
--- a/tests/test_fields.py
+++ b/tests/test_fields.py
@@ -144,3 +144,29 @@ def prop_field(self):
with pytest.raises(AttributeError, match=f"'{Model.__name__}' object has no attribute 'invalid_field'"):
Model().invalid_field
+
+
+@pytest.mark.param... | ["tests/test_fields.py::test_coerce_numbers_to_str_field_precedence[11.11]", "tests/test_fields.py::test_coerce_numbers_to_str_field_precedence[42]", "tests/test_fields.py::test_coerce_numbers_to_str_field_option[443]", "tests/test_fields.py::test_coerce_numbers_to_str_field_precedence[443]", "tests/test_fields.py::tes... | ["tests/test_fields.py::test_init_var_field", "tests/test_fields.py::test_field_info_annotation_keyword_argument", "tests/test_fields.py::test_field_info_annotated_attribute_name_clashing", "tests/test_fields.py::test_root_model_arbitrary_field_name_error", "tests/test_fields.py::test_root_model_field_override", "tests... | null | true | 2024-03-29T21:43:15Z | 2 | 23 | 10 | 2,075 | 0 | 0.85 | 1 | 0.7 | 1 | 0.4225 | 86.8675 | |
757 | swe_gym::train::991 | swe_gym | train | 991 | dask__dask-9345 | dask/dask | dask/dask | python | 5bbf072177fabdfc3421a5902aa23ee2bbf57ef4 | `delayed` can't handle some `dataclasses` as inputs
Someone reported offline that the following snippet fails:
```python
from dask import delayed
from dataclasses import dataclass
@delayed
def noop(x):
return x
@dataclass
class MyDataClass:
arg1: int
def __init__(self, arg):
self.arg1 = arg
d = ... | Thanks for the initial investigation and nice reproducer @jrbourbeau!
I think there is likely a limit to our support for dataclasses here. If there is a dataclass with a custom `__init__` signature, then our logic for reconstituting the instance after computing any collections in its fields will, in general, be wron... | diff --git a/dask/delayed.py b/dask/delayed.py
--- a/dask/delayed.py
+++ b/dask/delayed.py
@@ -3,7 +3,7 @@
import uuid
import warnings
from collections.abc import Iterator
-from dataclasses import fields, is_dataclass
+from dataclasses import fields, is_dataclass, replace
from tlz import concat, curry, merge, uni... | diff --git a/dask/tests/test_delayed.py b/dask/tests/test_delayed.py
--- a/dask/tests/test_delayed.py
+++ b/dask/tests/test_delayed.py
@@ -1,6 +1,7 @@
import pickle
import types
from collections import namedtuple
+from dataclasses import dataclass, field
from functools import partial
from operator import add, matm... | ["dask/tests/test_delayed.py::test_delayed_with_dataclass_with_custom_init", "dask/tests/test_delayed.py::test_delayed_with_eager_dataclass_with_set_init_false_field", "dask/tests/test_delayed.py::test_delayed_with_dataclass_with_eager_custom_init", "dask/tests/test_delayed.py::test_delayed_with_dataclass_with_set_init... | ["dask/tests/test_delayed.py::test_finalize_name", "dask/tests/test_delayed.py::test_literates", "dask/tests/test_delayed.py::test_keys_from_array", "dask/tests/test_delayed.py::test_attributes", "dask/tests/test_delayed.py::test_delayed_decorator_on_method", "dask/tests/test_delayed.py::test_pure", "dask/tests/test_de... | null | true | 2022-08-03T10:32:00Z | 1 | 22 | 4 | 2,021 | 0 | 0.85 | 1 | 0.7 | 1 | 0.410167 | 86.8305 | |
758 | swe_gym::train::213 | swe_gym | train | 213 | getmoto__moto-5433 | getmoto/moto | getmoto/moto | python | bd051f4f3296a0ad10b47e45cff5d31ba3628231 | CreateAutoScalingGroup with MixedInstancesPolicy not working
When using moto as backend
```
aws --endpoint=http://127.0.0.1:5000 autoscaling create-auto-scaling-group --auto-scaling-group-name group2 \
--min-size 1 --max-size 10 --availability-zones us-east-1a \
--mixed-instances-policy 'LaunchTemplate={LaunchTem... | https://github.com/spulec/moto/blob/ab045f5bebff4de84ac33053ef764efa32405829/moto/autoscaling/models.py#L888
Going to mark this as an enhancement instead, as we just need to add support for that parameter. | diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py
--- a/moto/autoscaling/models.py
+++ b/moto/autoscaling/models.py
@@ -368,6 +368,8 @@ def __init__(
autoscaling_backend,
ec2_backend,
tags,
+ mixed_instance_policy,
+ capacity_rebalance,
new_instances_... | diff --git a/tests/terraformtests/terraform-tests.success.txt b/tests/terraformtests/terraform-tests.success.txt
--- a/tests/terraformtests/terraform-tests.success.txt
+++ b/tests/terraformtests/terraform-tests.success.txt
@@ -11,6 +11,14 @@ autoscaling:
- TestAccAutoScalingAttachment
- TestAccAutoScalingGroupDat... | ["tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_group_with_mixed_instances_policy", "tests/test_autoscaling/test_autoscaling_groups.py::TestAutoScalingGroup::test_create_autoscaling_group__additional_params", "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_group_with_mixed_i... | ["tests/test_autoscaling/test_autoscaling_groups.py::TestAutoScalingGroup::test_create_autoscaling_groups_defaults", "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__latest", "tests/test_autoscaling/test_autoscaling_groups.py::TestAutoScalingGroup::test_resume_processes", "te... | null | true | 2022-08-29 22:15:44 | 2 | 76 | 3 | 939 | 0 | 0.85 | 1 | 0.7 | 1 | 0.409833 | 86.8295 | |
759 | swe_gym::train::947 | swe_gym | train | 947 | dask__dask-10422 | dask/dask | dask/dask | python | 7ace31f93ddc0b879f14bb54755b9f547bf60188 | dask.array.core.to_zarr with distributed scheduler, MutableMapping should be ok if backed by disk
Hello dask array team!
Thanks for the amazing packages, they have enabled me to do some great science.
`dask.array.core.to_zarr` does not want to write to a memory-backed zarr array with the distributed scheduler. This o... | Agreed. Looks like this is entirely incapable of accepting any `zarr.storage.Store` objects.
I'd be fine if we removed the check for MutableMapping entirely. Alternatively, we can allowlist `zarr.Store` objects as long as they are not `MemoryStore`
Ok! I will fix and PR this afternoon. | diff --git a/dask/array/core.py b/dask/array/core.py
--- a/dask/array/core.py
+++ b/dask/array/core.py
@@ -11,14 +11,7 @@
import uuid
import warnings
from bisect import bisect
-from collections.abc import (
- Collection,
- Iterable,
- Iterator,
- Mapping,
- MutableMapping,
- Sequence,
-)
+from coll... | diff --git a/dask/tests/test_distributed.py b/dask/tests/test_distributed.py
--- a/dask/tests/test_distributed.py
+++ b/dask/tests/test_distributed.py
@@ -353,6 +353,47 @@ def test_zarr_distributed_roundtrip(c):
assert a2.chunks == a.chunks
+def test_zarr_distributed_with_explicit_directory_store(c):
+ ... | ["dask/tests/test_distributed.py::test_zarr_distributed_with_explicit_directory_store"] | ["dask/tests/test_distributed.py::test_local_get_with_distributed_active", "dask/tests/test_distributed.py::test_blockwise_dataframe_io[True-False-parquet-pyarrow]", "dask/tests/test_distributed.py::test_annotations_blockwise_unpack", "dask/tests/test_distributed.py::test_blockwise_dataframe_io[True-False-hdf]", "dask/... | null | true | 2023-07-20T15:31:45Z | 1 | 11 | 1 | 2,207 | 0 | 0.85 | 1 | 0.7 | 1 | 0.4045 | 86.8135 | |
760 | swe_gym::train::1079 | swe_gym | train | 1,079 | pydantic__pydantic-8947 | pydantic/pydantic | pydantic/pydantic | python | 5c8afe65a69d9fb127c32fbf288156d7c13da346 | create_model fails to use type annotation of typing.Annotated
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
Using `create_model` fails with an "A non-annotated attribute" error when using an annotation created with typing.Annotated. This same annotation works as expected when used to ... | @trippersham,
Thanks for suggesting this. I'm going to mark this as a feature request - this isn't something we've supported in the past afaik, so it's something we'll have to add.
Also marking as `help wanted` if anyone wants to work on this 😄.
Thanks @sydney-runkle for the re-categorization. I saw this pattern... | diff --git a/pydantic/main.py b/pydantic/main.py
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -1434,7 +1434,8 @@ def create_model( # noqa: C901
__cls_kwargs__: A dictionary of keyword arguments for class creation, such as `metaclass`.
__slots__: Deprecated. Should not be passed to `create_model`.... | diff --git a/tests/test_create_model.py b/tests/test_create_model.py
--- a/tests/test_create_model.py
+++ b/tests/test_create_model.py
@@ -3,6 +3,7 @@
from typing import Generic, Optional, Tuple, TypeVar
import pytest
+from typing_extensions import Annotated
from pydantic import (
BaseModel,
@@ -516,6 +517,... | ["tests/test_create_model.py::test_create_model_typing_annotated_field_info[bool-field_info0]", "tests/test_create_model.py::test_create_model_expect_field_info_as_metadata_typing", "tests/test_create_model.py::test_create_model_typing_annotated_field_info[str-field_info1]"] | ["tests/test_create_model.py::test_private_attr_set_name_do_not_crash_if_not_callable", "tests/test_create_model.py::test_create_model_protected_namespace_default", "tests/test_create_model.py::test_del_model_attr_error", "tests/test_create_model.py::test_resolving_forward_refs_across_modules", "tests/test_create_model... | null | true | 2024-03-05T07:57:48Z | 1 | 16 | 3 | 2,093 | 0 | 0.85 | 1 | 0.7 | 1 | 0.402167 | 86.8065 | |
761 | swe_bench_pro::test::298 | swe_bench_pro | test | 298 | instance_future-architect__vuls-e4728e388120b311c4ed469e4f942e0347a2689b-v264a82e2f4818e30f5a25e4da53b27ba119f62b5 | future-architect/vuls | future-architect/vuls | go | 61c39637f2f3809e1b5dad05f0c57c799dce1587 | # Title: Severity values from Debian Security Tracker differ between repeated scans
## What did you do? (required. The issue will be **closed** when not provided.)
Ran `vuls report --refresh-cve` on a Debian system and inspected the scan results for a CVE in `docker.json`.
## What did you expect to happen?
From a s... | ## Requirements
- The `ConvertToModel` function in the Debian handler must collect all severity values across package releases for a CVE, eliminate duplicates, sort them by the ranking `unknown < unimportant < not yet assigned < end-of-life < low < medium < high` (values not in this list rank below `unknown`), join the... | diff --git a/gost/debian.go b/gost/debian.go
index 9bbaff694e..f2be8626b9 100644
--- a/gost/debian.go
+++ b/gost/debian.go
@@ -4,6 +4,7 @@
package gost
import (
+ "cmp"
"encoding/json"
"fmt"
"strconv"
@@ -11,6 +12,7 @@ import (
debver "github.com/knqyf263/go-deb-version"
"golang.org/x/exp/maps"
+ "golan... | diff --git a/gost/debian_test.go b/gost/debian_test.go
index c2c418d4b1..b21f1fbeb8 100644
--- a/gost/debian_test.go
+++ b/gost/debian_test.go
@@ -4,6 +4,7 @@
package gost
import (
+ "cmp"
"reflect"
"testing"
@@ -97,26 +98,104 @@ func TestDebian_ConvertToModel(t *testing.T) {
Urgency: "not yet a... | ["TestDebian_ConvertToModel", "TestDebian_CompareSeverity", "TestCvss3Scores"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_future-architect__vuls-e4728e388120b311c4ed469e4f942e0347a2689b-v264a82e2f4818e30f5a25e4da53b27ba119f62b5 | true | null | 2 | 70 | 3 | 1,209 | 0 | 0.95 | 1 | 0.7 | 1 | 0.434833 | 86.8045 | |
762 | swe_bench_pro::test::48 | swe_bench_pro | test | 48 | instance_ansible__ansible-1ee70fc272aff6bf3415357c6e13c5de5b928d9b-v1055803c3a812189a1133297f7f5468579283f86 | ansible/ansible | ansible/ansible | python | 9281148b623d4e2e8302778d91af3e84ab9579a9 | ###Title
Inconsistent Python identifier validation behavior between Python 2 and Python 3 in ansible.utils.vars.isidentifier
### Description
The `isidentifier` function in `ansible.utils.vars` presents inconsistent behavior between Python 2 and Python 3 for identifier validation. Specifically, Python 2 does not cons... | ## Requirements
- The ansible.utils.vars `isidentifier` function must characterize empty strings and strings containing whitespace (for example a leading space, a trailing space, an all-whitespace string, or a string with an embedded space) as invalid identifiers.
- The function must reject strings that begin with a d... | diff --git a/lib/ansible/utils/vars.py b/lib/ansible/utils/vars.py
index 9011b377798b32..0dd49ca87f163d 100644
--- a/lib/ansible/utils/vars.py
+++ b/lib/ansible/utils/vars.py
@@ -19,7 +19,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
-import ast
+import keyword
import... | diff --git a/test/units/utils/test_isidentifier.py b/test/units/utils/test_isidentifier.py
new file mode 100644
index 00000000000000..de6de642ab077d
--- /dev/null
+++ b/test/units/utils/test_isidentifier.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+# Copyright: (c) 2020 Ansible Project
+# GNU General Public License v3... | ["test/units/utils/test_isidentifier.py::test_non_ascii"] | ["test/units/utils/test_isidentifier.py::test_invalid_identifier[no-dashed-names-for-you]", "test/units/utils/test_isidentifier.py::test_invalid_identifier[pass]", "test/units/utils/test_isidentifier.py::test_invalid_identifier[1234]", "test/units/utils/test_isidentifier.py::test_invalid_identifier[1234abc]", "test/uni... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-1ee70fc272aff6bf3415357c6e13c5de5b928d9b-v1055803c3a812189a1133297f7f5468579283f86 | true | null | 1 | 63 | 1 | 1,331 | 0 | 0.95 | 1 | 0.7 | 1 | 0.431833 | 86.7955 | |
763 | swe_gym::train::436 | swe_gym | train | 436 | python__mypy-15449 | python/mypy | python/mypy | python | 4012c50382641aa4a15fcb7155f281469bc7a5fa | Add static links for error codes
It would be great to provide a link with a bit more detailed explanation for every error code. For example:
```
main.py:10: error [bad_variance]: Invariant type variable 'T' used in protocol where covariant one is expected
main.py:10: note: See https://mypy-lang.org/error/bad_variance f... | I want to work on this issue. can you tell me where are these errors messages.
@Shivansh-khare you can grep for them in source code, most of them (maybe all?) appear in `messages.py` I think.
@JelleZijlstra Can I hard code it with msg variable or add error_note_function for every error msg as done with incompatible_arg... | diff --git a/mypy/errors.py b/mypy/errors.py
--- a/mypy/errors.py
+++ b/mypy/errors.py
@@ -20,8 +20,27 @@
# Show error codes for some note-level messages (these usually appear alone
# and not as a comment for a previous error-level message).
SHOW_NOTE_CODES: Final = {codes.ANNOTATION_UNCHECKED}
+
+# Do not add notes... | diff --git a/test-data/unit/check-flags.test b/test-data/unit/check-flags.test
--- a/test-data/unit/check-flags.test
+++ b/test-data/unit/check-flags.test
@@ -2195,3 +2195,18 @@ cb(lambda x: a) # OK
fn = lambda x: a
cb(fn)
+
+[case testShowErrorCodeLinks]
+# flags: --show-error-codes --show-error-code-links
+
+x: ... | ["mypy/test/testcheck.py::TypeCheckSuite::check-flags.test::testShowErrorCodeLinks"] | [] | null | true | 2023-06-15T22:15:09Z | 3 | 85 | 1 | 690 | 0 | 0.85 | 1 | 0.7 | 1 | 0.398333 | 86.795 | |
764 | swe_bench_pro::test::593 | swe_bench_pro | test | 593 | instance_qutebrowser__qutebrowser-5cef49ff3074f9eab1da6937a141a39a20828502-v02ad04386d5238fe2d1a1be450df257370de4b6a | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | c41f152fa5b0bc44e15779e99706d7fb8431de85 | # Improve process termination messages for signals in `guiprocess`.
## Description.
Currently, when a process managed by guiprocess ends due to a signal, the output shown to the user is either generic or misleading. A process that crashes with `SIGSEGV` and a process terminated with `SIGTERM` both produce similar mess... | ## Requirements
- Implement the method `was_sigterm` in the process outcome class in `qutebrowser/misc/guiprocess.py` to report whether a process terminated with a SIGTERM signal after completion, and ensure it integrates with the logic of `state_str` to reflect the process state as "terminated" when applicable.
- Imp... | diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index bbbf584cbf4..2c1763afcb6 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -139,6 +139,10 @@ Changed
- When a process fails, the error message now suggests using `:process PID` with
the correct PID (rather than always showing the l... | diff --git a/tests/unit/misc/test_guiprocess.py b/tests/unit/misc/test_guiprocess.py
index a272ff0964f..198da81e012 100644
--- a/tests/unit/misc/test_guiprocess.py
+++ b/tests/unit/misc/test_guiprocess.py
@@ -21,6 +21,7 @@
import sys
import logging
+import signal
import pytest
from qutebrowser.qt.core import QP... | ["tests/unit/misc/test_guiprocess.py::test_start_verbose", "tests/unit/misc/test_guiprocess.py::test_exit_signal[Signals.SIGSEGV-Testprocess crashed with status 11 (SIGSEGV).-crashed-False]", "tests/unit/misc/test_guiprocess.py::test_exit_signal[Signals.SIGTERM-Testprocess terminated with status 15 (SIGTERM).-terminate... | ["tests/unit/misc/test_guiprocess.py::TestProcessCommand::test_no_process", "tests/unit/misc/test_guiprocess.py::TestProcessCommand::test_last_pid", "tests/unit/misc/test_guiprocess.py::TestProcessCommand::test_explicit_pid", "tests/unit/misc/test_guiprocess.py::TestProcessCommand::test_inexistent_pid", "tests/unit/mis... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-5cef49ff3074f9eab1da6937a141a39a20828502-v02ad04386d5238fe2d1a1be450df257370de4b6a | true | null | 2 | 43 | 3 | 1,700 | 0 | 0.95 | 1 | 0.7 | 1 | 0.426667 | 86.78 | |
765 | swe_bench_verified::test::417 | swe_bench_verified | test | 417 | sphinx-doc__sphinx-9367 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 6918e69600810a4664e53653d6ff0290c3c4a788 | 1-element tuple rendered incorrectly
**Describe the bug**
This is a followup to #7964 which has been addressed in #8265.
However the special case of a 1-element tuple is still not handled correctly.
`(1,)` is rendered as `(1)`, but should keep the trailing comma.
**To Reproduce**
Add a testcase
```
("(1,)", "(1,... | diff --git a/sphinx/pycode/ast.py b/sphinx/pycode/ast.py
--- a/sphinx/pycode/ast.py
+++ b/sphinx/pycode/ast.py
@@ -213,10 +213,12 @@ def visit_UnaryOp(self, node: ast.UnaryOp) -> str:
return "%s %s" % (self.visit(node.op), self.visit(node.operand))
def visit_Tuple(self, node: ast.Tuple) -> str:
- ... | diff --git a/tests/test_pycode_ast.py b/tests/test_pycode_ast.py
--- a/tests/test_pycode_ast.py
+++ b/tests/test_pycode_ast.py
@@ -53,8 +53,9 @@
("+ a", "+ a"), # UAdd
("- 1", "- 1"), # UnaryOp
("- a", "- a"), # USub
- ... | ["tests/test_pycode_ast.py::test_unparse[(1,)-(1,)]"] | ["tests/test_pycode_ast.py::test_unparse[a", "tests/test_pycode_ast.py::test_unparse[os.path-os.path]", "tests/test_pycode_ast.py::test_unparse[1", "tests/test_pycode_ast.py::test_unparse[b'bytes'-b'bytes']", "tests/test_pycode_ast.py::test_unparse[object()-object()]", "tests/test_pycode_ast.py::test_unparse[1234-1234_... | null | true | 2021-06-20T17:49:40Z | 1 | 8 | 1 | 494 | 0 | 1 | 1 | 0.7 | 1 | 0.109 | 86.777 | ||
766 | swe_gym::train::1109 | swe_gym | train | 1,109 | pydantic__pydantic-6115 | pydantic/pydantic | pydantic/pydantic | python | b2f9f9bbfd08fa5ca6cf1e053745ec0a0877b54e | explicit additionalProperties even when model_config["extra"] != "forbid"
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
Currently additionalProperties in the model_schema is only set for "forbid".
Due to the evaluation of missi... | I would rather not add `additionalProperties` for ignore because we will never return extra properties, and if we did it only for validation mode (and not serialization mode) it would mean the vast majority of models would have different schemas for validation and serialization, which isn't ideal. And because we are th... | diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py
--- a/pydantic/_internal/_generate_schema.py
+++ b/pydantic/_internal/_generate_schema.py
@@ -746,7 +746,6 @@ def _typed_dict_schema(self, typed_dict_cls: Any, origin: Any) -> core_schema.Co
td_schema = core_schema... | diff --git a/tests/test_json_schema.py b/tests/test_json_schema.py
--- a/tests/test_json_schema.py
+++ b/tests/test_json_schema.py
@@ -31,8 +31,9 @@
import pytest
from pydantic_core import CoreSchema, core_schema, to_json
-from typing_extensions import Annotated, Literal
+from typing_extensions import Annotated, Li... | ["tests/test_json_schema.py::test_model_with_extra_allow", "tests/test_json_schema.py::test_typeddict_with_extra_allow", "tests/test_json_schema.py::test_dataclass_with_extra_allow", "tests/test_types_typeddict.py::test_typeddict_extra_default[t_e.TypedDict]"] | ["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_schema_attributes", "tests/test_json_schema.py::test_secrets_schema[min-max-constraints-SecretStr]", "tests/test_json_schema.py::test_dataclass_with_extra_ignore", "tests/test_json_schema.py::test_constraints_schema_serialization[kwar... | null | true | 2023-06-13T14:04:47Z | 2 | 32 | 4 | 1,681 | 0 | 0.85 | 1 | 0.7 | 1 | 0.386833 | 86.7605 | |
767 | swe_bench_pro::test::195 | swe_bench_pro | test | 195 | instance_flipt-io__flipt-5af0757e96dec4962a076376d1bedc79de0d4249 | flipt-io/flipt | flipt-io/flipt | go | d94448d3351ee69fd384b55f329003097951fe07 | # Title: OIDC login affected by non-compliant session domain and callback URL with trailing slash
## Description
When a session-compatible authentication method is used to enable OIDC login, the `authentication.session.domain` configuration value may include a scheme and port (for example, `"http://localhost:8080"`).... | ## Requirements
- The function `(*AuthenticationConfig).validate()` must normalize the `Session.Domain` field by removing any scheme (`"http://"`, `"https://"`) as well as the port, preserving only the host name and overwriting `Session.Domain` with that value. This normalization must occur when a session-compatible au... | diff --git a/internal/config/authentication.go b/internal/config/authentication.go
index b01cd050de..c8a7ce1f4a 100644
--- a/internal/config/authentication.go
+++ b/internal/config/authentication.go
@@ -2,6 +2,7 @@ package config
import (
"fmt"
+ "net/url"
"strings"
"time"
@@ -107,11 +108,32 @@ func (c *Auth... | diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 592076e66d..036644d6b7 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -388,6 +388,32 @@ func TestLoad(t *testing.T) {
path: "./testdata/authentication/zero_grace_period.yml",
wantErr: errPo... | ["TestLoad", "TestCallbackURL"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-5af0757e96dec4962a076376d1bedc79de0d4249 | true | null | 3 | 43 | 2 | 1,649 | 0 | 0.95 | 1 | 0.7 | 1 | 0.418167 | 86.7545 | |
768 | swe_gym::train::166 | swe_gym | train | 166 | getmoto__moto-6049 | getmoto/moto | getmoto/moto | python | 2c9c7a7a63e7ca0526e433f76902c40801ab02cc | Error creating secret with moto_server
Hello,
I'm using moto_server with command : `moto_server -p4566`.
When I try to create a simple aws secrets with Terraform, I get the following error, with no trace in moto :
```
│ Error: reading Secrets Manager Secret (arn:aws:secretsmanager:<region>:123456789012:secret:test-t... | Looks like we're returning a `None` value where TF expects an empty string, somehow, somewhere. Marking it as a bug. | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -87,6 +87,7 @@ def __init__(
self.rotation_lambda_arn = ""
self.auto_rotate_after_days = 0
self.deleted_date = None
+ self.policy = None... | diff --git a/tests/terraformtests/terraform-tests.success.txt b/tests/terraformtests/terraform-tests.success.txt
--- a/tests/terraformtests/terraform-tests.success.txt
+++ b/tests/terraformtests/terraform-tests.success.txt
@@ -452,6 +452,14 @@ s3:
- TestAccS3ObjectsDataSource_fetchOwner
sagemaker:
- TestAccSageM... | ["tests/test_secretsmanager/test_policy.py::test_get_initial_policy", "tests/test_secretsmanager/test_policy.py::test_policies_for_unknown_secrets", "tests/test_secretsmanager/test_policy.py::test_delete_resource_policy", "tests/test_secretsmanager/test_policy.py::test_put_resource_policy"] | [] | null | true | 2023-03-09 23:44:27 | 2 | 64 | 4 | 1,025 | 0 | 0.85 | 1 | 0.7 | 1 | 0.384167 | 86.7525 | |
769 | swe_gym::train::196 | swe_gym | train | 196 | getmoto__moto-5420 | getmoto/moto | getmoto/moto | python | 3e6394e641f29110ed29deb2e9806e2f9cb7106f | AWSLambda create_function_url_config unsupported
## boto3 function url capabilities are unsupported
AWS added function url as a new feature called function url. I am trying to test some features around this. I'm getting a client error when calling the create_function_url_config method
This is something that needs to ... | Thanks for raising this @liadbenari! Marking it as an enhancement to add this feature. | diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py
--- a/moto/awslambda/exceptions.py
+++ b/moto/awslambda/exceptions.py
@@ -49,6 +49,15 @@ def __init__(self, arn):
super().__init__("ResourceNotFoundException", f"Function not found: {arn}")
+class FunctionUrlConfigNotFound(LambdaClien... | diff --git a/tests/terraformtests/terraform-tests.success.txt b/tests/terraformtests/terraform-tests.success.txt
--- a/tests/terraformtests/terraform-tests.success.txt
+++ b/tests/terraformtests/terraform-tests.success.txt
@@ -140,6 +140,7 @@ kms:
lambda:
- TestAccLambdaAlias_
- TestAccLambdaLayerVersion_
+ - T... | ["tests/test_awslambda/test_lambda_function_urls.py::test_delete_function_url_config[FunctionArn]", "tests/test_awslambda/test_lambda_function_urls.py::test_delete_function_url_config[FunctionName]", "tests/test_awslambda/test_lambda_function_urls.py::test_create_function_url_config[FunctionName]", "tests/test_awslambd... | [] | null | true | 2022-08-24 17:15:05 | 4 | 122 | 6 | 4,564 | 0 | 0.85 | 1 | 0.77 | 0.85 | 0.906667 | 86.7525 | |
770 | swe_gym::train::797 | swe_gym | train | 797 | iterative__dvc-5264 | iterative/dvc | iterative/dvc | python | 2ee68b01b0a02d78734b8867013464571bd1b18c | dvc: KeyError on certain configs
Config is
```js
{
remote: {
ahsoka_project_cache: {
url: 'remote://ahsoka/scratch/dvc_project_cache/dvc_dask_use_case/'
},
ahsoka_project_data: {
url: 'remote://ahsoka_user_workspace/dvc_dask_use_case/'
}
},
}
```
dvc versi... | We could dynamically create non-local cache in https://github.com/iterative/dvc/blob/2ee68b01b0a02d78734b8867013464571bd1b18c/dvc/cache/__init__.py#L68 . And we even have https://github.com/iterative/dvc/blob/2ee68b01b0a02d78734b8867013464571bd1b18c/dvc/cache/__init__.py#L75 already. | diff --git a/dvc/cache/__init__.py b/dvc/cache/__init__.py
--- a/dvc/cache/__init__.py
+++ b/dvc/cache/__init__.py
@@ -65,18 +65,23 @@ def __init__(self, repo):
self._cache[Schemes.LOCAL] = _get_cache(repo, settings)
- for scheme in self.CLOUD_SCHEMES:
+ def _initalize_cloud_cache(self, schemes):... | diff --git a/tests/unit/repo/test_repo.py b/tests/unit/repo/test_repo.py
--- a/tests/unit/repo/test_repo.py
+++ b/tests/unit/repo/test_repo.py
@@ -132,3 +132,12 @@ def test_branch_config(tmp_dir, scm):
dvc = Repo(scm=scm, rev="branch")
assert dvc.config["remote"]["branch"]["url"] == "/some/path"
+
+
+def te... | ["tests/unit/repo/test_repo.py::test_dynamic_cache_initalization"] | ["tests/unit/repo/test_repo.py::test_branch_config", "tests/unit/repo/test_repo.py::test_is_dvc_internal", "tests/unit/repo/test_repo.py::test_locked"] | null | true | 2021-01-13T14:35:04Z | 1 | 9 | 1 | 2,122 | 0 | 0.85 | 1 | 0.7 | 1 | 0.383667 | 86.751 | |
771 | swe_bench_verified::test::428 | swe_bench_verified | test | 428 | sympy__sympy-12481 | sympy/sympy | sympy/sympy | python | c807dfe7569692cad24f02a08477b70c1679a4dd | `Permutation` constructor fails with non-disjoint cycles
Calling `Permutation([[0,1],[0,1]])` raises a `ValueError` instead of constructing the identity permutation. If the cycles passed in are non-disjoint, they should be applied in left-to-right order and the resulting permutation should be returned.
This should be... | diff --git a/sympy/combinatorics/permutations.py b/sympy/combinatorics/permutations.py
--- a/sympy/combinatorics/permutations.py
+++ b/sympy/combinatorics/permutations.py
@@ -895,12 +895,8 @@ def __new__(cls, *args, **kwargs):
# counting starts from 1.
temp = flatten(args)
- if has_dups(temp)... | diff --git a/sympy/combinatorics/tests/test_permutations.py b/sympy/combinatorics/tests/test_permutations.py
--- a/sympy/combinatorics/tests/test_permutations.py
+++ b/sympy/combinatorics/tests/test_permutations.py
@@ -339,6 +339,7 @@ def test_args():
assert Permutation([[1], [4, 2]], size=1) == Permutation([0, 1,... | ["test_args"] | ["test_Permutation", "test_josephus", "test_ranking", "test_mul", "test_Cycle", "test_from_sequence", "test_printing_cyclic"] | null | true | 2017-04-03T01:52:33Z | 1 | 8 | 1 | 404 | 0 | 1 | 1 | 0.7 | 1 | 0.094 | 86.732 | ||
772 | swe_bench_pro::test::314 | swe_bench_pro | test | 314 | instance_gravitational__teleport-0ecf31de0e98b272a6a2610abe1bbedd379a38a3-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | gravitational/teleport | gravitational/teleport | go | b1da3b3054e2394b81f8c14a274e64fb43136602 | # Terminal remains locked after exiting `tsh login` in Bash
## Expected behavior:
Upon completing or interrupting `tsh login`, the terminal should immediately restore its normal state (input echo enabled and line controls active).
## Current behavior:
In Bash, when performing either of these actions:
* Interruptin... | ## Requirements
- The `ContextReader` must restore the terminal state when a password read is abandoned or when the reader is closed while in password mode.
- The `maybeRestoreTerm` helper must restore the terminal only if the state is `readerStatePassword` and a previous terminal state exists, and it must return any r... | diff --git a/lib/utils/prompt/context_reader.go b/lib/utils/prompt/context_reader.go
index 01d4371339d17..7e7b659b3213e 100644
--- a/lib/utils/prompt/context_reader.go
+++ b/lib/utils/prompt/context_reader.go
@@ -22,6 +22,7 @@ import (
"errors"
"io"
"os"
+ "os/signal"
"sync"
"github.com/gravitational/trace"... | diff --git a/lib/utils/prompt/context_reader_test.go b/lib/utils/prompt/context_reader_test.go
index 83b26b11cc234..e58fc1c58f714 100644
--- a/lib/utils/prompt/context_reader_test.go
+++ b/lib/utils/prompt/context_reader_test.go
@@ -155,13 +155,11 @@ func TestContextReader_ReadPassword(t *testing.T) {
t.Run("password... | ["TestContextReader", "TestContextReader_ReadPassword", "TestNotifyExit_restoresTerminal"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-0ecf31de0e98b272a6a2610abe1bbedd379a38a3-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | true | null | 3 | 79 | 3 | 879 | 0 | 0.95 | 1 | 0.7 | 1 | 0.409833 | 86.7295 | |
773 | swe_bench_pro::test::376 | swe_bench_pro | test | 376 | instance_internetarchive__openlibrary-00bec1e7c8f3272c469a58e1377df03f955ed478-v13642507b4fc1f8d234172bf8129942da2c2ca26 | internetarchive/openlibrary | internetarchive/openlibrary | python | 02f647f7d525286b6e3a661133c3772649e585cd | ## Title:
Import API rejects differentiable records when other metadata is missing
#### Description:
In the OpenLibrary import flow, records that include at least one strong identifier (e.g., ISBN-10/ISBN-13/LCCN) but lack some bibliographic metadata are being rejected. This prevents the incorporation of editions th... | ## Requirements
- The decision to accept a record rests with `import_validator.validate(data: dict[str, Any]) -> bool`, which should return `True` if the record meets at least one of the defined criteria and should raise `pydantic.ValidationError` if it meets none.
- A record is complete only if `title` is non-empty, ... | diff --git a/openlibrary/plugins/importapi/code.py b/openlibrary/plugins/importapi/code.py
index 327ebf8a842..bdb5f17bd32 100644
--- a/openlibrary/plugins/importapi/code.py
+++ b/openlibrary/plugins/importapi/code.py
@@ -104,9 +104,9 @@ def parse_data(data: bytes) -> tuple[dict | None, str | None]:
# This is t... | diff --git a/openlibrary/plugins/importapi/tests/test_import_validator.py b/openlibrary/plugins/importapi/tests/test_import_validator.py
index e21f26620..2fe257548 100644
--- a/openlibrary/plugins/importapi/tests/test_import_validator.py
+++ b/openlibrary/plugins/importapi/tests/test_import_validator.py
@@ -20,6 +20,12... | ["openlibrary/plugins/importapi/tests/test_import_validator.py::test_validate_isolated_strong_identifier[isbn_10-value0]", "openlibrary/plugins/importapi/tests/test_import_validator.py::test_validate_isolated_strong_identifier[lccn-value1]", "openlibrary/plugins/importapi/tests/test_import_validator.py::test_validate_m... | ["openlibrary/plugins/importapi/tests/test_import_validator.py::test_create_an_author_with_no_name", "openlibrary/plugins/importapi/tests/test_import_validator.py::test_validate", "openlibrary/plugins/importapi/tests/test_import_validator.py::test_validate_empty_list[authors]", "openlibrary/plugins/importapi/tests/test... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-00bec1e7c8f3272c469a58e1377df03f955ed478-v13642507b4fc1f8d234172bf8129942da2c2ca26 | true | null | 2 | 69 | 5 | 1,056 | 0 | 0.95 | 1 | 0.7 | 1 | 0.406 | 86.718 | |
774 | swe_bench_pro::test::602 | swe_bench_pro | test | 602 | instance_qutebrowser__qutebrowser-7f9713b20f623fc40473b7167a082d6db0f0fd40-va0fd88aac89cde702ec1ba84877234da33adce8a | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 142f019c7a262e95eb1957ad0766c7a51621109b | ## Title: JPG files don't show up in file picker when filetypes are restricted to images
## Description
JPG files are not displayed in the file picker when a webpage restricts accepted file types to images. This issue occurs in specific Qt versions (≥6.2.3 and <6.7.0) where certain MIME type extensions are not properl... | ## Requirements
- The `extra_suffixes_workaround` function must accept a list of MIME types and filename extensions, then return a set of additional filename extensions that are missing from the input but must be included for proper file picker functionality.
- The function must only apply the workaround for Qt versio... | diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index cec2f2b8439..774ba3a183d 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -58,6 +58,8 @@ Fixed
with many files. (#7925)
- The app.slack.com User-Agent quirk now targets chromium 112 on Qt versions
lower than 6.6.0 (previously i... | diff --git a/tests/unit/browser/webengine/test_webview.py b/tests/unit/browser/webengine/test_webview.py
index 98bf34f3b..416e65d0e 100644
--- a/tests/unit/browser/webengine/test_webview.py
+++ b/tests/unit/browser/webengine/test_webview.py
@@ -4,11 +4,13 @@
import re
import dataclasses
+import mimetypes
import ... | ["tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before0-extra0]", "tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before1-extra1]", "tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before2-extra2]", "... | ["tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming0-NavigationTypeLinkClicked-link_clicked]", "tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming1-NavigationTypeTyped-typed]", "tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming2-NavigationTypeBackForwa... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-7f9713b20f623fc40473b7167a082d6db0f0fd40-va0fd88aac89cde702ec1ba84877234da33adce8a | true | null | 3 | 63 | 15 | 1,174 | 0 | 0.95 | 1 | 0.7 | 1 | 0.405667 | 86.717 | |
775 | swe_gym::train::1020 | swe_gym | train | 1,020 | dask__dask-8185 | dask/dask | dask/dask | python | 9460bc4ed1295d240dd464206ec81b82d9f495e2 | Inconsistent Tokenization due to Lazy Registration
I am running into a case where objects are inconsistently tokenized due to lazy registration of pandas dispatch handlers.
Here is a minimal, reproducible example:
```
import dask
import pandas as pd
class CustomDataFrame(pd.DataFrame):
pass
custom_df = CustomDa... | Thanks for writing this up @v1shanker! I looked at it at the time but forgot to write down what I found :facepalm: Looking at it again now I can't quite figure out what the behavior should be. Regardless of whether I've tokenized a pandas object or not, I get a different hash every time I call `dask.base.tokenize(custo... | diff --git a/dask/utils.py b/dask/utils.py
--- a/dask/utils.py
+++ b/dask/utils.py
@@ -544,28 +544,26 @@ def wrapper(func):
def dispatch(self, cls):
"""Return the function implementation for the given ``cls``"""
- # Fast path with direct lookup on cls
lk = self._lookup
- try:
- ... | diff --git a/dask/tests/test_utils.py b/dask/tests/test_utils.py
--- a/dask/tests/test_utils.py
+++ b/dask/tests/test_utils.py
@@ -161,6 +161,38 @@ def register_decimal():
assert foo(1) == 1
+def test_dispatch_lazy_walks_mro():
+ """Check that subclasses of classes with lazily registered handlers still
+ ... | ["dask/tests/test_utils.py::test_dispatch_lazy_walks_mro"] | ["dask/tests/test_utils.py::test_extra_titles", "dask/tests/test_utils.py::test_itemgetter", "dask/tests/test_utils.py::test_dispatch", "dask/tests/test_utils.py::test_derived_from", "dask/tests/test_utils.py::test_funcname_numpy_vectorize", "dask/tests/test_utils.py::test_format_bytes[976465428.48-0.91", "dask/tests/t... | null | true | 2021-09-27T19:15:59Z | 1 | 40 | 1 | 1,432 | 0 | 0.85 | 1 | 0.7 | 1 | 0.372 | 86.716 | |
776 | swe_bench_verified::test::425 | swe_bench_verified | test | 425 | sympy__sympy-11618 | sympy/sympy | sympy/sympy | python | 360290c4c401e386db60723ddb0109ed499c9f6e | distance calculation wrong
``` python
>>> Point(2,0).distance(Point(1,0,2))
1
```
The 3rd dimension is being ignored when the Points are zipped together to calculate the distance so `sqrt((2-1)**2 + (0-0)**2)` is being computed instead of `sqrt(5)`. | diff --git a/sympy/geometry/point.py b/sympy/geometry/point.py
--- a/sympy/geometry/point.py
+++ b/sympy/geometry/point.py
@@ -266,6 +266,20 @@ def distance(self, p):
sqrt(x**2 + y**2)
"""
+ if type(p) is not type(self):
+ if len(p) == len(self):
+ return sqrt(sum([(... | diff --git a/sympy/geometry/tests/test_point.py b/sympy/geometry/tests/test_point.py
--- a/sympy/geometry/tests/test_point.py
+++ b/sympy/geometry/tests/test_point.py
@@ -243,6 +243,11 @@ def test_issue_9214():
assert Point3D.are_collinear(p1, p2, p3) is False
+def test_issue_11617():
+ p1 = Point3D(1,0,2)
... | ["test_issue_11617"] | ["test_point3D", "test_Point2D", "test_issue_9214", "test_transform"] | null | true | 2016-09-15T20:01:58Z | 1 | 14 | 1 | 250 | 0 | 1 | 1 | 0.7 | 1 | 0.088333 | 86.715 | ||
777 | swe_gym::train::857 | swe_gym | train | 857 | iterative__dvc-1907 | iterative/dvc | iterative/dvc | python | 8ef52f92ee262bdc76b24955c72a5df18b6eb1a5 | dvc metrics: show metrics across branches fails with file does not exist
DVC version 0.35.7
```
dvc metrics show -a -v
ERROR: failed to show metrics - 'data/data-2010-2016.h5.dvc' does not exist.
------------------------------------------------------------
Traceback (most recent call last):
File "/Users/frag/minicon... | Discord context https://discordapp.com/channels/485586884165107732/485596304961962003/567370634741415936
Turns out @fgadaleta had to cd to root of repo, then problem disappeared. When fixing we should either gather metrics starting with root and not `cwd` or display some more meaningful error.
@pared Clearly for `dvc m... | diff --git a/dvc/scm/git/tree.py b/dvc/scm/git/tree.py
--- a/dvc/scm/git/tree.py
+++ b/dvc/scm/git/tree.py
@@ -109,7 +109,7 @@ def _walk(
tree.abspath, ignore_file_handler=ignore_file_handler
)
dirs, nondirs = dvc_ignore_filter(tree.path, dirs, nondirs)
- yi... | diff --git a/tests/func/test_metrics.py b/tests/func/test_metrics.py
--- a/tests/func/test_metrics.py
+++ b/tests/func/test_metrics.py
@@ -279,6 +279,33 @@ def test_formatted_output(self):
assert expected_txt in stdout
assert expected_json in stdout
+ def test_show_all_should_be_current_dir_agnos... | ["tests/func/test_tree.py::TestWalkInGit::test_nobranch", "tests/func/test_tree.py::TestWalkInGit::test_branch", "tests/func/test_metrics.py::TestMetricsCLI::test_show_all_should_be_current_dir_agnostic", "tests/func/test_tree.py::TestWalkInNoSCM::test_subdir", "tests/func/test_metrics.py::TestMetrics::test_show_all_sh... | ["tests/func/test_tree.py::TestWorkingTree::test_isdir", "tests/func/test_metrics.py::TestMetricsRecursive::test", "tests/func/test_metrics.py::TestMetrics::test_formatted_output", "tests/func/test_metrics.py::TestMetrics::test_xpath_is_none", "tests/func/test_metrics.py::TestMetricsType::test_show", "tests/func/test_m... | null | true | 2019-04-20T02:00:55Z | 2 | 6 | 5 | 2,109 | 0 | 0.85 | 1 | 0.7 | 1 | 0.3715 | 86.7145 | |
778 | swe_bench_pro::test::197 | swe_bench_pro | test | 197 | instance_flipt-io__flipt-5ffba3406a7993d97ced4cc13658bee66150fcca | flipt-io/flipt | flipt-io/flipt | go | 02f5a1f8ef79565d6f4efed09259e7bf6541437a | # Title:
Config loader misses DB pool options and update-check flag.
## Description:
The configuration loader does not populate database connection-pool options (idle/open limits and connection lifetime). The update-check flag is also not read from the configuration and remains enabled when it should be possible to di... | ## Requirements
- The `databaseConfig` struct should add the fields `MaxIdleConn` (int), `MaxOpenConn` (int), and `ConnMaxLifetime` (time.Duration), while preserving existing fields like `URL` and `MigrationsPath`.
- The configuration loader `Load(path)` should read the keys `db.max_idle_conn`, `db.max_open_conn`, and... | diff --git a/cmd/flipt/flipt.go b/cmd/flipt/flipt.go
index 83feadf54c..ae2e2755df 100644
--- a/cmd/flipt/flipt.go
+++ b/cmd/flipt/flipt.go
@@ -261,6 +261,15 @@ func run(_ []string) error {
return fmt.Errorf("opening db: %w", err)
}
+ sql.SetMaxIdleConns(cfg.Database.MaxIdleConn)
+
+ if cfg.Database.MaxOpenCo... | diff --git a/config/config_test.go b/config/config_test.go
index c6d80efdcb..7d5f6b9365 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -90,11 +90,14 @@ func TestLoad(t *testing.T) {
CertKey: "./testdata/config/ssl_key.pem",
},
Database: databaseConfig{
- MigrationsPath: "./confi... | ["TestLoad"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-5ffba3406a7993d97ced4cc13658bee66150fcca | true | null | 3 | 56 | 1 | 1,284 | 0 | 0.95 | 1 | 0.7 | 1 | 0.400667 | 86.702 | |
779 | swe_gym::train::1076 | swe_gym | train | 1,076 | pydantic__pydantic-8567 | pydantic/pydantic | pydantic/pydantic | python | 8060fa1cff965850e5e08a67ca73d5272dcdcf9f | Annotated type PlainSerializer not used if placed before PlainValidator
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
Dear pydantic maintainers and community.
Thank you very much for your time, your code and the documentation that comes along. All of them are very useful to me.
I've... | @Anvil,
Thanks for reporting this. This does look like a bug 🐛. We'll work on a fix for this unexpected behavior 👍.
Thank you for your reply.
I've conducted a little experiment, that you might consider interesting:
```python
import json
from itertools import combinations, chain, permutations
from typing ... | diff --git a/pydantic/functional_validators.py b/pydantic/functional_validators.py
--- a/pydantic/functional_validators.py
+++ b/pydantic/functional_validators.py
@@ -153,13 +153,17 @@ class Model(BaseModel):
func: core_schema.NoInfoValidatorFunction | core_schema.WithInfoValidatorFunction
def __get_pydanti... | diff --git a/tests/test_validators.py b/tests/test_validators.py
--- a/tests/test_validators.py
+++ b/tests/test_validators.py
@@ -20,6 +20,7 @@
ConfigDict,
Field,
GetCoreSchemaHandler,
+ PlainSerializer,
PydanticDeprecatedSince20,
PydanticUserError,
TypeAdapter,
@@ -2810,3 +2811,19 @@ ... | ["tests/test_validators.py::test_plain_validator_plain_serializer"] | ["tests/test_validators.py::test_v1_validator_signature_kwargs1", "tests/test_validators.py::test_field_that_is_being_validated_is_excluded_from_validator_values", "tests/test_validators.py::test_validator_self", "tests/test_validators.py::test_validator_bad_fields_throws_configerror", "tests/test_validators.py::test_v... | null | true | 2024-01-16T20:23:59Z | 1 | 8 | 1 | 2,028 | 0 | 0.85 | 1 | 0.7 | 1 | 0.364667 | 86.694 | |
780 | swe_gym::train::64 | swe_gym | train | 64 | getmoto__moto-5438 | getmoto/moto | getmoto/moto | python | d145471b3fc001ab537d19bc1ec4ed1e38b7a78a | PartsCount not returned by S3 head object [feature request]
The S3 head object call should return PartsCount under some circumstances.
It's not obvious from the API docs what those circumstances are, but I've tested it in [boto 3137](https://github.com/boto/boto3/issues/3137).
PartsCount should be returned if and onl... | Thanks for raising this and providing the test case @mdavis-xyz :+1: | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -1579,6 +1579,12 @@ def _key_response_head(self, bucket_name, query, key_name, headers):
if if_none_match and key.etag == if_none_match:
return 304, response_headers, "Not Modi... | diff --git a/tests/test_s3/test_s3_multipart.py b/tests/test_s3/test_s3_multipart.py
--- a/tests/test_s3/test_s3_multipart.py
+++ b/tests/test_s3/test_s3_multipart.py
@@ -969,3 +969,43 @@ def test_generate_presigned_url_on_multipart_upload_without_acl():
)
res = requests.get(url)
res.status_code.should.e... | ["tests/test_s3/test_s3_multipart.py::test_head_object_returns_part_count"] | ["tests/test_s3/test_s3_multipart.py::test_multipart_upload_should_return_part_10000", "tests/test_s3/test_s3_multipart.py::test_complete_multipart_with_empty_partlist", "tests/test_s3/test_s3_multipart.py::test_multipart_list_parts", "tests/test_s3/test_s3_multipart.py::test_multipart_version", "tests/test_s3/test_s3_... | null | true | 2022-08-31 16:23:34 | 1 | 6 | 1 | 2,056 | 0 | 0.85 | 1 | 0.7 | 1 | 0.362667 | 86.688 | |
781 | swe_gym::train::34 | swe_gym | train | 34 | getmoto__moto-5812 | getmoto/moto | getmoto/moto | python | 031f89dee00c6a5e01ac41c430d701508988f146 | Multiple iot-data publish calls lead to None topic
Calling
`boto3.client('iot-data', region_name='eu-central-1').publish(
topic = my_topic,
payload = my_payload,
qos = 1
)`
More than once, causes the topic for all calls after the first one to be `None` inside `moto.iotdata.models.iotdata_backen... | Thanks for raising this and providing the repro-case @lorenzo-eng! Marking this as a bug. | diff --git a/moto/iotdata/responses.py b/moto/iotdata/responses.py
--- a/moto/iotdata/responses.py
+++ b/moto/iotdata/responses.py
@@ -8,6 +8,12 @@ class IoTDataPlaneResponse(BaseResponse):
def __init__(self):
super().__init__(service_name="iot-data")
+ def _get_action(self) -> str:
+ if self.... | diff --git a/.github/workflows/test_outdated_versions.yml b/.github/workflows/test_outdated_versions.yml
--- a/.github/workflows/test_outdated_versions.yml
+++ b/.github/workflows/test_outdated_versions.yml
@@ -41,7 +41,7 @@ jobs:
- name: Run tests
run: |
- pytest -sv tests/test_core ./tests/test_a... | ["tests/test_iotdata/test_iotdata.py::test_publish"] | ["tests/test_iotdata/test_iotdata.py::test_basic", "tests/test_iotdata/test_iotdata.py::test_update", "tests/test_iotdata/test_iotdata.py::test_delete_field_from_device_shadow"] | null | true | 2023-01-03 19:51:05 | 2 | 29 | 1 | 1,594 | 0 | 0.85 | 1 | 0.7 | 1 | 0.362333 | 86.687 | |
782 | swe_gym::train::245 | swe_gym | train | 245 | getmoto__moto-6919 | getmoto/moto | getmoto/moto | python | 368fa07ec35aa6806c839a1f4883426159179127 | add support to ec2 describe-key-pairs with filters
### Overview
Implement support for describe_key_pairs with filter option.
### Steps to reproduce
```shell
awslocal ec2 describe-key-pairs --region us-east-2 --filters "Name=tag:ManagedBy,Values=hyperswitch"
```
following is the error
```shell
An error occurred (Intern... | Hi @inventvenkat, that filter isn't supported by AWS either, as far as I can tell?
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/describe_key_pairs.html only lists `key-pair-id`, `fingerprint`, `key-name`, `tag-key` and `tag`.
Edit: We have internal tests for the `fingerpr... | diff --git a/moto/ec2/models/key_pairs.py b/moto/ec2/models/key_pairs.py
--- a/moto/ec2/models/key_pairs.py
+++ b/moto/ec2/models/key_pairs.py
@@ -1,8 +1,7 @@
-from typing import Any, Dict, List
+from typing import Any, Dict, List, Optional
-from moto.core import BaseModel
+from .core import TaggedEC2Resource
from .... | diff --git a/tests/test_ec2/test_key_pairs.py b/tests/test_ec2/test_key_pairs.py
--- a/tests/test_ec2/test_key_pairs.py
+++ b/tests/test_ec2/test_key_pairs.py
@@ -254,3 +254,51 @@ def test_key_pair_filters_boto3():
Filters=[{"Name": "fingerprint", "Values": [kp3.key_fingerprint]}]
)["KeyPairs"]
asser... | ["tests/test_ec2/test_key_pairs.py::test_key_pair_with_tags"] | ["tests/test_ec2/test_key_pairs.py::test_key_pairs_import_exist_boto3", "tests/test_ec2/test_key_pairs.py::test_key_pairs_import_boto3[rsa-openssh]", "tests/test_ec2/test_key_pairs.py::test_key_pairs_delete_exist_boto3", "tests/test_ec2/test_key_pairs.py::test_key_pairs_invalid_id_boto3", "tests/test_ec2/test_key_pairs... | null | true | 2023-10-15 19:15:25 | 2 | 82 | 1 | 534 | 0 | 0.85 | 1 | 0.7 | 1 | 0.362333 | 86.687 | |
783 | swe_gym::train::1046 | swe_gym | train | 1,046 | pydantic__pydantic-5506 | pydantic/pydantic | pydantic/pydantic | python | e70165c1c669fdf6db3ae026de57817a395429d3 | V2 doesn't support bound enum generics
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
Provided code example raises the following error:
```
pydantic_core._pydantic_core.SchemaError: Error building "model" validator:
SchemaError... | Thanks for reporting, I think we can make this work.
@samuelcolvin I see two ways to resolve this:
* Option 1: Use an `is_instance_schema` for enums with no cases — this seems sensible to me because 1, there's nothing that would pass validation, and 2, python already has a specific check for whether an enum class ha... | diff --git a/pydantic/_internal/_std_types_schema.py b/pydantic/_internal/_std_types_schema.py
--- a/pydantic/_internal/_std_types_schema.py
+++ b/pydantic/_internal/_std_types_schema.py
@@ -63,49 +63,56 @@ def timedelta_schema(_schema_generator: GenerateSchema, _t: type[Any]) -> core_s
@schema_function(Enum)
def e... | diff --git a/tests/test_discriminated_union.py b/tests/test_discriminated_union.py
--- a/tests/test_discriminated_union.py
+++ b/tests/test_discriminated_union.py
@@ -350,8 +350,10 @@ class FooStrEnum(str, Enum):
ENUM_TEST_CASES = [
- pytest.param(Enum, {'a': 1, 'b': 2}, marks=pytest.mark.xfail(reason='Plain En... | ["tests/test_types.py::test_int_enum_type", "tests/test_generics.py::test_generic_intenum_bound", "tests/test_types.py::test_plain_enum_validate", "tests/test_types.py::test_enum_from_json[False-Enum]", "tests/test_generics.py::test_generic_enum_bound", "tests/test_types.py::test_enum_from_json[False-IntEnum]", "tests/... | ["tests/test_discriminated_union.py::test_discriminated_annotated_union", "tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_types.py::test_default_validators[date_check-value106-result106]", "tests/test_types.py::te... | null | true | 2023-04-17T19:36:29Z | 1 | 47 | 10 | 1,225 | 0 | 0.85 | 1 | 0.7 | 1 | 0.360833 | 86.6825 | |
784 | swe_gym::train::1892 | swe_gym | train | 1,892 | facebookresearch__hydra-1542 | facebookresearch/hydra | facebookresearch/hydra | python | 2bfc862db454a985187bfb6d7abff2a569d58892 | [Bug] --cfg=hydra CLI fails if top-level config is read-only
# 🐛 Bug
## Description
The --cfg=hydra flag on the command line fails when the top-level node is read-only
```bash
$ cd ~/hydra.git/examples/patterns/write_protect_config_node/
$ python frozen.py
{'baud_rate': 19200, 'data_bits': 8, 'stop_bits': 1}
$ python ... | nice catch, want to send a PR? :)
Sure, will do.
Related issues:
--hydra-help, --help
| diff --git a/hydra/_internal/hydra.py b/hydra/_internal/hydra.py
--- a/hydra/_internal/hydra.py
+++ b/hydra/_internal/hydra.py
@@ -7,7 +7,7 @@
from collections import defaultdict
from typing import Any, Callable, DefaultDict, List, Optional, Sequence, Type, Union
-from omegaconf import Container, DictConfig, OmegaC... | diff --git a/tests/test_hydra.py b/tests/test_hydra.py
--- a/tests/test_hydra.py
+++ b/tests/test_hydra.py
@@ -1227,10 +1227,31 @@ def test_hydra_main_without_config_path(tmpdir: Path) -> None:
@hydra.main()
"""
)
-
assert_regex_match(
from_line=expected,
to_line=err,
... | ["tests/test_hydra.py::test_frozen_primary_config[overrides1-frozen]", "tests/test_hydra.py::test_frozen_primary_config[overrides0-19200]", "tests/test_hydra.py::test_frozen_primary_config[overrides2-baud_rate:", "tests/test_hydra.py::test_frozen_primary_config[overrides4-frozen"] | ["tests/test_hydra.py::test_hydra_main_rerun[None-tests.test_apps.hydra_main_rerun.my_app]", "tests/test_hydra.py::test_module_env_override[FB_PAR_MAIN_MODULE]", "tests/test_hydra.py::test_hydra_main_rerun[tests/test_apps/hydra_main_rerun/my_app.py-None]", "tests/test_hydra.py::test_config_name_and_path_overrides[cfg2-... | null | true | 2021-04-06T21:29:31Z | 1 | 11 | 4 | 1,928 | 0 | 0.85 | 1 | 0.7 | 1 | 0.358 | 86.674 | |
785 | swe_gym::train::335 | swe_gym | train | 335 | getmoto__moto-6303 | getmoto/moto | getmoto/moto | python | 87d84c12e0e4468f92cb81c6f936dfa4688ffa5c | unable to self copy S3 object in encrypted bucket (regression)
# TLDR
In encrypted buckets, you should be able to copy a file to itself without changes.
I raised a support ticket with AWS a while back to understand the behavior. It's not intuitive.
Note that if the bucket is not encrypted, then the no change error m... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -242,7 +242,7 @@ def response_dict(self) -> Dict[str, Any]: # type: ignore[misc]
res["x-amz-server-side-encryption"] = self.encryption
if self.encryption == "aws:kms" and self.kms_key_id is n... | diff --git a/tests/test_s3/test_s3_copyobject.py b/tests/test_s3/test_s3_copyobject.py
--- a/tests/test_s3/test_s3_copyobject.py
+++ b/tests/test_s3/test_s3_copyobject.py
@@ -682,3 +682,39 @@ def test_copy_object_in_place_website_redirect_location():
head_object = client.head_object(Bucket=bucket_name, Key=key)
... | ["tests/test_s3/test_s3_encryption.py::test_encryption_bucket_key_for_aes_not_returned", "tests/test_s3/test_s3_copyobject.py::test_copy_object_in_place_with_bucket_encryption"] | ["tests/test_s3/test_s3_copyobject.py::test_copy_key_replace_metadata", "tests/test_s3/test_s3_encryption.py::test_encryption_status_on_copied_objects", "tests/test_s3/test_s3_copyobject.py::test_copy_object_from_unversioned_to_versioned_bucket", "tests/test_s3/test_s3_copyobject.py::test_copy_object_in_place_with_meta... | null | true | 2023-05-09 12:48:56 | 1 | 5 | 2 | 4,195 | 0 | 0.85 | 1 | 0.92 | 0.8 | 0.516667 | 86.67 | ||
786 | swe_gym::train::438 | swe_gym | train | 438 | python__mypy-9097 | python/mypy | python/mypy | python | c8bae06919674b9846e3ff864b0a44592db888eb | [Feature request] Recombine complete union of enum literals into original type
This is feature that I think needs to be implemented before I can publish a PR for issue #6113.
```
from enum import Enum
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
x: Color
if x is Color.RED:
pass
reveal_type(x)
```
* ... | Agreed that the error message looks awkward, especially if there are many enum items. Doing this as part of the type checker is my favorite, since I'd prefer if error messages roughly corresponded to the internal representation (unless the implementation is tricky). | diff --git a/mypy/join.py b/mypy/join.py
--- a/mypy/join.py
+++ b/mypy/join.py
@@ -310,8 +310,9 @@ def visit_literal_type(self, t: LiteralType) -> ProperType:
if isinstance(self.s, LiteralType):
if t == self.s:
return t
- else:
- return join_types(self.s.... | diff --git a/test-data/unit/check-enum.test b/test-data/unit/check-enum.test
--- a/test-data/unit/check-enum.test
+++ b/test-data/unit/check-enum.test
@@ -713,6 +713,7 @@ elif x is Foo.C:
reveal_type(x) # N: Revealed type is 'Literal[__main__.Foo.C]'
else:
reveal_type(x) # No output here: this branch is un... | ["mypy/test/testcheck.py::TypeCheckSuite::testEnumReachabilityWithMultipleEnums", "mypy/test/testcheck.py::TypeCheckSuite::testEnumNarrowedToTwoLiterals"] | ["mypy/test/testcheck.py::TypeCheckSuite::testEnumReachabilityChecksWithOrdering"] | null | true | 2020-07-05T15:17:30Z | 2 | 48 | 2 | 1,178 | 0 | 0.85 | 1 | 0.7 | 1 | 0.356333 | 86.669 | |
787 | swe_gym::train::1103 | swe_gym | train | 1,103 | pydantic__pydantic-8004 | pydantic/pydantic | pydantic/pydantic | python | 0a2377e6eba9127e5debe5fda96dfd64a5b2030f | Use `PrivateAttr` with `Annotated` will cause `AttributeError` when getting private attr.
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
```
m._t1=datetime.datetime(2023, 10, 29, 16, 44, 56, 993092)
Traceback (most recent call last):
File "/home/elonzh/.cache/pypoetry/virtualenvs/uno... | Hi @elonzh,
Thanks for reporting this. Looks like a bug around here:
https://github.com/pydantic/pydantic/blob/46f24cee67c4da80166344076679aeb61d2348cc/pydantic/_internal/_model_construction.py#L375-L384
Specifically, I think we want to pull information from the `ann_type` re `default`, `default_factory` etc.
... | diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py
--- a/pydantic/_internal/_model_construction.py
+++ b/pydantic/_internal/_model_construction.py
@@ -9,6 +9,7 @@
from types import FunctionType
from typing import Any, Callable, Generic, Mapping
+import typing_extensio... | diff --git a/tests/test_annotated.py b/tests/test_annotated.py
--- a/tests/test_annotated.py
+++ b/tests/test_annotated.py
@@ -8,6 +8,7 @@
from pydantic import BaseModel, Field, GetCoreSchemaHandler, TypeAdapter, ValidationError
from pydantic.errors import PydanticSchemaGenerationError
+from pydantic.fields import ... | ["tests/test_annotated.py::test_annotated_private_field_with_default"] | ["tests/test_annotated.py::test_field_reuse", "tests/test_annotated.py::test_merge_field_infos_type_adapter", "tests/test_annotated.py::test_get_pydantic_core_schema_source_type", "tests/test_annotated.py::test_predicate_error_python", "tests/test_annotated.py::test_merge_field_infos_model", "tests/test_annotated.py::t... | null | true | 2023-11-03T11:03:39Z | 1 | 9 | 1 | 1,957 | 0 | 0.85 | 1 | 0.7 | 1 | 0.356167 | 86.6685 | |
788 | swe_gym::train::652 | swe_gym | train | 652 | conan-io__conan-10960 | conan-io/conan | conan-io/conan | python | 55d7209c9c89c0ead9c887dbb0fe4ad6b66953ff | [bug] version is not set correctly when using layout
When layout is being used, recipe version is not set correctly somehow using json generator, it seems that version is not being fetched from package metadata when running conan install command!
### Environment Details
* Operating System+version: macos
* Compiler... | @lasote do you have any idea how difficult is this to fix ? or any temporary workaround I could use?
The fix is easy but very very dirty. The thing is, the layout() feature is part of the Conan 2 functionality and the "json" generator is currently not migrated to the 2.0 model, I don't think we are going to provide... | diff --git a/conans/client/generators/json_generator.py b/conans/client/generators/json_generator.py
--- a/conans/client/generators/json_generator.py
+++ b/conans/client/generators/json_generator.py
@@ -3,26 +3,6 @@
from conans.model import Generator
-def serialize_cpp_info(cpp_info):
- keys = [
- "versi... | diff --git a/conans/test/integration/generators/json_test.py b/conans/test/integration/generators/json_test.py
--- a/conans/test/integration/generators/json_test.py
+++ b/conans/test/integration/generators/json_test.py
@@ -13,6 +13,9 @@ def test_generate_json_info(self):
class HelloConan(ConanFile):
exports_sou... | ["conans/test/integration/generators/json_test.py::JsonTest::test_generate_json_info"] | ["conans/test/integration/generators/json_test.py::JsonTest::test_system_libs", "conans/test/integration/generators/json_test.py::JsonTest::test_multiconfig", "conans/test/integration/generators/json_test.py::JsonTest::test_generate_json_filenames", "conans/test/integration/generators/json_test.py::JsonTest::test_gener... | null | true | 2022-04-04T15:21:31Z | 1 | 54 | 1 | 1,055 | 0 | 0.85 | 1 | 0.7 | 1 | 0.355833 | 86.6675 | |
789 | swe_gym::train::1126 | swe_gym | train | 1,126 | pydantic__pydantic-5861 | pydantic/pydantic | pydantic/pydantic | python | 7bc9c6525a81680c0dd9df3558ed5f33345a77c2 | V2: Support forward references in recursive types
Example:
```python
JSON = Union[str, int, float, bool, None, Mapping[str, 'JSON'], List['JSON']]
```
Given how popular this feature request was for MyPy ([https://github.com/python/typing/issues/182](https://github.com/python/typing/issues/182)), I think it would be n... | Even if we don't support this in an initial release, we almost certainly need a better error message:
```python
from typing import List, Mapping, Union
from pydantic import BaseModel
JSON = Union[str, int, float, bool, None, Mapping[str, 'JSON'], List['JSON']]
class A(BaseModel):
x: JSON
model_co... | diff --git a/pydantic/_internal/_core_utils.py b/pydantic/_internal/_core_utils.py
--- a/pydantic/_internal/_core_utils.py
+++ b/pydantic/_internal/_core_utils.py
@@ -4,7 +4,7 @@
from typing import Any, Callable, Iterable, TypeVar, Union, cast
from pydantic_core import CoreSchema, core_schema
-from typing_extension... | diff --git a/tests/test_type_alias_type.py b/tests/test_type_alias_type.py
new file mode 100644
--- /dev/null
+++ b/tests/test_type_alias_type.py
@@ -0,0 +1,303 @@
+import datetime
+from typing import Dict, List, Tuple, TypeVar, Union
+
+import pytest
+from annotated_types import MaxLen
+from typing_extensions import A... | ["tests/test_type_alias_type.py::test_recursive_generic_type_alias", "tests/test_type_alias_type.py::test_type_alias", "tests/test_type_alias_type.py::test_recursive_type_alias", "tests/test_type_alias_type.py::test_type_alias_annotated"] | [] | null | true | 2023-05-25T04:27:48Z | 3 | 63 | 4 | 871 | 0 | 0.85 | 1 | 0.7 | 1 | 0.355167 | 86.6655 | |
790 | swe_bench_pro::test::63 | swe_bench_pro | test | 63 | instance_ansible__ansible-5c225dc0f5bfa677addeac100a8018df3f3a9db1-v173091e2e36d38c978002990795f66cfc0af30ad | ansible/ansible | ansible/ansible | python | d7fbb209b403e782c6e2b7883a106e6dca15b330 | # Introduce public methods to access PlayIterator._host_states
### Description
The PlayIterator class in Ansible currently exposes its internal `_host_states` attribute as private, limiting the ability of users and extensions to intercept and log state changes in a controlled manner. Public methods are needed that al... | ## Requirements
- The implementation must add a `set_state_for_host` instance method on `PlayIterator` that sets a complete `HostState` for a specific host identified by its hostname.
- The `set_state_for_host` method must be used to assign the host state when tasks are inserted for a host, so that calling it with a h... | diff --git a/changelogs/fragments/74416-PlayIterator-_host_states-setters.yml b/changelogs/fragments/74416-PlayIterator-_host_states-setters.yml
new file mode 100644
index 00000000000000..c0c4effec2fd5c
--- /dev/null
+++ b/changelogs/fragments/74416-PlayIterator-_host_states-setters.yml
@@ -0,0 +1,2 @@
+minor_changes:
... | diff --git a/test/units/executor/test_play_iterator.py b/test/units/executor/test_play_iterator.py
index 0ddc1b03640a50..56dd683f250744 100644
--- a/test/units/executor/test_play_iterator.py
+++ b/test/units/executor/test_play_iterator.py
@@ -452,10 +452,10 @@ def test_play_iterator_add_tasks(self):
res_state ... | ["test/units/executor/test_play_iterator.py::TestPlayIterator::test_play_iterator_add_tasks"] | ["test/units/executor/test_play_iterator.py::TestPlayIterator::test_failed_states_deprecation_class_attr", "test/units/executor/test_play_iterator.py::TestPlayIterator::test_failed_states_deprecation_instance_attr", "test/units/executor/test_play_iterator.py::TestPlayIterator::test_host_state", "test/units/executor/tes... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-5c225dc0f5bfa677addeac100a8018df3f3a9db1-v173091e2e36d38c978002990795f66cfc0af30ad | true | null | 3 | 38 | 1 | 1,562 | 0 | 0.95 | 1 | 0.7 | 1 | 0.387 | 86.661 | |
791 | swe_gym::train::242 | swe_gym | train | 242 | getmoto__moto-6332 | getmoto/moto | getmoto/moto | python | 61c475fef7eebc260b4369547aeea086f5208b6a | Tags on spot fleet requests missing from describe-spot-fleet-requests response
I'm trying to filter the response for describe-spot-fleet-requests by tags, but it looks like the response doesn't contain the tags.
To be clear, there are two different TagSpecification fields that AWS supports. One is inside the LaunchSpe... | Marking it as an enhancement @cheshirex!
@bblommers @cheshirex
I'd like to try this enhancement :)
**memo**
There are two parts to set the tags of a Spot Fleet resource in `EC2.Client.request_spot_fleet(**kwargs)`.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/request_spot_... | diff --git a/moto/ec2/exceptions.py b/moto/ec2/exceptions.py
--- a/moto/ec2/exceptions.py
+++ b/moto/ec2/exceptions.py
@@ -436,6 +436,14 @@ def __init__(self, parameter_value: str):
)
+class InvalidParameterValueErrorTagSpotFleetRequest(EC2ClientError):
+ def __init__(self, resource_type: str):
+ ... | diff --git a/tests/test_ec2/test_spot_fleet.py b/tests/test_ec2/test_spot_fleet.py
--- a/tests/test_ec2/test_spot_fleet.py
+++ b/tests/test_ec2/test_spot_fleet.py
@@ -4,6 +4,7 @@
from moto import mock_ec2
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
+from botocore.exceptions import ClientError
from tests... | ["tests/test_ec2/test_spot_fleet.py::test_create_spot_fleet_with_lowest_price", "tests/test_ec2/test_spot_fleet.py::test_create_spot_fleet_with_invalid_tag_specifications"] | ["tests/test_ec2/test_spot_fleet.py::test_modify_spot_fleet_request_up", "tests/test_ec2/test_spot_fleet.py::test_modify_spot_fleet_request_down", "tests/test_ec2/test_spot_fleet.py::test_modify_spot_fleet_request_down_no_terminate_after_custom_terminate", "tests/test_ec2/test_spot_fleet.py::test_request_spot_fleet_usi... | null | true | 2023-05-19 12:08:22 | 3 | 30 | 2 | 1,517 | 0 | 0.85 | 1 | 0.7 | 1 | 0.352833 | 86.6585 | |
792 | swe_bench_pro::test::223 | swe_bench_pro | test | 223 | instance_flipt-io__flipt-c12967bc73fdf02054cf3ef8498c05e25f0a18c0 | flipt-io/flipt | flipt-io/flipt | go | 3bf3255a7b7e2cbe9f71ec167f16a5449a357a5e | # Title
Context cancellation and deadline exceeded errors are incorrectly classified as internal in gRPC responses.
## Description
When client requests to the Flipt gRPC API are either cancelled (`context.Canceled`) or exceed their deadline (`context.DeadlineExceeded`), the server currently responds with an incorrec... | ## Requirements
- Any error caused by `context.Canceled` should be classified and returned with the gRPC code `Canceled`, even if the error is wrapped by another error.
- Any error caused by `context.DeadlineExceeded` should be classified and returned with the gRPC code `DeadlineExceeded`, even if the error is wrapped... | diff --git a/internal/cmd/grpc.go b/internal/cmd/grpc.go
index 9f6598fbeb..a2d9e84e3c 100644
--- a/internal/cmd/grpc.go
+++ b/internal/cmd/grpc.go
@@ -48,7 +48,6 @@ import (
"go.flipt.io/flipt/internal/storage/fs/git"
"go.flipt.io/flipt/internal/storage/fs/local"
- grpc_middleware "github.com/grpc-ecosystem/go-gr... | diff --git a/internal/server/middleware/grpc/middleware_test.go b/internal/server/middleware/grpc/middleware_test.go
index b5afe5c74d..1248da94d8 100644
--- a/internal/server/middleware/grpc/middleware_test.go
+++ b/internal/server/middleware/grpc/middleware_test.go
@@ -2,6 +2,7 @@ package grpc_middleware
import (
... | ["TestErrorUnaryInterceptor"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-c12967bc73fdf02054cf3ef8498c05e25f0a18c0 | true | null | 3 | 29 | 1 | 1,732 | 0 | 0.95 | 1 | 0.7 | 1 | 0.385333 | 86.656 | |
793 | swe_gym::train::626 | swe_gym | train | 626 | conan-io__conan-10917 | conan-io/conan | conan-io/conan | python | fa4936aa0a133beb20081361e3599761cfae7ef1 | [bug] `cmake_find_mode` property is broken
**Abstract description of the problem:** In a conan-generated config/module, decision about `MODULE` or `NO_MODULE` in `find_dependency` call is made by `cmake_find_mode` of dependant package, but not by `cmake_find_mode` of dependency (as it should be). It can be seen in the ... | @memsharded, @lasote, please, let me know your thoughts about the bug. | diff --git a/conan/tools/cmake/cmakedeps/templates/config.py b/conan/tools/cmake/cmakedeps/templates/config.py
--- a/conan/tools/cmake/cmakedeps/templates/config.py
+++ b/conan/tools/cmake/cmakedeps/templates/config.py
@@ -63,11 +63,7 @@ def template(self):
foreach(_DEPENDENCY {{ '${' + pkg_name + '_FIND_DEPEN... | diff --git a/conans/test/functional/toolchains/android/test_using_cmake.py b/conans/test/functional/toolchains/android/test_using_cmake.py
--- a/conans/test/functional/toolchains/android/test_using_cmake.py
+++ b/conans/test/functional/toolchains/android/test_using_cmake.py
@@ -56,7 +56,7 @@ def package(self):
@pyte... | ["conans/test/integration/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_package_from_system", "conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_system_dep", "conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_transitive_multi"] | ["conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components.py::test_wrong_component[False]", "conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_system_libs", "conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components.py::test_unused_requirement", "conans/test... | null | true | 2022-03-29T16:35:05Z | 2 | 30 | 3 | 1,502 | 0 | 0.85 | 1 | 0.7 | 1 | 0.350333 | 86.651 | |
794 | swe_bench_pro::test::617 | swe_bench_pro | test | 617 | instance_qutebrowser__qutebrowser-c580ebf0801e5a3ecabc54f327498bb753c6d5f2-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 0b8cc812fd0b73e296a3f93db02ce5d0b35714fc | ## Title
Host blocking does not apply to subdomains when only the parent domain is listed
## Description
In the hosts-based blocking method, requests are only blocked if the exact request hostname matches an entry in either the dynamically loaded blocked hosts set or the config-defined blocked hosts. As a result, addi... | ## Requirements
- Respect the global/per-URL toggle: if content blocking is disabled for the current first-party URL, a request must not be blocked.
- Respect whitelist overrides first: if a request URL matches a whitelist rule, it must not be blocked regardless of any host or parent-domain matches.
- Treat a blocked... | diff --git a/qutebrowser/components/hostblock.py b/qutebrowser/components/hostblock.py
index 8a01745843d..0e7278d1b37 100644
--- a/qutebrowser/components/hostblock.py
+++ b/qutebrowser/components/hostblock.py
@@ -37,7 +37,10 @@
qtutils,
)
from qutebrowser.components.utils import blockutils
-from qutebrowser.util... | diff --git a/tests/unit/components/test_hostblock.py b/tests/unit/components/test_hostblock.py
index 8dd8d6ddab6..00a7a5f8fb0 100644
--- a/tests/unit/components/test_hostblock.py
+++ b/tests/unit/components/test_hostblock.py
@@ -279,7 +279,7 @@ def test_disabled_blocking_per_url(config_stub, host_blocker_factory):
... | ["tests/unit/components/test_hostblock.py::test_subdomain_blocking", "tests/unit/utils/test_urlutils.py::TestWiden::test_widen_hostnames[a.b.c-expected0]", "tests/unit/utils/test_urlutils.py::TestWiden::test_widen_hostnames[foobarbaz-expected1]", "tests/unit/utils/test_urlutils.py::TestWiden::test_widen_hostnames[-expe... | ["tests/unit/components/test_hostblock.py::test_disabled_blocking_update[True-adblock]", "tests/unit/components/test_hostblock.py::test_disabled_blocking_update[False-auto]", "tests/unit/components/test_hostblock.py::test_disabled_blocking_update[False-adblock]", "tests/unit/components/test_hostblock.py::test_disabled_... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-c580ebf0801e5a3ecabc54f327498bb753c6d5f2-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 3 | 44 | 11 | 1,412 | 0 | 0.95 | 1 | 0.7 | 1 | 0.382 | 86.646 | |
795 | swe_bench_pro::test::583 | swe_bench_pro | test | 583 | instance_qutebrowser__qutebrowser-3d01c201b8aa54dd71d4f801b1dd12feb4c0a08a-v5fc38aaf22415ab0b70567368332beee7955b367 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 6d9c28ce10832aa727de1a326d9459a035ff3aba | # Title: Incorrect globbing and caching behavior in `qutebrowser.utils.resources`
## Description
The resource handling logic in `qutebrowser.utils.resources` does not behave consistently and lacks direct test coverage. In particular, resource globbing and preloading are error-prone: non-HTML and non-JavaScript files ... | ## Requirements
- The `preload()` function must scan the resource subdirectories `html/`, `javascript/`, and `javascript/quirks/` for files ending in `.html` or `.js`, and populate an in-memory dictionary named `cache` keyed by each file’s relative POSIX path (for example, `javascript/scroll.js`, `html/error.html`), st... | diff --git a/qutebrowser/app.py b/qutebrowser/app.py
index 444d3e69e07..1a18881b54f 100644
--- a/qutebrowser/app.py
+++ b/qutebrowser/app.py
@@ -87,7 +87,7 @@ def run(args):
log.init.debug("Initializing directories...")
standarddir.init(args)
- resources.preload_resources()
+ resources.preload()
... | diff --git a/tests/unit/utils/test_resources.py b/tests/unit/utils/test_resources.py
new file mode 100644
index 00000000000..fe7a384f181
--- /dev/null
+++ b/tests/unit/utils/test_resources.py
@@ -0,0 +1,147 @@
+# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
+
+# Copyright 2014-2021 Florian Bruhin (The Compiler) <ma... | ["tests/unit/utils/test_resources.py::TestReadFile::test_glob_resources[True-pathlib]", "tests/unit/utils/test_resources.py::TestReadFile::test_glob_resources[True-zipfile]", "tests/unit/utils/test_resources.py::TestReadFile::test_glob_resources[False-pathlib]", "tests/unit/utils/test_resources.py::TestReadFile::test_g... | ["tests/unit/scripts/test_check_coverage.py::test_tested_no_branches", "tests/unit/scripts/test_check_coverage.py::test_tested_with_branches", "tests/unit/scripts/test_check_coverage.py::test_untested", "tests/unit/scripts/test_check_coverage.py::test_untested_floats", "tests/unit/scripts/test_check_coverage.py::test_u... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-3d01c201b8aa54dd71d4f801b1dd12feb4c0a08a-v5fc38aaf22415ab0b70567368332beee7955b367 | true | null | 3 | 63 | 12 | 1,017 | 0 | 0.95 | 1 | 0.7 | 1 | 0.3795 | 86.6385 | |
796 | swe_bench_pro::test::595 | swe_bench_pro | test | 595 | instance_qutebrowser__qutebrowser-5fdc83e5da6222fe61163395baaad7ae57fa2cb4-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | cb59619327e7fa941087d62b83459750c1b7c579 | **Title:**
Switch to a `FontFamilies` class for consistent font parsing
**Description:**
The configuration system currently handles font families using ad-hoc string parsing logic. This leads to inconsistencies when interpreting comma-separated or quoted font family strings. Without a structured representation, it's... | ## Requirements
- Font family strings must be parsed using `FontFamilies.from_str`, which interprets comma-separated and quoted names into a clean, ordered list of valid font family names. Surrounding single or double quotes around a name must be stripped, surrounding whitespace must be trimmed, and empty entries (incl... | diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py
index 1fb315c4992..5dc8a95e537 100644
--- a/qutebrowser/config/configfiles.py
+++ b/qutebrowser/config/configfiles.py
@@ -386,8 +386,8 @@ def _migrate_font_default_family(self) -> None:
for scope, val in self._settings[old_nam... | diff --git a/tests/unit/config/test_configutils.py b/tests/unit/config/test_configutils.py
index 329322d33c2..a87fc35a445 100644
--- a/tests/unit/config/test_configutils.py
+++ b/tests/unit/config/test_configutils.py
@@ -298,22 +298,33 @@ def test_bench_widen_hostnames(self, hostname, benchmark):
benchmark(lam... | ["tests/unit/config/test_configutils.py::TestFontFamilies::test_from_str[foo, bar-expected0]", "tests/unit/config/test_configutils.py::TestFontFamilies::test_from_str[foo, spaces -expected1]", "tests/unit/config/test_configutils.py::TestFontFamilies::test_from_str[-expected2]", "tests/unit/config/test_configutils.py:... | ["tests/unit/config/test_configutils.py::test_str", "tests/unit/config/test_configutils.py::test_str_empty", "tests/unit/config/test_configutils.py::test_str_mixed", "tests/unit/config/test_configutils.py::test_dump[True-expected0]", "tests/unit/config/test_configutils.py::test_dump[False-expected1]", "tests/unit/confi... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-5fdc83e5da6222fe61163395baaad7ae57fa2cb4-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d | true | null | 3 | 72 | 11 | 834 | 0 | 0.95 | 1 | 0.7 | 1 | 0.379 | 86.637 | |
797 | swe_gym::train::2104 | swe_gym | train | 2,104 | Project-MONAI__MONAI-6686 | Project-MONAI/MONAI | project-monai/monai | python | 544c0bdbb363fdd67add3133d8626a08a27ff5e2 | cropforeground with margin>0
**Describe the bug**
```py
import numpy as np
import monai.transforms as mt
from monai.visualize import matshow3d
mask_gt = np.zeros((1, 100, 100), np.uint8)
mask_gt[0, 0:50] = 1
output = mt.CropForeground(margin=2)(mask_gt)
print("cropped size: ", output.shape)
matshow3d(output, show=Tru... | Hi @wyli, It looks like the error comes from line 1001, if `allow_smaller`, it will pad the output.
https://github.com/Project-MONAI/MONAI/blob/e7fb74f32b5371bb54bff7a47447df31d06d8edf/monai/transforms/utils.py#L1001-L1003
I will create a PR to fix it.
Hi @wyli, It looks like the error comes from line 1001, if `all... | diff --git a/monai/transforms/croppad/array.py b/monai/transforms/croppad/array.py
--- a/monai/transforms/croppad/array.py
+++ b/monai/transforms/croppad/array.py
@@ -824,7 +824,7 @@ def __init__(
select_fn: Callable = is_positive,
channel_indices: IndexSelection | None = None,
margin: Sequen... | diff --git a/tests/test_crop_foreground.py b/tests/test_crop_foreground.py
--- a/tests/test_crop_foreground.py
+++ b/tests/test_crop_foreground.py
@@ -63,7 +63,7 @@
TESTS.append(
[
- {"select_fn": lambda x: x > 0, "channel_indices": None, "margin": [2, 1], "allow_smaller": True},
+ ... | ["tests/test_generate_spatial_bounding_box.py::TestGenerateSpatialBoundingBox::test_value_04", "tests/test_crop_foregroundd.py::TestCropForegroundd::test_value_06", "tests/test_crop_foreground.py::TestCropForeground::test_value_19", "tests/test_crop_foreground.py::TestCropForeground::test_value_12", "tests/test_generat... | ["tests/test_crop_foreground.py::TestCropForeground::test_inverse_pending_ops_10", "tests/test_generate_spatial_bounding_box.py::TestGenerateSpatialBoundingBox::test_value_06", "tests/test_crop_foregroundd.py::TestCropForegroundd::test_pending_ops_12", "tests/test_crop_foreground.py::TestCropForeground::test_value_02",... | null | true | 2023-07-02T14:41:20Z | 3 | 27 | 18 | 1,528 | 0 | 0.85 | 1 | 0.7 | 1 | 0.344667 | 86.634 | |
798 | swe_bench_pro::test::82 | swe_bench_pro | test | 82 | instance_ansible__ansible-9a21e247786ebd294dafafca1105fcd770ff46c6-v67cdaa49f89b34e42b69d5b7830b3c3ad3d8803f | ansible/ansible | ansible/ansible | python | 4c8c40fd3d4a58defdc80e7d22aa8d26b731353e | ## TITLE: `get_distribution()` and `get_distribution_version()` return None on non-Linux platforms
### ISSUE TYPE
Bug Report
### COMPONENT NAME
`module_utils/common/sys_info.py`
### OS / ENVIRONMENT
Non-Linux platforms (e.g., SunOS/SmartOS, Illumos, OmniOS, FreeBSD, macOS)
### SUMMARY
`get_distribution()` and `... | ## Requirements
- Maintain a cross-platform way to report the operating system distribution name on all supported platforms (Linux, macOS, Solaris/Illumos, BSD families), not just Linux.
- Ensure a distribution version string is available on all supported platforms; when the version cannot be determined, return an emp... | diff --git a/changelogs/fragments/17587-get-distribution-more-distros.yml b/changelogs/fragments/17587-get-distribution-more-distros.yml
new file mode 100644
index 00000000000000..cbf127268a63da
--- /dev/null
+++ b/changelogs/fragments/17587-get-distribution-more-distros.yml
@@ -0,0 +1,7 @@
+minor_changes:
+ - >
+ ... | diff --git a/test/units/module_utils/basic/test_platform_distribution.py b/test/units/module_utils/basic/test_platform_distribution.py
index d7a4510c75ba97..3c1afb7d85fc93 100644
--- a/test/units/module_utils/basic/test_platform_distribution.py
+++ b/test/units/module_utils/basic/test_platform_distribution.py
@@ -42,12... | ["test/units/module_utils/common/test_sys_info.py::test_get_distribution_not_linux[FreeBSD-Freebsd]", "test/units/module_utils/common/test_sys_info.py::test_get_distribution_version_not_linux[FreeBSD-12.1]", "test/units/module_utils/common/test_sys_info.py::test_get_distribution_not_linux[Darwin-Darwin]", "test/units/m... | ["test/units/module_utils/common/test_sys_info.py::TestGetDistribution::test_distro_unknown", "test/units/module_utils/common/test_sys_info.py::TestGetDistribution::test_distro_amazon_linux_short", "test/units/module_utils/common/test_sys_info.py::TestGetPlatformSubclass::test_not_linux", "test/units/module_utils/commo... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-9a21e247786ebd294dafafca1105fcd770ff46c6-v67cdaa49f89b34e42b69d5b7830b3c3ad3d8803f | true | null | 2 | 63 | 6 | 1,001 | 0 | 0.95 | 1 | 0.7 | 1 | 0.376833 | 86.6305 | |
799 | swe_bench_pro::test::200 | swe_bench_pro | test | 200 | instance_flipt-io__flipt-7161f7b876773a911afdd804b281e52681cb7321 | flipt-io/flipt | flipt-io/flipt | go | 11775ea830dd27bccd3e28152309df91d754a11b | # Default config does not allow overriding via env
# Describe the Bug
If using the default config that was added in v1.27.0 but not specifying a path to a config, flipt does not respect the ability to override the default config via env vars
# Version Info
Run flipt --version and paste the output here:
v1.27.0
# ... | ## Requirements
- ‘config.Load(path string) (*Result, error)’ must load configuration from the provided path. When ‘path == \"\"’, it must start from default values and then apply environment variable overrides with precedence over those defaults. When ‘path’ points to a valid configuration file, file values must form ... | diff --git a/cmd/flipt/main.go b/cmd/flipt/main.go
index 9fbd7f5ee4..a612ab534a 100644
--- a/cmd/flipt/main.go
+++ b/cmd/flipt/main.go
@@ -184,24 +184,21 @@ func determinePath(cfgPath string) (string, bool) {
}
func buildConfig() (*zap.Logger, *config.Config) {
- cfg := config.Default()
-
- var warnings []string
-
... | diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 3fdaf9a73f..aeb5219a04 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -201,17 +201,32 @@ func TestLogEncoding(t *testing.T) {
func TestLoad(t *testing.T) {
tests := []struct {
- name string
... | ["TestLoad"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-7161f7b876773a911afdd804b281e52681cb7321 | true | null | 3 | 47 | 1 | 1,314 | 0 | 0.95 | 1 | 0.7 | 1 | 0.375667 | 86.627 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.