dyyyyyyyy/swe-rebench-filtered-1150 huggingface dataset:
task: metadata: install: pip install -e .[dev]
patch: diff --git a/gspread/utils.py b/gspread/utils.py
index b824079..361659e 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -201,6 +201,9 @@ def numericise_all(
     :param list ignore: List of ints of indices of the row (index 1) to ignore
         numericising.
     """
+    # in case someone explicitly passes `None` as ignored list
+    ignore = ignore or []
+
     numericised_list = [
         values[index]
         if index + 1 in ignore
diff --git a/lint-requirements.txt b/lint-requirements.txt
index 3702aaa..49d856f 100644
--- a/lint-requirements.txt
+++ b/lint-requirements.txt
@@ -1,5 +1,5 @@
 bandit==1.7.0
 black==22.3.0
 codespell==2.1.0
-flake8==3.9.2
+flake8==5.0.4
 isort==5.9.3

problem_statement: API breakage in get_all_records / numericise_all fix
**Describe the bug**
The fix in #1082 accidentally broke API compatibility. When the default kwarg for get_all_records numericise_all was changed from None to an empty list this broke anyone who was passing in None explicitly as the function now assumes the argument will always be iterable.

**Code example***
Thanks to githuberto in https://github.com/dgilman/gspread_asyncio/issues/48 for finding this
repo: burnash/gspread
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/utils_test.py b/tests/utils_test.py
index 8e6de9e..802ae02 100644
--- a/tests/utils_test.py
+++ b/tests/utils_test.py
@@ -93,6 +93,9 @@ class UtilsTest(unittest.TestCase):
         expected + ["5", 5]
         self.assertEqual(utils.numericise_all(inputs, ignore=[5]), expected)
 
+        # provide explicit `None` as ignored list
+        self.assertEqual(utils.numericise_all(inputs, ignore=None), expected)
+
     def test_a1_to_grid_range_simple(self):
         expected_single_dimension = {
             "startRowIndex": 0,
task: metadata: install: pip install -e .[testing]
patch: diff --git a/ops/model.py b/ops/model.py
index a87001e..a86c2db 100644
--- a/ops/model.py
+++ b/ops/model.py
@@ -2662,7 +2662,7 @@ class Container:
                     if info.type is pebble.FileType.DIRECTORY:
                         self.make_dir(dstpath, make_parents=True)
                         continue
-                    with open(info.path) as src:
+                    with open(info.path, 'rb') as src:
                         self.push(
                             dstpath,
                             src,

problem_statement: `Container.push_path()` only supports text files
As you can see in the linked code below, the `Container.push_path()` function only works with text files. Internally, it's calling `Container.push()`, but it doesn't allow customizing its parameters, so you can't specify *encoding*, *permissions*, *user_id* and so on.

https://github.com/canonical/operator/blob/77b85ee2ce8e9319f89aef443c7337684f4fd21d/ops/model.py#L2594-L2598

It would be great if at least the `encoding` parameter was surfaced in `push_path`, so that it's possible to get binary files from the charm container.

My current workaround:
```python
with open(binary_file, "rb") as f:
	container.push(dst_path, source=f)
```
repo: canonical/operator
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/test_model.py b/test/test_model.py
index 01df174..541eeb1 100644
--- a/test/test_model.py
+++ b/test/test_model.py
@@ -1369,8 +1369,8 @@ def test_recursive_push_and_pull(case: PushPullCase):
     for file in case.files:
         fpath = os.path.join(push_src.name, file[1:])
         os.makedirs(os.path.dirname(fpath), exist_ok=True)
-        with open(fpath, 'w') as f:
-            f.write('hello')
+        with open(fpath, 'wb') as f:
+            f.write(b'push \xc3\x28')  # invalid UTF-8 to ensure binary works
     if case.dirs:
         for directory in case.dirs:
             fpath = os.path.join(push_src.name, directory[1:])
@@ -1402,6 +1402,8 @@ def test_recursive_push_and_pull(case: PushPullCase):
     ), f'push_path gave wrong expected errors: want {case.errors}, got {errors}'
     for fpath in case.want:
         assert c.exists(fpath), f'push_path failed: file {fpath} missing at destination'
+        content = c.pull(fpath, encoding=None).read()
+        assert content == b'push \xc3\x28'
     for fdir in case.want_dirs:
         assert c.isdir(fdir), f'push_path failed: dir {fdir} missing at destination'
task: metadata: install: pip install -e .[dev]
patch: diff --git a/dynamic_yaml/yaml_wrappers.py b/dynamic_yaml/yaml_wrappers.py
index 14c5ecc..1a08d27 100644
--- a/dynamic_yaml/yaml_wrappers.py
+++ b/dynamic_yaml/yaml_wrappers.py
@@ -78,6 +78,10 @@ class YamlList(DynamicYamlObject, MutableSequence):
         super().__setattr__('_collection', list(*args, **kwargs))
         super().__setattr__('_root', YamlDict([(YamlList.ROOT_NAME, self)]))
 
+    def __iter__(self):
+        for i in range(len(self)):
+            yield self[i]
+
     def insert(self, index: int, object):
         super().__getattribute__('_collection').insert(index, object)
 

problem_statement: [Enhancement] - Method to resolve the dynamic object
Ran into the issue when trying to pass in a list to a pandas dataframe. I was trying to define some columns, but the list of columns wouldn't resolve. See below example:

```python
import dynamic_yaml
import pandas as pd

yml = '''
names:
  n1: "name1"
  n2: "name2"
columns:
  - "{names.n1}"
  - "{names.n2}"
'''


if __name__ == '__main__':
    config = dynamic_yaml.load(yml)

    df = pd.DataFrame(columns=config.columns)

    print(df.columns)
```
Yeilds:
```
Index(['{names.n1}', '{names.n2}'], dtype='object')
```

So either after a fix that resolves the object when passed, or a method I can call on the object such as `config.columns.as_list()` or `config.columns.as_set()` or `config.columns.resolve()`. Not sure what the best approach is.

Current approach is to unpack and store in a variable. Roughly the following:
```python
cols = [config.columns[x] for x in range(len(config.columns))]
```
repo: childsish/dynamic-yaml
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_dynamic_yaml.py b/tests/test_dynamic_yaml.py
index c666952..3cd4bee 100644
--- a/tests/test_dynamic_yaml.py
+++ b/tests/test_dynamic_yaml.py
@@ -197,6 +197,34 @@ class TestDynamicYaml(TestCase):
         res = load(config, recursive=True)
         inner_test(**res)
 
+    def test_list_iteration(self):
+        config = '''
+        targets:
+          v1: value1
+          v2: value2
+        query:
+          - '{targets.v1}'
+          - '{targets.v2}'
+        '''
+
+        res = load(config)
+        self.assertEqual(['value1', 'value2'], list(res.query))
+
+    def test_dict_iteration(self):
+        config = '''
+        targets:
+          v1: value1
+          v2: value2
+        query:
+          v1: '{targets.v1}'
+          v2: '{targets.v2}'
+        '''
+
+        res = load(config)
+        self.assertEqual(['v1', 'v2'], list(res.query))
+        self.assertEqual(['value1', 'value2'], list(res.query.values()))
+        self.assertEqual([('v1', 'value1'), ('v2', 'value2')], list(res.query.items()))
+
 
 if __name__ == '__main__':
     import sys
task: metadata: install: pip install -e .[dev]
patch: diff --git a/dynamic_yaml/__init__.py b/dynamic_yaml/__init__.py
index 2ebbab4..5245f7e 100644
--- a/dynamic_yaml/__init__.py
+++ b/dynamic_yaml/__init__.py
@@ -37,8 +37,8 @@ def load(stream, loader=DynamicYamlLoader, recursive=False):
     return result
 
 
-def dump(data, *args, **kwargs):
-    return yaml.dump(data, *args, **kwargs)
+def dump(data, sort_keys=False, *args, **kwargs):
+    return yaml.dump(data, sort_keys=sort_keys, *args, **kwargs)
 
 
 add_wrappers(DynamicYamlLoader)

problem_statement: How to preserve order when dumping?
How to preserve order when dumping?
repo: childsish/dynamic-yaml
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_representations.py b/tests/test_representations.py
index f2a3599..f8adacb 100644
--- a/tests/test_representations.py
+++ b/tests/test_representations.py
@@ -34,6 +34,34 @@ parameters: {tool1: {phase1: {subparameters: [0.5, 0.6]}, phase2: {subparameters
 project_name: hello-world'''),
             yaml.safe_load(dump(res)))
 
+    def test_insert_order_keys(self):
+        config = '''
+        one: 1
+        two: 2
+        three: 3
+        four: 4
+        five: 5
+        '''
+
+        self.assertEqual(
+            dump(load(config)),
+            'one: 1\ntwo: 2\nthree: 3\nfour: 4\nfive: 5\n'
+        )
+
+    def test_sorted_keys(self):
+        config = '''
+        one: 1
+        two: 2
+        three: 3
+        four: 4
+        five: 5
+        '''
+
+        self.assertEqual(
+            dump(load(config), sort_keys=True),
+            'five: 5\nfour: 4\none: 1\nthree: 3\ntwo: 2\n'
+        )
+
 
 if __name__ == '__main__':
     import sys
task: metadata: install: pip install -e .
patch: diff --git a/pyhocon/config_tree.py b/pyhocon/config_tree.py
index 075bae1..354bfb6 100644
--- a/pyhocon/config_tree.py
+++ b/pyhocon/config_tree.py
@@ -93,7 +93,7 @@ class ConfigTree(OrderedDict):
                     self._push_history(key_elt, value)
                     self[key_elt] = value
                 elif isinstance(l, list):
-                    l += value
+                    self[key_elt] = l + value
                     self._push_history(key_elt, l)
                 elif l is None:
                     self._push_history(key_elt, value)
@@ -144,6 +144,8 @@ class ConfigTree(OrderedDict):
         if key_index == len(key_path) - 1:
             if isinstance(elt, NoneValue):
                 return None
+            elif isinstance(elt, list):
+                return [None if isinstance(x, NoneValue) else x for x in elt]
             else:
                 return elt
         elif isinstance(elt, ConfigTree):

problem_statement: get_list() returns NoneValue's, not None's
Given the following pyhocon file:
```
single_value = null
list_value = [null]
```

And the following code:
```python
from pyhocon import ConfigFactory
config = ConfigFactory.parse_file("test.conf")

single_value = config.get("single_value")
print single_value, single_value is None

list_value = config.get_list("list_value")[0]
print list_value, list_value is None

print single_value == list_value
``` 

You get as output:
```
None True
<pyhocon.config_tree.NoneValue object at 0xe20ad0> False
False
```

I expected both values to be Python's `None`.
repo: chimpler/pyhocon
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_config_parser.py b/tests/test_config_parser.py
index ca08db6..8d9dffd 100644
--- a/tests/test_config_parser.py
+++ b/tests/test_config_parser.py
@@ -212,9 +212,11 @@ class TestConfigParser(object):
         config = ConfigFactory.parse_string(
             """
             a = null
+            b = [null]
             """
         )
         assert config.get('a') is None
+        assert config.get('b')[0] is None
 
     def test_parse_override(self):
         config = ConfigFactory.parse_string(
diff --git a/tests/test_config_tree.py b/tests/test_config_tree.py
index 97a8e17..3d194de 100644
--- a/tests/test_config_tree.py
+++ b/tests/test_config_tree.py
@@ -9,7 +9,7 @@ except ImportError:  # pragma: no cover
     from ordereddict import OrderedDict
 
 
-class TestConfigParser(object):
+class TestConfigTree(object):
 
     def test_config_tree_quoted_string(self):
         config_tree = ConfigTree()
task: metadata: install: pip install -e .
patch: diff --git a/fastkml/data.py b/fastkml/data.py
index 18ace77..4510fe1 100644
--- a/fastkml/data.py
+++ b/fastkml/data.py
@@ -14,6 +14,7 @@
 # along with this library; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 """Add Custom Data"""
+import logging
 from typing import Dict
 from typing import List
 from typing import Optional
@@ -28,6 +29,8 @@ from fastkml.base import _BaseObject
 from fastkml.base import _XMLObject
 from fastkml.types import Element
 
+logger = logging.getLogger(__name__)
+
 
 class SimpleField(TypedDict):
     name: str
@@ -150,7 +153,7 @@ class Schema(_BaseObject):
             "bool",
         ]
         if type not in allowed_types:
-            raise TypeError(
+            logger.warning(
                 f"{name} has the type {type} which is invalid. "
                 "The type must be one of "
                 "'string', 'int', 'uint', 'short', "

problem_statement: TypeError (TypeError: type must be one of 'string', 'int', 'uint', 'short', 'ushort', 'float', 'double', 'bool')
`No handlers could be found for logger "fastkml.config"
Traceback (most recent call last):
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/ceid-fixer/fkml.py", line 8, in <module>
    k.from_string(doc)
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/site-packages/fastkml/kml.py", line 101, in from_string
    feature.from_element(document)
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/site-packages/fastkml/kml.py", line 1001, in from_element
    s.from_element(schema)
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/site-packages/fastkml/kml.py", line 1359, in from_element
    self.append(sftype, sfname, sfdisplay_name)
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/site-packages/fastkml/kml.py", line 1337, in append
    "type must be one of ""'string', 'int', 'uint', 'short', "
TypeError: type must be one of 'string', 'int', 'uint', 'short', 'ushort', 'float', 'double', 'bool'
`

repo: cleder/fastkml
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/oldunit_test.py b/tests/oldunit_test.py
index 76b7ecb..5bc4fbd 100644
--- a/tests/oldunit_test.py
+++ b/tests/oldunit_test.py
@@ -198,6 +198,8 @@ class TestBuildKml:
         assert list(s.simple_fields)[1]["type"] == "float"
         assert list(s.simple_fields)[1]["name"] == "Float"
         assert list(s.simple_fields)[1]["displayName"] is None
+        # 'long' is an invalid value, logs a warning but does not error
+        s.append("long", "Long", "A Long")
 
     def test_schema_data(self):
         ns = "{http://www.opengis.net/kml/2.2}"  # noqa: FS003
task: metadata: install: pip install -e .
patch: diff --git a/freezefrog/__init__.py b/freezefrog/__init__.py
index 44a232a..60463f3 100644
--- a/freezefrog/__init__.py
+++ b/freezefrog/__init__.py
@@ -47,6 +47,12 @@ class FakeDateTime(with_metaclass(FakeDateTimeMeta, real_datetime)):
             cls._start = real_datetime.utcnow()
         return (real_datetime.utcnow() - cls._start) + cls.dt
 
+    @classmethod
+    def now(cls, *args, **kwargs):
+        raise NotImplementedError(
+            '{}.now() is not implemented yet'.format(cls.__name__)
+        )
+
 
 class FakeFixedDateTime(FakeDateTime):
     @classmethod

problem_statement: FreezeFrog should also mock datetime.datetime.now
FreezeFrog should raise an exception when datetime.datetime.now() is used without a TZ instead of not mocking it at all.

repo: closeio/freezefrog
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/__init__.py b/tests/__init__.py
index dd74be2..093fc1c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -27,3 +27,9 @@ class FreezeFrogTestCase(unittest.TestCase):
             end = datetime.datetime(2014, 1, 1, 0, 0, 1)
             self.assertTrue(start < dt < end)
             self.assertTrue(1388534400 < time.time() < 1388534401)
+
+    def test_now(self):
+        regular_now = datetime.datetime.now()
+        self.assertTrue(regular_now)
+        with FreezeTime(datetime.datetime(2014, 1, 1)):
+            self.assertRaises(NotImplementedError, datetime.datetime.now)
task: metadata: install: pip install -e .[development,test]
patch: diff --git a/HISTORY.md b/HISTORY.md
index b796720..b7935f6 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -3,6 +3,7 @@
 2.1.0 (unreleased)
 ------------------
 
+- Do not render a spurious `=""` when new lines appear inside a tag (Refs. #35) [ale-rt]
 - The attributes renderer knows about the element indentation
   and for indents the attributes consequently [ale-rt]
 - The ZCML element has now its custom tag templates, this simplifies the code [ale-rt]
diff --git a/zpretty/prettifier.py b/zpretty/prettifier.py
index 3e6cf5a..4468653 100644
--- a/zpretty/prettifier.py
+++ b/zpretty/prettifier.py
@@ -33,6 +33,11 @@ class ZPrettifier(object):
             for line in text.splitlines()
         )
         self.soup = self.get_soup(self.text)
+
+        # Cleanup all spurious self._newlines_marker attributes, see #35
+        for el in self.soup.find_all(attrs={self._newlines_marker: ""}):
+            el.attrs.pop(self._newlines_marker, None)
+
         self.root = self.pretty_element(self.soup, -1)
 
     def get_soup(self, text):

problem_statement: empty lines in tag lead to invalid attributes
when test.html is
```
<select id="workflow_action"
        name="workflow_action"
        
></select>
```
then ``$ zpretty test.html`` produces this output:
```
<select id="workflow_action"
        =""
        name="workflow_action"
></select>
```

Or general test.html:
```
<tag attr="ok"

></tag>
```

leads to:
```
<tag =""
     attr="ok"
></tag>
```
repo: collective/zpretty
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/zpretty/tests/test_zpretty.py b/zpretty/tests/test_zpretty.py
index 0db7440..17eb548 100644
--- a/zpretty/tests/test_zpretty.py
+++ b/zpretty/tests/test_zpretty.py
@@ -152,6 +152,17 @@ class TestZpretty(TestCase):
             "<root>\n (<a></a>)\n</root>", "<root>\n  (<a></a>)\n</root>\n"
         )
 
+    def test_elements_with_new_lines(self):
+        self.assertPrettified("<root\n></root>", "<root></root>\n")
+        self.assertPrettified(
+            '<root\na="b"\n\n></root>',
+            ('<root a="b"></root>\n'),
+        )
+        self.assertPrettified(
+            '<root\na="b"\n\nc="d"></root>',
+            ('<root a="b"\n      c="d"\n></root>\n'),
+        )
+
     def test_entities(self):
         self.assertPrettified("<root>&nbsp;</root>", "<root>&nbsp;</root>\n")
task: metadata: install: pip install -e .
patch: diff --git a/dlx/marc/query.py b/dlx/marc/query.py
index 9d32951..ec80b96 100644
--- a/dlx/marc/query.py
+++ b/dlx/marc/query.py
@@ -15,7 +15,7 @@ class InvalidQueryString(Exception):
 class WildcardRegex(Regex):
     # for differentiating regex to run against text index vs actual value
     def __init__(self, string=None):
-        super().__init__(string, 'i')
+        super().__init__(string)
     
 class Query():
     @classmethod
@@ -96,7 +96,7 @@ class Query():
                 string = string.replace('*', placeholder)
                 string = re.escape(string)
                 string = string.replace(placeholder, '.*')
-                string = string if string[0:2] == '.*' else '^' + string
+                string = string if string[0:2] == '.*' else '^ ' + string # the "text" field in pseudo indexes starts with a space 
                 string = string if string[-2:] == '.*' else string + '$'
 
                 return WildcardRegex(string)
diff --git a/setup.py b/setup.py
index 8911c50..c44a845 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-version = '1.4.13.1'
+version = '1.4.14'
 
 import sys
 from setuptools import setup, find_packages

problem_statement: Logical field wildcard serarch bugfix
The search is not working properly matching strings at the beginning of the value, i.e. `author:german*`. Addresses https://github.com/dag-hammarskjold-library/dlx-rest/issues/1522
repo: dag-hammarskjold-library/dlx
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_marc.py b/tests/test_marc.py
index 293a555..f353844 100644
--- a/tests/test_marc.py
+++ b/tests/test_marc.py
@@ -361,10 +361,13 @@ def test_querystring(db):
     query = Query.from_string(f'title:\'This title: is a title\'', record_type='bib')
     assert len(list(BibSet.from_query(query.compile()))) == 1
 
-    # logical field widldcard
+    # logical field wildcard
     query = Query.from_string(f"title:*is*", record_type='bib')
     assert len(list(BibSet.from_query(query.compile()))) == 3
 
+    query = Query.from_string(f"title:this*", record_type='bib')
+    assert len(list(BibSet.from_query(query.compile()))) == 2
+
     # NOT
     for bib in BibSet.from_query({}):
         # delete all bibs for further tests
task: metadata: install: pip install -e .
patch: diff --git a/dlx/scripts/init_indexes.py b/dlx/scripts/init_indexes.py
index 7d99357..ad89d0e 100644
--- a/dlx/scripts/init_indexes.py
+++ b/dlx/scripts/init_indexes.py
@@ -56,7 +56,7 @@ def run():
                 collation=Config.marc_index_default_collation
             )
         )
-        indexes.append(col.create_index('_record_type', collation=Config.marc_index_default_collation))
+        indexes.append(col.create_index('_record_type_collated', collation=Config.marc_index_default_collation))
 
         print(f'creating text indexes...')
         indexes.append(col.create_index('words', collation=Config.marc_index_default_collation))
diff --git a/dlx/util.py b/dlx/util.py
index 37de978..4d2c016 100644
--- a/dlx/util.py
+++ b/dlx/util.py
@@ -61,7 +61,12 @@ class Table():
     def set(self, rowx, field_name, value):
         self.index.setdefault(rowx, {})
         self.index[rowx].setdefault(field_name, {})
-        self.index[rowx][field_name] = value
+
+        if existing := self.index[rowx].get(field_name):
+            # if this is a repeated subfield, append the next value 
+            self.index[rowx][field_name] += f'||{value}'
+        else:
+            self.index[rowx][field_name] = value
 
         if field_name not in self.header:
             self.header.append(field_name)

problem_statement: Handle repeated subfields in CSV/TSV export
Currently, in cases of fields with repeated subfield codes, only one of the subfields makes it into the serialization. This is due to the tabular nature of the serialization.

- [ ] Concatenate the values of repeated subfields into one string joined by a separator i.e. ";" or "||"
repo: dag-hammarskjold-library/dlx
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_marcset.py b/tests/test_marcset.py
index 21bac69..d7ff4b8 100644
--- a/tests/test_marcset.py
+++ b/tests/test_marcset.py
@@ -168,7 +168,7 @@ def test_to_csv(db):
     bibset = BibSet.from_query({})
     bibset.records = list(bibset.records)
     #[bib.set('001', None, str(bib.id)) for bib in bibset.records]
-    assert bibset.to_csv(write_id=True) == '1.001,1.245$a,1.245$b,1.245$c,1.520$a,2.520$a,1.650$a,1.710$a\n1,This,is the,title,Description,Repeated subfield,Header,Another header\n2,Another,is the,title,,,Header,'
+    assert bibset.to_csv(write_id=True) == '1.001,1.245$a,1.245$b,1.245$c,1.520$a,2.520$a,1.650$a,1.710$a\n1,This,is the,title,Description,Another description||Repeated subfield,Header,Another header\n2,Another,is the,title,,,Header,'
 
     # comma and quote handling
     bibs = BibSet()
task: metadata: install: pip install -e .
patch: diff --git a/README.md b/README.md
index 398cbb9..222a688 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Reloading the extension will remove all spaces.
 ```python
 %%space <space-name>
 alpha = 0.50
-print(alpha)
+alpha
 ```
 
 When you execute a cell within a space, all references are firstly searched in
@@ -51,33 +51,6 @@ execution equivalent to not using such keyword.
 Mutable objects in the user namespace can be altered (e.g. appending an item
 to a list).
 
-#### Console output
-
-Conversely to the standard usage of the Python console, you need to print
-objects explicitly (e.g. by using `print`).
-
-- No output to console
-    ```python
-    %%space <space-name>
-    100
-    ```
-- Output to console
-    ```python
-    %%space <space-name>
-    print(100)
-    ```
-
-If you want IPython to use more advanced representations, you can do so via
-IPython's display library (e.g. display a Pandas dataframe as a HTML table).
-
-```python
-%%space <space-name>
-from IPython.display import display
-from pandas import DataFrame
-dataframe = DataFrame(data=[[1, 2]])
-display(dataframe)
-```
-
 ### Remove a space
 
 ```python
diff --git a/jupyter_spaces/space.py b/jupyter_spaces/space.py
index 476a7a0..7c3b89e 100644
--- a/jupyter_spaces/space.py
+++ b/jupyter_spaces/space.py
@@ -1,3 +1,6 @@
+import ast
+import sys
+
 from jupyter_spaces.errors import RegistryError
 
 
@@ -101,7 +104,16 @@ class Space:
         Args:
             source (str): Source code.
         """
-        exec(source, self._execution_namespace)
+        tree = ast.parse(source=source)
+
+        interactive_tree = ast.Interactive(body=tree.body)
+        if sys.version_info > (3, 8):
+            interactive_tree.type_ignores = tree.type_ignores
+
+        compiled_interactive_tree = compile(
+            source=interactive_tree, filename="<string>", mode="single"
+        )
+        exec(compiled_interactive_tree, self._execution_namespace)
 
 
 class ExecutionNamespace(dict):

problem_statement: Automatic console output
It would be great if space cells would automatically print their return result similar to a normal cell. Having to use the print statement for output is cumbersome.
repo: davidesarra/jupyter_spaces
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_magics.py b/tests/test_magics.py
index e24cc1b..22da064 100644
--- a/tests/test_magics.py
+++ b/tests/test_magics.py
@@ -152,6 +152,11 @@ def test_get_spaces_reflects_extension_reload(ip):
     assert not ip.user_global_ns["spaces"]
 
 
+def test_space_outputs_to_console(ip, capsys):
+    ip.run_cell_magic(magic_name="space", line="tomato", cell="100")
+    assert capsys.readouterr().out == "100\n"
+
+
 def test_space_can_print_to_console(ip):
     with capture_output() as captured:
         ip.run_cell_magic(magic_name="space", line="tomato", cell="print(100)")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/setup.py b/setup.py
index a1dddaa..db14acc 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 
-VERSION = '0.2.2'
+VERSION = '0.2.3'
 
 
 setup(name='simple_json_logger',
diff --git a/simple_json_logger/formatter.py b/simple_json_logger/formatter.py
index b4eb58a..629eecb 100644
--- a/simple_json_logger/formatter.py
+++ b/simple_json_logger/formatter.py
@@ -1,7 +1,7 @@
 import logging
 try:
     from logging import _levelToName
-except ImportError:
+except ImportError:  # pragma: no cover
     from logging import _levelNames as _levelToName
 
 import traceback
@@ -32,7 +32,7 @@ class JsonFormatter(logging.Formatter):
             return obj.strftime(DATETIME_FORMAT)
         elif istraceback(obj):
             tb = ''.join(traceback.format_tb(obj))
-            return tb.strip()
+            return tb.strip().split('\n')
         elif isinstance(obj, Exception):
             return "Exception: %s" % str(obj)
         elif callable(obj):

problem_statement: Fix multiline log for stacktraces
Multiline stack traces must be formatted as a list of strings
repo: diogommartins/simple_json_logger
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_logger.py b/tests/test_logger.py
index a98e7f4..8094814 100644
--- a/tests/test_logger.py
+++ b/tests/test_logger.py
@@ -78,12 +78,11 @@ class LoggerTests(unittest.TestCase):
         json_log = json.loads(logged_content)
 
         exc_class, exc_message, exc_traceback = json_log['exc_info']
-        self.assertIn(member=exception_message,
-                      container=exc_message)
+        self.assertEqual('Exception: {}'.format(exception_message), exc_message)
 
         current_func_name = inspect.currentframe().f_code.co_name
-        self.assertIn(member=current_func_name,
-                      container=exc_traceback)
+        self.assertIn(current_func_name, exc_traceback[0])
+        self.assertIn('raise Exception(exception_message)', exc_traceback[1])
 
     def test_it_logs_datetime_objects(self):
         message = {
task: metadata: install: pip install -e .
patch: diff --git a/simulators/backend/sardara.py b/simulators/backend/sardara.py
index 1624328..93ebb57 100644
--- a/simulators/backend/sardara.py
+++ b/simulators/backend/sardara.py
@@ -1,3 +1,4 @@
+import re
 from simulators.backend.genericbackend import GenericBackendSystem
 
 
@@ -5,3 +6,4 @@ class System(GenericBackendSystem):
 
     def __init__(self):
         GenericBackendSystem.__init__(self)
+        self._valid_conf_re = re.compile("^[A-Z0-9]")

problem_statement: Sardara backend does not recognize configurations sent by DISCOS
We probably introduced a bug when reorganizing the backend simulators
repo: discos/simulators
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_backend.py b/tests/test_backend.py
index 5693c0c..44f432a 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -592,6 +592,17 @@ class TestSardara(unittest.TestCase):
     def test_sardara_instance(self):
         self.assertIsInstance(self.system, Sardara)
 
+    def test_sardara_set_configuration(self):
+        command = 'set-configuration'
+        configuration = 'SK77'
+        msg = f'?{command},{configuration}\r\n'
+        for byte in msg[:-1]:
+            self.assertTrue(self.system.parse(byte))
+        response = self.system.parse(msg[-1]).strip()
+        args = response.split(',')
+        self.assertEqual(args[0], f'!{command}')
+        self.assertEqual(args[1], 'ok')
+
 
 class TestMistral(unittest.TestCase):
task: metadata: install: pip install -e .
patch: diff --git a/dwave/cloud/solver.py b/dwave/cloud/solver.py
index 35b6221..d04eeec 100644
--- a/dwave/cloud/solver.py
+++ b/dwave/cloud/solver.py
@@ -143,7 +143,8 @@ class Solver(object):
 
         # Derived solver properties (not present in solver data properties dict)
         self.derived_properties = {
-            'qpu', 'software', 'online', 'num_active_qubits', 'avg_load', 'name'
+            'qpu', 'software', 'online', 'num_active_qubits', 'avg_load', 'name',
+            'lower_noise'
         }
 
     def __repr__(self):
@@ -219,6 +220,10 @@ class Solver(object):
         "Nominal number of qubits on chip (includes active AND inactive)."
         return self.properties.get('num_qubits')
 
+    @property
+    def lower_noise(self):
+        return "lower_noise" in self.properties.get("tags", [])
+
     def max_num_reads(self, **params):
         """Returns the maximum number of reads for the given solver parameters.
 

problem_statement: Expose lower_noise solver property
Create a derived property based on solver `tags`.
repo: dwavesystems/dwave-cloud-client
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_client.py b/tests/test_client.py
index f6c3a75..009e167 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -250,7 +250,8 @@ class FeatureBasedSolverSelection(unittest.TestCase):
                 "topology": {
                     "type": "chimera",
                     "shape": [16, 16, 4]
-                }
+                },
+                "tags": ["lower_noise"]
             },
             "id": "solver1",
             "description": "A test solver 1",
@@ -293,7 +294,8 @@ class FeatureBasedSolverSelection(unittest.TestCase):
                 # the following are only present in this solver
                 "some_set": [1, 2],
                 "some_range": [1, 2],
-                "some_string": "x"
+                "some_string": "x",
+                "tags": ["tag"]
             },
             "id": "c4-sw_solver3",
             "description": "A test of software solver",
@@ -339,6 +341,10 @@ class FeatureBasedSolverSelection(unittest.TestCase):
         self.assertSolvers(self.client.get_solvers(num_active_qubits=2), [self.solver3])
         self.assertSolvers(self.client.get_solvers(num_active_qubits__in=[2, 3]), [self.solver1, self.solver3])
 
+    def test_lower_noise_derived_property(self):
+        self.assertSolvers(self.client.get_solvers(lower_noise=True), [self.solver1])
+        self.assertSolvers(self.client.get_solvers(lower_noise=False), [self.solver2, self.solver3])
+
     def test_parameter_availability_check(self):
         self.assertSolvers(self.client.get_solvers(postprocess__available=True), [self.solver1])
         self.assertSolvers(self.client.get_solvers(postprocess=True), [self.solver1])
task: metadata: install: pip install -e .[drivers]
patch: diff --git a/dwave/system/warnings.py b/dwave/system/warnings.py
index e646ce3..3dc5d51 100644
--- a/dwave/system/warnings.py
+++ b/dwave/system/warnings.py
@@ -19,6 +19,7 @@ import logging
 import dimod
 import numpy as np
 import six
+import collections.abc as abc
 
 from dwave.embedding import broken_chains
 
@@ -186,8 +187,12 @@ class WarningHandler(object):
                 # strength
                 return
 
-        interactions = [uv for uv, bias in bqm.quadratic.items()
-                        if abs(bias) >= chain_strength]
+        if isinstance(chain_strength, abc.Mapping):
+            interactions = [(u, v) for (u, v), bias in bqm.quadratic.items()
+                            if abs(bias) >= min(chain_strength[u], chain_strength[v])]
+        else:
+            interactions = [uv for uv, bias in bqm.quadratic.items()
+                            if abs(bias) >= chain_strength]
 
         if interactions:
             self.issue("Some quadratic biases are stronger than the given "

problem_statement: dwave.system.warnings not compatible with iterable as chain strength parameter
Newer versions of the code allow the user to specify an individual value of chain strength for each chain by passing a dictionary to the sample function.

However, calling `sample_qubo` with `chain_strength = dict_of_chain_strengths`, `warnings.py` throws an error because it expects a scalar value as the chain strength parameter. Setting `warnings = "ignore"` bypasses the warnings function call and the system produces the desired behavior.

Obviously ignoring warnings is not desirable, so the warnings code should be updated to the new flexibility in chain strength input.
repo: dwavesystems/dwave-system
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_embedding_composite.py b/tests/test_embedding_composite.py
index 7fec85d..fe7139c 100644
--- a/tests/test_embedding_composite.py
+++ b/tests/test_embedding_composite.py
@@ -332,6 +332,26 @@ class TestEmbeddingComposite(unittest.TestCase):
                 count += 1
         self.assertEqual(count, 0)
 
+    def test_warnings_chain_strength_dict(self):
+        sampler = EmbeddingComposite(MockDWaveSampler())
+
+        linear = {'a': -1, 'b': -2, 'c': -3}
+        quadratic = {('a', 'b'): 1, ('a', 'c'): -1, ('b', 'c'): 2}
+        bqm = dimod.BQM(linear, quadratic, 0, dimod.SPIN)
+
+        chain_strength = {'a': 10, 'b': 20, 'c': 1.5}   
+        ss = sampler.sample(bqm, chain_strength=chain_strength, warnings='SAVE')
+
+        self.assertIn('warnings', ss.info)
+        self.assertEqual(len(ss.info['warnings']), 1)
+
+        warning = ss.info['warnings'][0]
+        self.assertEqual(warning['type'], ChainStrengthWarning)
+
+        interactions = warning['data']['source_interactions']
+        self.assertEqual(len(interactions), 1)
+        self.assertCountEqual(interactions[0], ('b','c'))
+
     def test_warnings_as_class_variable(self):
         G = dnx.chimera_graph(12)
task: metadata: install: pip install -e .
patch: diff --git a/elasticapm/contrib/serverless/aws.py b/elasticapm/contrib/serverless/aws.py
index 8fc14cbc..4bd2ae2f 100644
--- a/elasticapm/contrib/serverless/aws.py
+++ b/elasticapm/contrib/serverless/aws.py
@@ -261,8 +261,7 @@ class capture_serverless(object):
         elif self.source == "elb":
             elb_target_group_arn = self.event["requestContext"]["elb"]["targetGroupArn"]
             faas["trigger"]["type"] = "http"
-            faas["trigger"]["request_id"] = self.event["headers"]["x-amzn-trace-id"]
-            service_context["origin"] = {"name": elb_target_group_arn.split(":")[5]}
+            service_context["origin"] = {"name": elb_target_group_arn.split(":")[5].split("/")[1]}
             service_context["origin"]["id"] = elb_target_group_arn
             cloud_context["origin"] = {}
             cloud_context["origin"]["service"] = {"name": "elb"}

problem_statement: [META 679] Add support for ELB and Lambda URL metadata in lambda integrations
See meta issue for the description and details:
- Meta issue: https://github.com/elastic/apm/issues/679

repo: elastic/apm-agent-python
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/contrib/serverless/aws_tests.py b/tests/contrib/serverless/aws_tests.py
index 55331c9a..15264cad 100644
--- a/tests/contrib/serverless/aws_tests.py
+++ b/tests/contrib/serverless/aws_tests.py
@@ -265,6 +265,7 @@ def test_capture_serverless_elb(event_elb, context, elasticapm_client):
     assert transaction["context"]["request"]["method"] == "POST"
     assert transaction["context"]["request"]["headers"]
     assert transaction["context"]["response"]["status_code"] == 200
+    assert transaction["context"]["service"]["origin"]["name"] == "lambda-279XGJDqGZ5rsrHC2Fjr"
 
 
 def test_capture_serverless_s3(event_s3, context, elasticapm_client):
task: metadata: install: pip install -e .[dev]
patch: diff --git a/httpx/_content_streams.py b/httpx/_content_streams.py
index 5f3237e..afffed3 100644
--- a/httpx/_content_streams.py
+++ b/httpx/_content_streams.py
@@ -323,7 +323,7 @@ def encode(
     Handles encoding the given `data`, `files`, and `json`, returning
     a `ContentStream` implementation.
     """
-    if data is None:
+    if not data:
         if json is not None:
             return JSONStream(json=json)
         elif files:
@@ -331,7 +331,7 @@ def encode(
         else:
             return ByteStream(body=b"")
     elif isinstance(data, dict):
-        if files is not None:
+        if files:
             return MultipartStream(data=data, files=files, boundary=boundary)
         else:
             return URLEncodedStream(data=data)

problem_statement: Redundant `boundary` if files/data is empty
If you try to send a post request with empty data and files — you will create a body with one `--boundary--` string, which can break the server.

It's because httpx create MultipartStream for `data={}, files={}`:
https://github.com/encode/httpx/blob/a82adcc933345c6b8cb1623b031eb85723e7665b/httpx/_content_streams.py#L332-L334

And this MultipartStream doesn't have special behavior for empty data/files:
https://github.com/encode/httpx/blob/a82adcc933345c6b8cb1623b031eb85723e7665b/httpx/_content_streams.py#L277-L283

Reproducible example:

```
from httpx.content_streams import encode

stream = encode(data={}, files={}, boundary=b"+++")
print(b"".join([part for part in stream]))
# b'--+++--\r\n'
```

I see two ways to solve it:
1. Check files not only for None but also for emptiness in `_content_streams.decode`
2. Check the count of fields in `MultipartStream.__init__` and doesn't write anything if fields are empty.

I already opened PR (#861) with a test example. If someone tells me which of these options is better, I will be happy to implement it  🙌
repo: encode/httpx
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_content_streams.py b/tests/test_content_streams.py
index 6aa91f4..c5eb961 100644
--- a/tests/test_content_streams.py
+++ b/tests/test_content_streams.py
@@ -189,6 +189,18 @@ async def test_multipart_data_and_files_content():
     )
 
 
+@pytest.mark.asyncio
+async def test_empty_request():
+    stream = encode(data={}, files={})
+    sync_content = b"".join([part for part in stream])
+    async_content = b"".join([part async for part in stream])
+
+    assert stream.can_replay()
+    assert stream.get_headers() == {}
+    assert sync_content == b""
+    assert async_content == b""
+
+
 def test_invalid_argument():
     with pytest.raises(TypeError):
         encode(123)
task: metadata: install: pip install -e .[full]
patch: diff --git a/docs/staticfiles.md b/docs/staticfiles.md
index 448cc3b..cc8db5e 100644
--- a/docs/staticfiles.md
+++ b/docs/staticfiles.md
@@ -1,7 +1,12 @@
 
-Starlette also includes a `StaticFiles` class for serving a specific directory:
+Starlette also includes a `StaticFiles` class for serving files in a given directory:
 
-* `StaticFiles(directory)` - Serve any files in the given `directory`.
+### StaticFiles
+
+Signature: `StaticFiles(directory, check_dir=True)`
+
+* `directory` - A string denoting the directory path
+* `check_dir` - Ensure that the directory exists upon instantiation. Defaults to `True`
 
 You can combine this ASGI application with Starlette's routing to provide
 comprehensive static file serving.
diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py
index 8a7527a..ec2418e 100644
--- a/starlette/staticfiles.py
+++ b/starlette/staticfiles.py
@@ -8,7 +8,9 @@ from starlette.types import ASGIInstance, Receive, Scope, Send
 
 
 class StaticFiles:
-    def __init__(self, *, directory: str) -> None:
+    def __init__(self, *, directory: str, check_dir: bool = True) -> None:
+        if check_dir and not os.path.isdir(directory):
+            raise RuntimeError("Directory '%s' does not exist" % directory)
         self.directory = directory
         self.config_checked = False
 

problem_statement: Check directory exists when instantiating `StaticFiles`
The `StaticFiles` application should ensure that the directory exists at the point it is instantiated.

(With an optional switch to turn this behavior off)
repo: encode/starlette
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_staticfiles.py b/tests/test_staticfiles.py
index 9d12de8..84f3368 100644
--- a/tests/test_staticfiles.py
+++ b/tests/test_staticfiles.py
@@ -54,9 +54,16 @@ def test_staticfiles_with_missing_file_returns_404(tmpdir):
     assert response.text == "Not Found"
 
 
+def test_staticfiles_instantiated_with_missing_directory(tmpdir):
+    with pytest.raises(RuntimeError) as exc:
+        path = os.path.join(tmpdir, "no_such_directory")
+        app = StaticFiles(directory=path)
+    assert "does not exist" in str(exc)
+
+
 def test_staticfiles_configured_with_missing_directory(tmpdir):
     path = os.path.join(tmpdir, "no_such_directory")
-    app = StaticFiles(directory=path)
+    app = StaticFiles(directory=path, check_dir=False)
     client = TestClient(app)
     with pytest.raises(RuntimeError) as exc:
         client.get("/example.txt")
@@ -68,7 +75,7 @@ def test_staticfiles_configured_with_file_instead_of_directory(tmpdir):
     with open(path, "w") as file:
         file.write("<file content>")
 
-    app = StaticFiles(directory=path)
+    app = StaticFiles(directory=path, check_dir=False)
     client = TestClient(app)
     with pytest.raises(RuntimeError) as exc:
         client.get("/example.txt")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/enochecker/enochecker.py b/src/enochecker/enochecker.py
index fc8dbbc..976688e 100644
--- a/src/enochecker/enochecker.py
+++ b/src/enochecker/enochecker.py
@@ -287,7 +287,6 @@ class BaseChecker(metaclass=_CheckerMeta):
             )
             round_id = round_id or round
         self.round: Optional[int] = round_id
-        self.current_round: Optional[int] = round_id
         self.flag_round: Optional[int] = flag_round
         self.round_length: int = round_length
         self.flag: Optional[str] = flag
@@ -359,6 +358,18 @@ class BaseChecker(metaclass=_CheckerMeta):
         self.error: Callable[..., None] = self.logger.error
         self.critical: Callable[..., None] = self.logger.critical
 
+    @property
+    def current_round(self) -> Optional[int]:
+        """
+        Deprecated! Only for backwards compatibility! Use self.round instead.
+
+        :return: current round
+        """
+        warnings.warn(
+            "current_round is deprecated, use round instead", DeprecationWarning
+        )
+        return self.round
+
     @property
     def noise(self) -> Optional[str]:
         """

problem_statement: Deprecate self.round or self.current_round
I'm not sure which one to keep, but I would replace the other one with:

```
@property
def current_round(self):
    raise DeprecationWarning(...)
    return self.round
```
repo: enowars/enochecker
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_enochecker.py b/tests/test_enochecker.py
index 948b888..91009c1 100644
--- a/tests/test_enochecker.py
+++ b/tests/test_enochecker.py
@@ -267,6 +267,13 @@ def test_checker():
 
     assert CheckerExampleImpl(method="havoc").run().result == Result.OFFLINE
 
+    c = CheckerExampleImpl(method="putflag", round_id=1337)
+    with pytest.deprecated_call():
+        assert c.current_round == 1337
+    c.round = 15
+    with pytest.deprecated_call():
+        assert c.current_round == c.round
+
 
 @temp_storage_dir
 def test_useragents():