nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: cekit/cekit
Pull request #238 (2018-06-04 13:50:47)

Fix a typo
When invoking buildah with _pull=True, use the --pull-always option.

goldmann: @dbecvarik It looks like the test is broken too :)

https://github.com/cekit/cekit/blob/develop/tests/test_builder.py#L167
nalind: Whoops, didn't catch the in-tree test.
goldmann: @nalind Thank you!

Patch:
diff --git a/cekit/builders/buildah.py b/cekit/builders/buildah.py
index 3e9cb72..fb36f52 100644
--- a/cekit/builders/buildah.py
+++ b/cekit/builders/buildah.py
@@ -33,7 +33,7 @@ class BuildahBuilder(Builder):
         cmd = ["sudo", "buildah", "build-using-dockerfile"]
 
         if self._pull:
-            cmd.append('--pull-awlays')
+            cmd.append('--pull-always')
 
         # Custom tags for the container image
         logger.debug("Building image with tags: '%s'" %


Test patch:
diff --git a/tests/test_builder.py b/tests/test_builder.py
index b3dd769..a18e241 100644
--- a/tests/test_builder.py
+++ b/tests/test_builder.py
@@ -164,7 +164,7 @@ def test_buildah_builder_run_pull(mocker):
     check_call.assert_called_once_with(['sudo',
                                         'buildah',
                                         'build-using-dockerfile',
-                                        '--pull-awlays',
+                                        '--pull-always',
                                         '-t', 'foo',
                                         '-t', 'bar',
                                         'tmp/image'])
Repository: dynaconf/dynaconf
Pull request #1191 (2024-10-21 07:26:43)

Implement `__delitem__` method for base Settings
Add support for deleting items by keyword, by
adding the __delitem__ method to the Settings
class.

This way, users may delete items by doing:
```
del settings["my_key"]
```

As a counterpart to delete only by attribute.


Patch:
diff --git a/dynaconf/base.py b/dynaconf/base.py
index 962b074..90fee9d 100644
--- a/dynaconf/base.py
+++ b/dynaconf/base.py
@@ -319,6 +319,10 @@ class Settings:
         if hasattr(self, name):
             super().__delattr__(name)
 
+    def __delitem__(self, name):
+        self._deleted.add(name)
+        self.set(name, "@del")
+
     def __contains__(self, item):
         """Respond to `item in settings`"""
         return item.upper() in self.store or item.lower() in self.store


Test patch:
diff --git a/tests/test_base.py b/tests/test_base.py
index 1895f65..ce4489b 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -35,7 +35,7 @@ def test_deleted_raise(settings):
     assert settings.exists("TODELETE3") is False
     assert settings.get("TODELETE3") is None
 
-    # case: del nested item
+    # case: del nested attribute
     settings.set("Abc.Xyz.Uv", 123)
     assert settings.abc.xyz.uv == 123
     del settings.abc.xyz.uv
@@ -45,6 +45,26 @@ def test_deleted_raise(settings):
     assert settings.exists("abc.xyz.uv") is False
     assert settings.get("abc.xyz.uv") is None
 
+    # case: del item
+    settings.TODELETE4 = True
+    assert "TODELETE4" in settings
+    assert settings.TODELETE4 is True
+    del settings["TODELETE4"]
+    with pytest.raises(AttributeError):
+        assert settings.TODELETE4 is True
+    assert settings.exists("TODELETE4") is False
+    assert settings.get("TODELETE4") is None
+
+    # case: del item lowercase when orifinal was mixed-case
+    settings.ToDelete3 = True
+    assert "ToDelete3" in settings
+    assert settings.TODELETE3 is True
+    del settings["todelete3"]
+    with pytest.raises(AttributeError):
+        assert settings.TODELETE3 is True
+    assert settings.exists("TODELETE3") is False
+    assert settings.get("TODELETE3") is None
+
 
 def test_delete_and_set_again(settings):
     """asserts variable can be deleted and set again"""
Repository: dynaconf/dynaconf
Pull request #1241 (2025-02-10 18:48:12)

fix: using merge with comma separated values will infer type [port from 3.2.8]


Fix: #1240

github-actions[bot]: ## Test Results (Python 3.12)
557 tests  ±0   556 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols "passed tests") ±0   52s [:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols "duration of all tests") -1s
    1 suites ±0       1 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols "skipped / disabled tests") ±0 
    1 files   ±0       0 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols "failed tests") ±0 

Results for commit 2d8bff47. ± Comparison against base commit 105e6312.

[test-results]:data:application/gzip;base64,H4sIAM1KqmcC/1WMSw7CIBQAr9KwdlGQn17G0FdIXmyL4bMy3l1Ka6nLmUnmTRxONpJ7Ry8diRnTAWMOJqFfCgpWuJS0NiHUjx4xA1Qlm3riaz9swhmciugPYUPwYTchL+25wv9yM+1Y+TSsfP6Bn2dMBQgb9eAcV1YabgyVvLdsAAf8BlJpac1VMxCaks8XeVr6TAQBAAA=


Patch:
diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
index 1958764..79ad551 100644
--- a/dynaconf/utils/parse_conf.py
+++ b/dynaconf/utils/parse_conf.py
@@ -133,7 +133,12 @@ class Merge(MetaValue):
                     }
                 elif "," in self.value:
                     # @merge foo,bar
-                    self.value = self.value.split(",")
+                    self.value = [
+                        parse_conf_data(
+                            v, tomlfy=True, box_settings=box_settings
+                        )
+                        for v in self.value.split(",")
+                    ]
                 else:
                     # @merge foo
                     self.value = [self.value]


Test patch:
diff --git a/tests/test_base.py b/tests/test_base.py
index e7c7044..7fa263b 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -469,6 +469,42 @@ def test_set_explicit_merge_token(tmpdir):
     settings.set("b_list", "@merge zaz")
     assert settings.B_LIST == [1, 2, 3, 4, 5, 6.6, False, "foo", "bar", "zaz"]
 
+    settings.set("b_list", "@merge 7, 8, 9")
+    assert settings.B_LIST == [
+        1,
+        2,
+        3,
+        4,
+        5,
+        6.6,
+        False,
+        "foo",
+        "bar",
+        "zaz",
+        7,
+        8,
+        9,
+    ]
+    settings.set("b_list", "@merge '10','11','12'")
+    assert settings.B_LIST == [
+        1,
+        2,
+        3,
+        4,
+        5,
+        6.6,
+        False,
+        "foo",
+        "bar",
+        "zaz",
+        7,
+        8,
+        9,
+        "10",
+        "11",
+        "12",
+    ]
+
     settings.set("a_dict", "@merge {city='Guarulhos'}")
     assert settings.A_DICT.name == "Bruno"
     assert settings.A_DICT.city == "Guarulhos"