dyyyyyyyy/swe-rebench-filtered-1150 huggingface dataset:
task: metadata: install: pip install -e .[all]
patch: diff --git a/skfem/assembly/basis/abstract_basis.py b/skfem/assembly/basis/abstract_basis.py
index 63290000..d352694e 100644
--- a/skfem/assembly/basis/abstract_basis.py
+++ b/skfem/assembly/basis/abstract_basis.py
@@ -295,13 +295,13 @@ class AbstractBasis:
 
         # loop over solution components
         for c in range(len(refs)):
-            ref = refs[c][1].basis[0][0]
-            ref = ref.astuple
-            fs = []
+            ref = refs[c][1].basis[0][0].astuple
 
-            def linear_combination(n, refn):
+            def linear_combination(n):
                 """Global discrete function at quadrature points."""
-                out = np.zeros_like(refn, dtype=w.dtype)
+                out = 0. * np.einsum('...,...j->...j',
+                                     w[self.element_dofs[0]],
+                                     self.basis[0][c].get(n))
                 for i in range(self.Nbfun):
                     values = w[self.element_dofs[i]]
                     out += np.einsum('...,...j->...j', values,
@@ -309,9 +309,10 @@ class AbstractBasis:
                 return out
 
             # interpolate DiscreteField
+            fs = []
             for n in range(len(ref)):
                 if ref[n] is not None:
-                    fs.append(linear_combination(n, ref[n]))
+                    fs.append(linear_combination(n))
                 else:
                     fs.append(None)
 

problem_statement: FacetBasis on a set of facets with ElementComposite not working
```python
from skfem import *

mesh = MeshTri().refined(3)

facet_basis = FacetBasis(mesh, ElementTriP1() * ElementTriP1(), facets='left')
facet_basis.interpolate(facet_basis.zeros())
```
results in
```
ValueError: operands could not be broadcast together with shapes (32,3) (8,3) (32,3) 
```
repo: kinnala/scikit-fem
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_basis.py b/tests/test_basis.py
index d77533ad..c39fd890 100644
--- a/tests/test_basis.py
+++ b/tests/test_basis.py
@@ -117,6 +117,13 @@ class TestCompositeFacetAssembly(TestCase):
         assert_allclose(A[0].todense()[0, ::2],
                         C[0].todense()[0])
 
+        y = fbasis1.zeros()
+        y[fbasis1.get_dofs('left')] = 1
+        assert_allclose(
+            fbasis1.project(fbasis1.interpolate(fbasis1.ones())),
+            y,
+        )
+
 
 class TestFacetExpansion(TestCase):
task: metadata: install: pip install -e .[test]
patch: diff --git a/CHANGES.rst b/CHANGES.rst
index ab8d128..41c7cdc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,6 +4,12 @@ Changelog
 Here you can see the full list of changes between each intervals release.
 
 
+0.9.1 (2020-12-31)
+^^^^^^^^^^^^^^^^^^
+
+- Fixed discrete interval length (#53)
+
+
 0.9.0 (2020-07-16)
 ^^^^^^^^^^^^^^^^^^
 
diff --git a/intervals/__init__.py b/intervals/__init__.py
index 1636366..32d7508 100644
--- a/intervals/__init__.py
+++ b/intervals/__init__.py
@@ -32,4 +32,4 @@ __all__ = (
 )
 
 
-__version__ = '0.9.0'
+__version__ = '0.9.1'
diff --git a/intervals/interval.py b/intervals/interval.py
index 81bb4b9..9d27a28 100644
--- a/intervals/interval.py
+++ b/intervals/interval.py
@@ -456,6 +456,11 @@ class AbstractInterval(object):
 
     @property
     def length(self):
+        if self.discrete:
+            if not self:
+                return 0
+            if not self.lower_inc or not self.upper_inc:
+                return canonicalize(self, lower_inc=True, upper_inc=True).length
         return abs(self.upper - self.lower)
 
     @property

problem_statement: length should return the actual length for discrete intervals
``IntInterval.from_string('[0, 2)').length`` should be `1` not `2`
repo: kvesteri/intervals
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/interval/test_properties.py b/tests/interval/test_properties.py
index d70a8e8..083c9a4 100644
--- a/tests/interval/test_properties.py
+++ b/tests/interval/test_properties.py
@@ -15,16 +15,20 @@ from intervals import (
 
 class TestIntervalProperties(object):
     @mark.parametrize(
-        ('number_range', 'length'),
+        ('interval', 'length'),
         (
-            ([1, 4], 3),
-            ([-1, 1], 2),
-            ((-inf, inf), inf),
-            ((1, inf), inf),
+            (IntInterval([1, 4]), 3),
+            (IntInterval([-1, 1]), 2),
+            (IntInterval([-inf, inf]), inf),
+            (IntInterval([1, inf]), inf),
+            (IntInterval.from_string('(0, 3)'), 1),
+            (IntInterval.from_string('[0, 3)'), 2),
+            (IntInterval.from_string('(0, 2)'), 0),
+            (IntInterval.from_string('(0, 1)'), 0)
         )
     )
-    def test_length(self, number_range, length):
-        assert IntInterval(number_range).length == length
+    def test_length(self, interval, length):
+        assert interval.length == length
 
     @mark.parametrize(
         ('number_range', 'radius'),
task: metadata: install: pip install -e .[test]
patch: diff --git a/zookeeper/core/component.py b/zookeeper/core/component.py
index b16b97e..dccfa79 100644
--- a/zookeeper/core/component.py
+++ b/zookeeper/core/component.py
@@ -694,6 +694,8 @@ def configure_component_instance(
     if hasattr(instance.__class__, "__post_configure__"):
         instance.__post_configure__()
 
+    return conf
+
 
 ######################
 # Exported functions #
@@ -852,7 +854,7 @@ def configure(
         if current_instance.__component_configured__:
             continue
 
-        configure_component_instance(
+        current_conf = configure_component_instance(
             current_instance,
             conf=current_conf,
             name=current_name,

problem_statement: `__pre_configure__` doesn't work with nested components
### Describe the bug

When `__pre_configure__` is used to modify the configuration dict of a component, the modified config is (incorrectly) _not_ passed to `configure` when called on its sub-components.

### To Reproduce

```python
    @component
    class Child:
        a: int = Field(4)

    @component
    class Parent:
        a: int = Field(2)
        child: Child = ComponentField()

        def __pre_configure__(self, conf):
            if "a" in conf:
                return {"child.a": conf["a"] * 7, **conf}
            return conf

    parent = Parent()
    configure(parent, {"a": 6})
    assert parent.a == 6
    assert parent.child.a == 42
```

The second assertion fails (the value is 6).

### Expected behavior

The value should be 6 * 7 = 42.

### Environment

TensorFlow version: N/A
Zookeeper version: v1.3.1

repo: larq/zookeeper
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/zookeeper/core/component_test.py b/zookeeper/core/component_test.py
index fc4fce6..46187bf 100644
--- a/zookeeper/core/component_test.py
+++ b/zookeeper/core/component_test.py
@@ -821,6 +821,25 @@ def test_component_pre_configure():
     configure(instance, {"x": 7})
     assert instance.x == 14
 
+    @component
+    class Child:
+        a: int = Field(4)
+
+    @component
+    class Parent:
+        a: int = Field(2)
+        child: Child = ComponentField()
+
+        def __pre_configure__(self, conf):
+            if "a" in conf:
+                return {"child.a": conf["a"] * 7, **conf}
+            return conf
+
+    parent = Parent()
+    configure(parent, {"a": 6})
+    assert parent.a == 6
+    assert parent.child.a == 42
+
 
 def test_component_pre_configure_setattr():
     @component
task: metadata: install: pip install -e .
patch: diff --git a/mistune.py b/mistune.py
index 5b05fcb..175ff01 100644
--- a/mistune.py
+++ b/mistune.py
@@ -503,7 +503,7 @@ class InlineLexer(object):
         'linebreak', 'strikethrough', 'text',
     ]
     inline_html_rules = [
-        'escape', 'autolink', 'url', 'link', 'reflink',
+        'escape', 'inline_html', 'autolink', 'url', 'link', 'reflink',
         'nolink', 'double_emphasis', 'emphasis', 'code',
         'linebreak', 'strikethrough', 'text',
     ]

problem_statement: nested html links are broken with parse_block_html 
this is a variant of #81

    example_in = '<div><a href="https://example.com">Example.com</a></div>'
    mistune.markdown(example_in, escape=False, parse_block_html=True)

will generate:

    <div><a href="<a href="https://example.com"&gt;Example.com">https://example.com"&gt;Example.com</a></a></div>

if escape is toggled to True, it is also broken:

   '&lt;div&gt;&lt;a href="&lt;a href="https://example.com"&gt;Example.com"&gt;https://example.com"&gt;Example.com&lt;/a&gt;&lt;/a&gt;&lt;/div&gt;

repo: lepture/mistune
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_extra.py b/tests/test_extra.py
index c1d37d9..3cb9799 100644
--- a/tests/test_extra.py
+++ b/tests/test_extra.py
@@ -116,6 +116,21 @@ def test_parse_block_html():
     assert '<strong>' not in ret
 
 
+def test_parse_nested_html():
+    ret = mistune.markdown(
+        '<div><a href="http://example.org">**foo**</a></div>',
+        parse_block_html=True, escape=False
+    )
+    assert '<div><a href="http://example.org">' in ret
+    assert '<strong>' not in ret
+
+    ret = mistune.markdown(
+        '<div><a href="http://example.org">**foo**</a></div>',
+        parse_block_html=True, parse_inline_html=True, escape=False
+    )
+    assert '<div><a href="http://example.org"><strong>' in ret
+
+
 def test_trigger_more_cases():
     markdown = mistune.Markdown(
         inline=mistune.InlineLexer,
task: metadata: install: pip install -e .[full]
patch: diff --git a/compress_pickle/__init__.py b/compress_pickle/__init__.py
index a9221a9..1471ef4 100644
--- a/compress_pickle/__init__.py
+++ b/compress_pickle/__init__.py
@@ -4,4 +4,4 @@ from . import compressers
 from . import picklers
 from . import io
 
-__version__ = "2.0.0"
+__version__ = "2.0.1"
diff --git a/compress_pickle/utils.py b/compress_pickle/utils.py
index f172d63..4e226ad 100644
--- a/compress_pickle/utils.py
+++ b/compress_pickle/utils.py
@@ -135,4 +135,4 @@ def _infer_compression_from_path(path: PathType) -> Optional[str]:
 
 def _set_default_extension(path: PathType, compression: Optional[str]) -> str:
     root, current_ext = splitext(_stringyfy_path(path))
-    return root + get_default_compression_mapping()[compression]
+    return root + "." + get_default_compression_mapping()[compression]

problem_statement: File ending with `.pkl.gz` is stored as `.pklgz`
Hello @lucianopaz,

Thank you for making this library!

I wanted to ask why, if the provided path is `.pkl.gz`, the files are stored as `.pklgz`.
This feels like an undesired default behaviour that may be, if necessary, enabled with a flag, as it breaks libraries that depend on the files to be stored as the given path requires.

Ciao e Grazie,
Luca
repo: lucianopaz/compress_pickle
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_utils.py b/tests/test_utils.py
index 8b54c9e..6ec6fcc 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,6 +1,12 @@
 import pytest
 import io
-from compress_pickle.utils import _stringyfy_path, _infer_compression_from_path
+from os.path import splitext
+from compress_pickle.compressers.registry import get_default_compression_mapping
+from compress_pickle.utils import (
+    _stringyfy_path,
+    _infer_compression_from_path,
+    _set_default_extension,
+)
 
 
 def test_stringify_path():
@@ -10,6 +16,17 @@ def test_stringify_path():
         _stringyfy_path({"a"})
 
 
+@pytest.mark.usefixtures("compressions")
+def test_set_default_extension(compressions):
+    root = "somepath.someotherstuff"
+    path = root + ".ext"
+    new_path = _set_default_extension(path, compression=compressions)
+    assert splitext(new_path) == (
+        root,
+        "." + get_default_compression_mapping()[compressions],
+    )
+
+
 @pytest.mark.usefixtures("valid_extensions")
 def test_infer_compression_from_path(valid_extensions):
     extension, compression = valid_extensions
task: metadata: install: pip install -e .
patch: diff --git a/sql_metadata/keywords_lists.py b/sql_metadata/keywords_lists.py
index b20e12d..3414f1c 100644
--- a/sql_metadata/keywords_lists.py
+++ b/sql_metadata/keywords_lists.py
@@ -76,6 +76,7 @@ class QueryType(str, Enum):
     SELECT = "SELECT"
     CREATE = "CREATE TABLE"
     ALTER = "ALTER TABLE"
+    DROP = "DROP TABLE"
 
 
 class TokenType(str, Enum):
@@ -102,6 +103,7 @@ SUPPORTED_QUERY_TYPES = {
     "WITH": QueryType.SELECT,
     "CREATETABLE": QueryType.CREATE,
     "ALTERTABLE": QueryType.ALTER,
+    "DROPTABLE": QueryType.DROP,
 }
 
 # all the keywords we care for - rest is ignored in assigning
diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 03f72d8..d4fd473 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -112,7 +112,7 @@ class Parser:  # pylint: disable=R0902
             )
             .position
         )
-        if tokens[index].normalized in ["CREATE", "ALTER"]:
+        if tokens[index].normalized in ["CREATE", "ALTER", "DROP"]:
             switch = tokens[index].normalized + tokens[index + 1].normalized
         else:
             switch = tokens[index].normalized

problem_statement: Issue with table extraction for delete and drop query type
hi, 

Do you know why or when the above query type (delete, drop) should be supported? Or why it's not supported by now?

thanks.
repo: macbre/sql-metadata
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/test_drop_table.py b/test/test_drop_table.py
new file mode 100644
index 0000000..8764020
--- /dev/null
+++ b/test/test_drop_table.py
@@ -0,0 +1,9 @@
+from sql_metadata import Parser
+from sql_metadata.keywords_lists import QueryType
+
+
+def test_drop_table():
+    parser = Parser("DROP TABLE foo")
+    assert parser.query_type == QueryType.DROP
+    assert parser.tables == ["foo"]
+    assert parser.columns == []
diff --git a/test/test_query_type.py b/test/test_query_type.py
index 15f9fae..44b8f33 100644
--- a/test/test_query_type.py
+++ b/test/test_query_type.py
@@ -38,6 +38,16 @@ def test_delete_query():
             assert "DELETE" == Parser(query.format(comment)).query_type
 
 
+def test_drop_table_query():
+    queries = [
+        "{0}DROP TABLE foo;{0}",
+    ]
+
+    for query in queries:
+        for comment in ["", "/* foo */", "\n--foo\n", "\n# foo\n"]:
+            assert "DROP TABLE" == Parser(query.format(comment)).query_type
+
+
 def test_unsupported_query():
     queries = [
         "FOO BAR",
task: metadata: install: pip install -e .
patch: diff --git a/upt_macports/upt_macports.py b/upt_macports/upt_macports.py
index a8bf18f..59e1fe4 100644
--- a/upt_macports/upt_macports.py
+++ b/upt_macports/upt_macports.py
@@ -32,7 +32,7 @@ class MacPortsPackage(object):
             spdx2macports = json.loads(f.read())
 
         return ' '.join([spdx2macports.get(license.spdx_identifier, 'unknown')
-                        for license in self.upt_pkg.licenses])
+                        for license in self.upt_pkg.licenses]) or 'unknown'
 
     def _depends(self, phase):
         return self.upt_pkg.requirements.get(phase, [])

problem_statement: Update port
The `py-upt-macports` port is currently generating defunct packages, including #11 and printing empty licence name (https://github.com/macports/macports-ports/pull/4489).

Can you please update the `Portfile`?

@rajdeepbharati 
repo: macports/upt-macports
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/upt_macports/tests/test_macports_package.py b/upt_macports/tests/test_macports_package.py
index b876f67..2b78a14 100644
--- a/upt_macports/tests/test_macports_package.py
+++ b/upt_macports/tests/test_macports_package.py
@@ -10,7 +10,7 @@ class TestMacPortsPackageLicenses(unittest.TestCase):
 
     def test_no_licenses(self):
         self.package.upt_pkg.licenses = []
-        expected = ''
+        expected = 'unknown'
         self.assertEqual(self.package.licenses, expected)
 
     def test_one_license(self):
task: metadata: install: pip install -e .[test,docs]
patch: diff --git a/magpylib/_src/display/traces_generic.py b/magpylib/_src/display/traces_generic.py
index 9d82a48c..b1d37229 100644
--- a/magpylib/_src/display/traces_generic.py
+++ b/magpylib/_src/display/traces_generic.py
@@ -63,6 +63,7 @@ class MagpyMarkers:
             "y": y,
             "z": z,
             "mode": "markers",
+            "showlegend": style.legend.show,  # pylint: disable=no-member
             **marker_kwargs,
             **kwargs,
         }

problem_statement: Marker-legend is not suppressible
See title :)


```python
import magpylib as magpy

cube = magpy.magnet.Cuboid(
    polarization=(1,2,3),
    dimension=(1,2,3),
)
cube.show(markers=[(0,0,0)], style_legend_show=True)
```

![image](https://github.com/magpylib/magpylib/assets/47384012/e9bd0868-42eb-49e2-9574-eda49baa571c)

```python
cube.show(markers=[(0,0,0)], style_legend_show=False)
``` 

![image](https://github.com/magpylib/magpylib/assets/47384012/5279b0f4-0be4-4f91-8929-4a14f620e6b6)



repo: magpylib/magpylib
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_display_plotly.py b/tests/test_display_plotly.py
index b9f51abf..93dc908d 100644
--- a/tests/test_display_plotly.py
+++ b/tests/test_display_plotly.py
@@ -383,3 +383,13 @@ def test_legends():
     )
     assert [t.name for t in fig.data] == ["Plotly extra trace (1m|1m|1m)"] * 4
     assert [t.showlegend for t in fig.data] == [True, False, False, False]
+
+    fig = magpy.show(
+        markers=[(0, 0, 0)],
+        backend="plotly",
+        style_legend_show=False,
+        return_fig=True,
+    )
+
+    assert [t.name for t in fig.data] == ["Marker"]
+    assert [t.showlegend for t in fig.data] == [False]
task: metadata: install: pip install -e .[webpage,dev]
patch: diff --git a/manubot/cite/isbn.py b/manubot/cite/isbn.py
index ffe64c9..b9ceec5 100644
--- a/manubot/cite/isbn.py
+++ b/manubot/cite/isbn.py
@@ -100,7 +100,7 @@ def get_isbn_csl_item_citoid(isbn: str):
         csl_item["title"] = mediawiki["title"]
     if "author" in mediawiki:
         csl_author = list()
-        for last, first in mediawiki["author"]:
+        for first, last in mediawiki["author"]:
             csl_author.append({"given": first, "family": last})
         if csl_author:
             csl_item["author"] = csl_author

problem_statement: manubot cite supplies the first name and last name swapped
This behavior already started a couple of weeks ago:

```
$ manubot cite isbn:9789027416261
## WARNING
Error parsing search_query output as JSON for isbn:9789027416261:
No items returned from any translator
## WARNING
Error in get_isbn_csl_item_zotero for 9789027416261 due to a JSONDecodeError:
Expecting value: line 1 column 1 (char 0)
```
```json
[
  {
    "type": "book",
    "title": "Authentiek leiderschap : een kwestie van wil en moed",
    "author": [
      {
        "given": "Bontje",
        "family": "J.C.B."
      }
    ],
    "issued": {
      "date-parts": [
        [
          2005
        ]
      ]
    },
    "publisher": "Spectrum",
    "publisher-place": "Utrecht",
    "edition": "1e dr",
    "abstract": "Studie over leidinggeven in bedrijven, praktisch uitgewerkt door interviews met vooraanstaande leidinggevenden",
    "ISBN": "9789027416261",
    "source": "WorldCat",
    "URL": "https://www.worldcat.org/oclc/65941902",
    "id": "tw8amfdb",
    "note": "This CSL Item was generated by Manubot v0.5.2 from its persistent identifier (standard_id).\nstandard_id: isbn:9789027416261"
  }
]
```
repo: manubot/manubot
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/manubot/cite/tests/test_isbn.py b/manubot/cite/tests/test_isbn.py
index cb972d6..5d442c6 100644
--- a/manubot/cite/tests/test_isbn.py
+++ b/manubot/cite/tests/test_isbn.py
@@ -42,3 +42,14 @@ def test_get_isbn_csl_item_zotero_with_note_issue():
     isbn = "9780262517638"
     csl_item = get_isbn_csl_item_zotero(isbn)
     assert csl_item["author"][0]["family"] == "Suber"
+
+
+def test_get_isbn_csl_item_citoid_author_order():
+    """
+    Confirm author order is parsed correctly
+    https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/9781801819312
+    https://www.mediawiki.org/wiki/Citoid/API#mediawiki
+    """
+    csl_item = get_isbn_csl_item_citoid("9781801819312")
+    assert csl_item["author"][0]["given"] == "Sebastian"
+    assert csl_item["author"][0]["family"] == "Raschka"
task: metadata: install: pip install -e .[test,doc]
patch: diff --git a/asyncstdlib/functools.py b/asyncstdlib/functools.py
index 5bd874c..1e33091 100644
--- a/asyncstdlib/functools.py
+++ b/asyncstdlib/functools.py
@@ -116,14 +116,9 @@ class CachedProperty:
         return self._get_attribute(instance)
 
     async def _get_attribute(self, instance) -> T:
-        attributes = instance.__dict__
-        try:
-            return attributes[self._name]
-        except KeyError:
-            value = await self.__wrapped__(instance)
-            if self._name not in attributes:
-                attributes[self._name] = AwaitableValue(value)
-            return value
+        value = await self.__wrapped__(instance)
+        instance.__dict__[self._name] = AwaitableValue(value)
+        return value
 
 
 cached_property = CachedProperty

problem_statement: Check functools.cached_property return value nesting
The handling of the return value in `functools.cached_property` appears to be too deeply/shallowly nested with awaitables. Wrapping of the original method means:

- `__wrapped__` is of type `(Self) -> await T`
- `value = await self.__wrapped__(instance)` is of type `T`
- `attributes[self._name] = AwaitableValue(value)` is of type `await T`

Now here comes the problem: The helper method has two `return` paths, one for `return value` (``... -> T``) and one for `return attributes[self._name]` (``... -> await T``)! It cannot be correct for both paths.

I assume the latter path is dead in the unit-tests, and I'm somewhat sure it cannot ever be reached. Either way, this should be tested and if necessary fixed or cleaned up.
repo: maxfischer2781/asyncstdlib
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/unittests/test_functools.py b/unittests/test_functools.py
index d8257f5..9d13530 100644
--- a/unittests/test_functools.py
+++ b/unittests/test_functools.py
@@ -35,12 +35,11 @@ async def test_cache_property_nodict():
             __slots__ = "a", "b"
 
             def __init__(self, a, b):
-                self.a = a
-                self.b = b
+                pass  # pragma: no cover
 
             @a.cached_property
             async def total(self):
-                return self.a + self.b
+                pass  # pragma: no cover
 
 
 @multi_sync
@@ -62,7 +61,7 @@ async def test_cache_property_order():
     val = Value(0)
     await Schedule(check_increment(5), check_increment(12), check_increment(1337))
     assert (await val.cached) != 0
-    assert (await val.cached) == 5  # first value fetched
+    assert (await val.cached) == 1337  # last value fetched
 
 
 @sync
task: metadata: install: pip install -e .[dev]
patch: diff --git a/galois/_polys/_poly.py b/galois/_polys/_poly.py
index 182703a7d..3d7c9bf76 100644
--- a/galois/_polys/_poly.py
+++ b/galois/_polys/_poly.py
@@ -1513,7 +1513,7 @@ class Poly:
                 if self._nonzero_degrees.size == 0:
                     self._degree = 0
                 else:
-                    self._degree = max(self._nonzero_degrees)
+                    self._degree = int(max(self._nonzero_degrees))
             elif hasattr(self, "_integer"):
                 if self._integer == 0:
                     self._degree = 0

problem_statement: galois.is_irreducible(poly) seems to return some false negatives in large odd exponent GFs
Hi Matt, hope all is well.

Even though it works fine for other groups (e.g. even groups likes GF(2^256) work well), still I 've been getting the following false negative result when using the galois.is_irreducible(poly) over odd groups tο produce irreducible polynomials over GF(2^233). 

For example, we know from previous publications and research that x^233+x^74+1 is irreducible over GF(2) for creating the quotient ring of GF(2^233) but the following code returns Null for every polynomial (including the aforementioned one):
```
def loop_init_trinomial():
    #initial detection loop
    for k in range(1, 233):
        poly = galois.Poly.Degrees([233, k, 0])
        if galois.is_irreducible(poly):
            print("Found one: ", k, poly, poly.string)
```
Care to share some thoughts?
repo: mhostetter/galois
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/polys/test_irreducible_polys.py b/tests/polys/test_irreducible_polys.py
index f3aefef69..de10d0934 100644
--- a/tests/polys/test_irreducible_polys.py
+++ b/tests/polys/test_irreducible_polys.py
@@ -111,3 +111,11 @@ def test_irreducible_polys_exceptions():
 def test_irreducible_polys(order, degree):
     LUT = eval(f"IRREDUCIBLE_POLYS_{order}_{degree}")
     assert [f.coeffs.tolist() for f in galois.irreducible_polys(order, degree)] == LUT
+
+
+def test_large_degree():
+    """
+    See https://github.com/mhostetter/galois/issues/360.
+    """
+    f = galois.Poly.Degrees([233, 74, 0])
+    assert galois.is_irreducible(f)
task: metadata: install: pip install -e .[dev]
patch: diff --git a/README.md b/README.md
index 2780dde..e365664 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ with pipes() as (out, err):
 stdout = out.read()
 ```
 
-Capture both stdout and stderr in a single StringIO object:
+Capture stdout/stderr in StringIO:
 
 ```python
 from io import StringIO
diff --git a/wurlitzer.py b/wurlitzer.py
index 39089a7..75efe68 100644
--- a/wurlitzer.py
+++ b/wurlitzer.py
@@ -209,6 +209,7 @@ class Wurlitzer:
         real_fd = getattr(sys, '__%s__' % name).fileno()
         save_fd = os.dup(real_fd)
         self._save_fds[name] = save_fd
+        self._real_fds[name] = real_fd
 
         try:
             capture_fd = getattr(self, "_" + name).fileno()
@@ -233,7 +234,6 @@ class Wurlitzer:
 
         dup2(pipe_in, real_fd)
         os.close(pipe_in)
-        self._real_fds[name] = real_fd
 
         # make pipe_out non-blocking
         flags = fcntl(pipe_out, F_GETFL)

problem_statement: pipes are not redirected back in 3.1.0
```python
import wurlitzer
with open("log", "w") as f, wurlitzer.pipes(f):
        print("foo")
print("bar")
```

In 3.0.3, it will print `bar`. But in 3.1.0 it will print nothing and `bar` is also in `log`. Tested on MacOS and Linux.
repo: minrk/wurlitzer
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test.py b/test.py
index 78bdada..366f313 100644
--- a/test.py
+++ b/test.py
@@ -229,6 +229,9 @@ def test_two_file_pipes(tmpdir):
             assert w.thread is None
             printf("some stdout")
             printf_err("some stderr")
+        # make sure capture stopped
+        printf("after stdout")
+        printf_err("after stderr")
 
     with test_stdout.open() as f:
         assert f.read() == "some stdout\n"
task: metadata: install: pip install -e .[dev]
patch: diff --git a/mirdata/gtzan_genre.py b/mirdata/gtzan_genre.py
index f9806d5..6a55642 100644
--- a/mirdata/gtzan_genre.py
+++ b/mirdata/gtzan_genre.py
@@ -63,6 +63,9 @@ class Track(track.Track):
         self._track_paths = DATA.index[track_id]
 
         self.genre = track_id.split(".")[0]
+        if self.genre == 'hiphop':
+            self.genre = 'hip-hop'
+
         self.audio_path = os.path.join(self._data_home, self._track_paths["audio"][0])
 
     @property

problem_statement: gtzan-genre 'hiphop' vs 'hip-hop'
gtzan_genre uses the genre name 'hiphop', where the jams gtzan_genre schema expects 'hip-hop' so the jams files do not validate.

(Found as part of #241 )
repo: mir-dataset-loaders/mirdata
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_gtzan_genre.py b/tests/test_gtzan_genre.py
index 615654f..7378c65 100644
--- a/tests/test_gtzan_genre.py
+++ b/tests/test_gtzan_genre.py
@@ -32,6 +32,11 @@ def test_track():
     assert audio.shape == (663300,)
 
 
+def test_hiphop():
+    track = gtzan_genre.Track('hiphop.00000', data_home=TEST_DATA_HOME)
+    assert track.genre == 'hip-hop'
+
+
 def test_to_jams():
     default_trackid = "country.00000"
     track = gtzan_genre.Track(default_trackid, data_home=TEST_DATA_HOME)
task: metadata: install: pip install -e .[dev,test]
patch: diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbcf59f..21981d9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,9 @@
 - Replaced hardcoded HTTP statuses with `HTTPStatus` from the `http` stdlib module.
 - Added `include_cookies` option to the `ExplorerApollo`.
 - Fixed typing on `extract_data_from_request` method.
-- Fixed tests websockets after starlette update
+- Fixed tests websockets after starlette update.
 - Added `share_enabled` param to `ExplorerPlayground` to enable share playground feature.
+- Added support for nested attribute resolution in alias resolvers.
 
 
 ## 0.23 (2024-03-18)
diff --git a/ariadne/resolvers.py b/ariadne/resolvers.py
index 21a3014..7a43341 100644
--- a/ariadne/resolvers.py
+++ b/ariadne/resolvers.py
@@ -79,9 +79,16 @@ snake_case_fallback_resolvers = SnakeCaseFallbackResolversSetter()
 
 
 def resolve_parent_field(parent: Any, field_name: str) -> Any:
-    if isinstance(parent, Mapping):
-        return parent.get(field_name)
-    return getattr(parent, field_name, None)
+    value = parent
+    for name in field_name.split("."):
+        if isinstance(value, Mapping):
+            value = value.get(name)
+        else:
+            value = getattr(value, name, None)
+
+        if value is None:
+            break
+    return value
 
 
 def resolve_to(attr_name: str) -> Resolver:

problem_statement: set_alias support for nested attributes
I have a use case where the parent resolver returns something like this:

`Person(name="John", state=PersonState(married=False))`

To implement `person { married }`, you would need to create a new resolver returning `parent.state.married`, and in a large schema, there are many of these trivial resolvers.

It would be great if `set_alias` supported nested attributes, so one could do `person.set_alias("married", "state.married")`, maybe using `operator.attrgetter` instead of `getattr`.
repo: mirumee/ariadne
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_default_resolvers.py b/tests/test_default_resolvers.py
index 6efa5d2..58b24d9 100644
--- a/tests/test_default_resolvers.py
+++ b/tests/test_default_resolvers.py
@@ -14,6 +14,15 @@ def test_alias_resolver_supports_callable_return_value():
     assert alias_resolver(obj, None)
 
 
+def test_alias_resolver_supports_nested_name():
+    parent_mapping = {"nested": {"hello": "world"}}
+    parent_object = Mock(nested=Mock(hello="world"))
+
+    alias_resolver = resolve_to("nested.hello")
+    assert alias_resolver(parent_mapping, None) == "world"
+    assert alias_resolver(parent_object, None) == "world"
+
+
 def test_alias_resolver_passess_field_args_to_callable_return_value():
     def callable_resolver(*_, test):
         return test
task: metadata: install: pip install -e .
patch: diff --git a/mpf/core/bcp/bcp_socket_client.py b/mpf/core/bcp/bcp_socket_client.py
index 19fb225f9..a0ba6c7f6 100644
--- a/mpf/core/bcp/bcp_socket_client.py
+++ b/mpf/core/bcp/bcp_socket_client.py
@@ -38,12 +38,12 @@ def decode_command_string(bcp_string):
     """
     bcp_command = urlsplit(bcp_string)
 
+    if bcp_command.query[0:5] == "json=":
+        kwargs = json.loads(bcp_command.query[5:])
+        return bcp_command.path.lower(), kwargs
+
     try:
         kwargs = parse_qs(bcp_command.query, keep_blank_values=True)
-        if 'json' in kwargs:
-            kwargs = json.loads(kwargs['json'][0])
-            return bcp_command.path.lower(), kwargs
-
     except AttributeError:
         kwargs = dict()
 

problem_statement: Crash in BCP when decoding a percent sign
```
ERROR : BCP Client : DECODE BCP ERROR. Message: monitored_event?json={"event_name": "logicblock_baby_bonus_hit", "event_type": null, "event_callback": null, "event_kwargs": {"count": 3}, "registered_handlers": [["<bound method ConfigPlayer.config_play_callback of ConfigPlayer.event_player/events>", 175, {"calling_context": "logicblock_baby_bonus_hit{count%10==5}", "mode": "<Mode.baby_bonus>", "settings": {"random_baby_mode": {"priority": 0}}}, "93fd9d4a-4fad-4e70-9853-6efa695eec8e", "<mpf.core.placeholder_manager.BoolTemplate object at 0x106a0f240>", null], ["<bound method ConfigPlayer.config_play_callback of ConfigPlayer.event_player/events>", 100, {"calling_context": "logicblock_baby_bonus_hit", "mode": "<Mode.base>", "settings": {"baby_bonus_start": {"priority": 0}}}, "be0a073d-7c5b-4f12-92e7-8429aa78d47d", null, null]]}
```
repo: missionpinball/mpf
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/mpf/tests/test_BcpSocketClient.py b/mpf/tests/test_BcpSocketClient.py
index e1dd82c6e..fc2dc0bcf 100644
--- a/mpf/tests/test_BcpSocketClient.py
+++ b/mpf/tests/test_BcpSocketClient.py
@@ -8,6 +8,12 @@ from mpf.tests.loop import MockQueueSocket
 
 class TestBcpSocketClientEncoding(unittest.TestCase):
 
+    def test_roundtrip(self):
+        test_kwargs = {"registered_handlers": [{"calling_context": "logicblock_baby_bonus_hit{count%10==5}"}]}
+        encoded_cmd = encode_command_string("test", **test_kwargs)
+        decoded_cmd, decoded_cmd_kwargs = decode_command_string(encoded_cmd)
+        self.assertEqual(decoded_cmd_kwargs, test_kwargs)
+
     def test_decode_command_string(self):
         # test strings
         string_in = 'play?some_value=7&another_value=2'
task: metadata: install: pip install -e .
patch: diff --git a/mpf/devices/drop_target.py b/mpf/devices/drop_target.py
index 2ac95d3b5..e6eb21095 100644
--- a/mpf/devices/drop_target.py
+++ b/mpf/devices/drop_target.py
@@ -326,11 +326,18 @@ class DropTargetBank(SystemWideDevice, ModeDevice):
         del kwargs
         self.debug_log('Resetting')
 
+        if self.down == 0:
+            self.info_log('All targets are already up. Will not reset bank.')
+            return
+        else:
+            self.info_log('%s targets are down. Will reset those.', self.down)
+
         # figure out all the coils we need to pulse
         coils = set()       # type: Set[Driver]
 
         for drop_target in self.drop_targets:
-            if drop_target.reset_coil:
+            # add all reset coil for targets which are down
+            if drop_target.reset_coil and drop_target.complete:
                 coils.add(drop_target.reset_coil)
 
         for coil in self.reset_coils:

problem_statement: Only reset drop target banks when they are not reset
Currently we always trigger a reset no matter if the bank of up or down. Mirror the behavior of reset on individual drop targets. See this thread for an example: https://groups.google.com/forum/#!topic/mpf-users/kHq3dM1PMyo
repo: missionpinball/mpf
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/mpf/tests/test_DropTargets.py b/mpf/tests/test_DropTargets.py
index 9b672f623..9be9c3b93 100644
--- a/mpf/tests/test_DropTargets.py
+++ b/mpf/tests/test_DropTargets.py
@@ -58,6 +58,16 @@ class TestDropTargets(MpfTestCase):
         self.assertFalse(self.machine.drop_targets.left3.complete)
         self.assertFalse(self.machine.drop_target_banks.left_bank.complete)
 
+        # check that the bank does not reset if already down
+        self.machine.coils.coil1.pulse = MagicMock()
+        self.machine.drop_target_banks['left_bank'].reset()
+        assert not self.machine.coils.coil1.pulse.called
+
+        # reset should work with one target down
+        self.hit_switch_and_run("switch1", 1)
+        self.machine.drop_target_banks['left_bank'].reset()
+        self.machine.coils.coil1.pulse.assert_called_once_with(max_wait_ms=100)
+
     def test_knockdown_and_reset(self):
         self.mock_event("unexpected_ball_on_playfield")
         self.machine.coils.coil2.pulse = MagicMock(wraps=self.machine.coils.coil2.pulse)
task: metadata: install: pip install -e .
patch: diff --git a/.gitignore b/.gitignore
index f5adb54..26bbdf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ build
 docs/_build/
 .cache/
 .eggs/
+.*env*/
diff --git a/bleach/linkifier.py b/bleach/linkifier.py
index 471ce93..c8d3340 100644
--- a/bleach/linkifier.py
+++ b/bleach/linkifier.py
@@ -349,7 +349,17 @@ class LinkifyFilter(Filter):
 
     def handle_links(self, src_iter):
         """Handle links in character tokens"""
+        in_a = False  # happens, if parse_email=True and if a mail was found
         for token in src_iter:
+            if in_a:
+                if token['type'] == 'EndTag' and token['name'] == 'a':
+                    in_a = False
+                yield token
+                continue
+            elif token['type'] == 'StartTag' and token['name'] == 'a':
+                in_a = True
+                yield token
+                continue
             if token['type'] == 'Characters':
                 text = token['data']
                 new_tokens = []
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
index 1df9765..7e5c6ca
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 import re
 import sys
 

problem_statement: Linkify creates http link in mailto link when host contains a hyphen
Linkify creates http links **in** mailto links if the mail host name contains a hyphen `-` (and `parse_email=True`). The http link starts with the hyphen, even if host names mustn't start with hyphens at all (https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_hostnames).

```py
>>> linkify('foo@exa-mple.com', parse_email=True)
'<a href="mailto:foo@exa-mple.com">foo@exa<a href="http://-mple.com" rel="nofollow">-mple.com</a></a>'
```
This is what the link looks like: <a href="mailto:foo@exa-mple.com">foo@exa<a href="http://-mple.com" rel="nofollow">-mple.com</a></a> :smile:
repo: mozilla/bleach
test_cmd: pytest -v
test_patch: diff --git a/tests/test_links.py b/tests/test_links.py
index b967151..3d44665 100644
--- a/tests/test_links.py
+++ b/tests/test_links.py
@@ -588,6 +588,14 @@ def test_hang():
     )
 
 
+def test_hyphen_in_mail():
+    """Test hyphens `-` in mails. Issue #300."""
+    assert (
+        linkify('ex@am-ple.com', parse_email=True) ==
+        '<a href="mailto:ex@am-ple.com">ex@am-ple.com</a>'
+    )
+
+
 def test_url_re_arg():
     """Verifies that a specified url_re is used"""
     fred_re = re.compile(r"""(fred\.com)""")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/.travis.yml b/.travis.yml
index 5f5a814..92102f6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,7 @@
 sudo: false
+# Travis infra requires pinning dist:precise, at least as of 2017-09-01
+# detail: https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
+dist: precise
 language: python
 python:
   - "2.6"
diff --git a/jose/jwk.py b/jose/jwk.py
index 03a318d..0ae8b05 100644
--- a/jose/jwk.py
+++ b/jose/jwk.py
@@ -105,6 +105,7 @@ class HMACKey(Key):
 
         invalid_strings = [
             b'-----BEGIN PUBLIC KEY-----',
+            b'-----BEGIN RSA PUBLIC KEY-----',
             b'-----BEGIN CERTIFICATE-----',
             b'ssh-rsa'
         ]

problem_statement: CVE-2017-11424 Applies to python-jose as well!
[CVE-2017-11424](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-11424) details a key confusion attack against pyjwt.

As I understand it, we just need to add another magic string to [this check](https://github.com/mpdavis/python-jose/blob/b54c12aa54b76d34942f537418399d689d828099/jose/jwk.py#L106-L115)

Not being a crypto expert, I'll open a pull request with the fix described in the CVE, but would appreciate someone else taking a look at the CVE before merging.
repo: mpdavis/python-jose
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/algorithms/test_HMAC.py b/tests/algorithms/test_HMAC.py
index 30e2714..e84c2c0 100644
--- a/tests/algorithms/test_HMAC.py
+++ b/tests/algorithms/test_HMAC.py
@@ -17,6 +17,10 @@ class TestHMACAlgorithm:
         with pytest.raises(JOSEError):
             HMACKey(key, ALGORITHMS.HS256)
 
+        key = "-----BEGIN RSA PUBLIC KEY-----"
+        with pytest.raises(JOSEError):
+            HMACKey(key, ALGORITHMS.HS256)
+
         key = "-----BEGIN CERTIFICATE-----"
         with pytest.raises(JOSEError):
             HMACKey(key, ALGORITHMS.HS256)
task: metadata: install: pip install -e .
patch: diff --git a/einsumt.py b/einsumt.py
index 85480c3..c43ff3d 100644
--- a/einsumt.py
+++ b/einsumt.py
@@ -123,8 +123,9 @@ def einsumt(*operands, **kwargs):
         for j in range(len(ops)):
             oj = ops[j]
             if cpos[j] >= 0:
-                jslice = cpos_slice[j] + (islice,)
-                oj = oj[jslice]
+                if oj.shape[cpos[j]] > 1:
+                    jslice = cpos_slice[j] + (islice,)
+                    oj = oj[jslice]
             args = args + (oj,)
         res += [pool.apply_async(np.einsum, args=args, kwds=kwargs)]
     res = [r.get() for r in res]
diff --git a/setup.py b/setup.py
index e3312c9..2584da6 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
 
 setuptools.setup(
     name="einsumt",
-    version="0.9.2",
+    version="0.9.3",
     author="Marek Wojciechowski",
     author_email="mrkwjc@gmail.com",
     description="Multithreaded version of numpy.einsum function",

problem_statement: `einsumt` fails if the shape of (ellipsis) trailing axes are not equal
...however, `np.einsum` does automatic broadcasting. Any ideas on implementing that?

Minimal working example:

```python
import numpy as np
from einsumt import einsumt

a = np.ones((3, 3, 1, 1))
b = np.ones((3, 3, 8, 100))

# this works
np.einsum("ij...,ij...->...", a, b)

# this fails
einsumt("ij...,ij...->...", a, b)

# ...this also fails
einsumt("ijmn,ijmn->mn", a, b)
```

Thanks for providing `einsumt`, it is a fantastic package. A little side-node: Mostly, `einsumt` is equal in execution times compared to just-in-time compiling the code (Numba). I'm using `einsumt` in my finite elements package [FElupe](https://github.com/adtzlr/felupe).

Best regards,
Andreas
repo: mrkwjc/einsumt
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test_einsumt.py b/test_einsumt.py
index b15b104..92d467b 100644
--- a/test_einsumt.py
+++ b/test_einsumt.py
@@ -123,6 +123,12 @@ class TestEinsumt(object):
         A2 = np.einsum('egmipq, egpqrs -> egmirs', u, A)
         k2 = np.einsum('egmirs, egnjrs -> eminj', A2, v)
         assert np.allclose(k1, k2)
+    
+    def test_broadcasting(self):
+        a = np.random.rand(3, 3, 1, 1)
+        b = np.random.rand(3, 3, 6, 100)
+        subs = 'ijrs,ijrs->rs'
+        assert np.allclose(np.einsum(subs, a, b), einsumt(subs, a, b))
 
 
 if __name__ == '__main__':
task: metadata: install: pip install -e .
patch: diff --git a/msgpack/fallback.py b/msgpack/fallback.py
index 388a5ab..85a711b 100644
--- a/msgpack/fallback.py
+++ b/msgpack/fallback.py
@@ -357,7 +357,9 @@ class Unpacker(object):
         return self._buffer[self._buff_i :]
 
     def read_bytes(self, n):
-        return self._read(n)
+        ret = self._read(n)
+        self._consume()
+        return ret
 
     def _read(self, n):
         # (int) -> bytearray

problem_statement: Broken fallback implementation of Unpacker.read_bytes
```
>>> from msgpack import *
>>> u = Unpacker(); u.feed('x'); u.read_bytes(1)
'x'
>>> u.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "msgpack/_unpacker.pyx", line 562, in msgpack._cmsgpack.Unpacker.__next__
  File "msgpack/_unpacker.pyx", line 489, in msgpack._cmsgpack.Unpacker._unpack
StopIteration: No more data to unpack.
>>> u.feed('\1'); u.next()
1
```
So far so good. Now with fallback implémentation:
```
>>> from msgpack.fallback import *
>>> u = Unpacker(); u.feed('x'); u.read_bytes(1)
bytearray(b'x')
>>> u.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/msgpack/fallback.py", line 690, in __next__
    raise StopIteration
StopIteration
>>> u.feed('\1'); u.next()
120
```
Something seems to be wrongly reset on StopIteration.
repo: msgpack/msgpack-python
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py
index 9b69479..ad29de8 100644
--- a/test/test_sequnpack.py
+++ b/test/test_sequnpack.py
@@ -93,6 +93,15 @@ def test_readbytes():
     assert unpacker.unpack() == ord(b"a")
     assert unpacker.unpack() == ord(b"r")
 
+    # Issue 352
+    u = Unpacker()
+    u.feed(b"x")
+    assert bytes(u.read_bytes(1)) == b"x"
+    with raises(StopIteration):
+        next(u)
+    u.feed(b"\1")
+    assert next(u) == 1
+
 
 def test_issue124():
     unpacker = Unpacker()