anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: marshmallow-code/marshmallow
Issue: ISO8601 DateTimes ending with Z considered not valid in 2.19.4

Probably related to #1247 and #1234 - in marshmallow `2.19.4`, with `python-dateutil` _not_ installed, it seems that loading a datetime in ISO8601 that ends in `Z` (UTC time) results in an error:

```python
class Foo(Schema):
    date = DateTime(required=True)


foo_schema = Foo(strict=True)

a_date_with_z = '2019-06-17T00:57:41.000Z'
foo_schema.load({'date': a_date_with_z})
```

```
marshmallow.exceptions.ValidationError: {'date': ['Not a valid datetime.']}
```

Digging a bit deeper, it seems [`from_iso_datetime`](https://github.com/marshmallow-code/marshmallow/blob/dev/src/marshmallow/utils.py#L213-L215) is failing with a `unconverted data remains: Z` - my understanding of the spec is rather limited, but it seems that they are indeed valid ISO8601 dates (and in `marshmallow==2.19.3` and earlier, the previous snippet seems to work without raising validation errors).


Changed files:
tests/test_utils.py, src/marshmallow/utils.py

diff --git a/src/marshmallow/utils.py b/src/marshmallow/utils.py
index 113906d..87bba69 100755
--- a/src/marshmallow/utils.py
+++ b/src/marshmallow/utils.py
@@ -285,6 +285,9 @@ def from_iso(datestring, use_dateutil=True):
         # Strip off timezone info.
         if '.' in datestring:
             # datestring contains microseconds
+            (dt_nomstz, mstz) = datestring.split('.')
+            ms_notz = mstz[:len(mstz) - len(mstz.lstrip('0123456789'))]
+            datestring = '.'.join((dt_nomstz, ms_notz))
             return datetime.datetime.strptime(datestring[:26], '%Y-%m-%dT%H:%M:%S.%f')
         return datetime.datetime.strptime(datestring[:19], '%Y-%m-%dT%H:%M:%S')
 
diff --git a/tests/test_utils.py b/tests/test_utils.py
index a5d6862..dff8317 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -200,6 +200,15 @@ def test_from_iso_datetime(use_dateutil, timezone):
     assert type(result) == dt.datetime
     assert_datetime_equal(result, d)
 
+    # Test with 3-digit only microseconds
+    # Regression test for https://github.com/marshmallow-code/marshmallow/issues/1251
+    d = dt.datetime.now(tz=timezone).replace(microsecond=123000)
+    formatted = d.isoformat()
+    formatted = formatted[:23] + formatted[26:]
+    result = utils.from_iso(formatted, use_dateutil=use_dateutil)
+    assert type(result) == dt.datetime
+    assert_datetime_equal(result, d)
+
 def test_from_iso_with_tz():
     d = central.localize(dt.datetime.now())
     formatted = d.isoformat()
Repository: marshmallow-code/marshmallow
Issue: TypeError when serializing a Pluck field valuated to None

Using `fields.Pluck` on an attribute valuated to `None` raises a `TypeError`, cf. the example below.
```python
from marshmallow import Schema, fields
from dataclasses import dataclass

@dataclass
class Nested:
    key: str

@dataclass
class Main:
    nested: Nested

class NestedSchema(Schema):
    key = fields.String()

class MainSchema(Schema):
    nested = fields.Pluck(NestedSchema, 'key')

m = Main(None)
dumped = MainSchema().dump(m)  # ERROR
# File ".../marshmallow/fields.py", line 521, in _serialize
#   return ret[self._field_data_key]
# TypeError: 'NoneType' object is not subscriptable
```

Changed files:
tests/test_schema.py, marshmallow/fields.py

diff --git a/marshmallow/fields.py b/marshmallow/fields.py
index 238ec63..85fb57a 100644
--- a/marshmallow/fields.py
+++ b/marshmallow/fields.py
@@ -516,6 +516,8 @@ class Pluck(Nested):
 
     def _serialize(self, nested_obj, attr, obj, **kwargs):
         ret = super(Pluck, self)._serialize(nested_obj, attr, obj, **kwargs)
+        if ret is None:
+            return None
         if self.many:
             return utils.pluck(ret, key=self._field_data_key)
         return ret[self._field_data_key]
diff --git a/tests/test_schema.py b/tests/test_schema.py
index e950dd9..cadc402 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -2088,6 +2088,19 @@ class TestPluckSchema:
         for i, name in enumerate(data['collaborators']):
             assert name == blog.collaborators[i].name
 
+    def test_pluck_none(self, blog):
+        class FlatBlogSchema(Schema):
+            user = fields.Pluck(UserSchema, 'name')
+            collaborators = fields.Pluck(UserSchema, 'name', many=True)
+        col1 = User(name='Mick', age=123)
+        col2 = User(name='Keith', age=456)
+        blog = Blog(title='Unowned Blog', user=None, collaborators=[col1, col2])
+        s = FlatBlogSchema()
+        data = s.dump(blog)
+        assert data['user'] == blog.user
+        for i, name in enumerate(data['collaborators']):
+            assert name == blog.collaborators[i].name
+
     # Regression test for https://github.com/marshmallow-code/marshmallow/issues/800
     def test_pluck_with_data_key(self, blog):
         class UserSchema(Schema):
Repository: marshmallow-code/marshmallow
Issue: Marshmallow warnings.py not Python 2 compatible from version 2.18.0

The `unused_and_removed_in_ma3` decorator introduced in version 2.18.0 is not Python  2.7 compatible due to absolute import not being used.

To reproduce simply attempt to call a decorated method.
```
from marshmallow.utils import float_to_decimal
float_to_decimal(12.3)
```

Expected:
Method executes but logs a `RemovedInMarshmallow3Warning`

Actual:
`AttributeError: 'module' object has no attribute 'warn'` is raised.

Changed files:
src/marshmallow/warnings.py, tests/test_utils.py

diff --git a/src/marshmallow/warnings.py b/src/marshmallow/warnings.py
index c21c9dd..d9cc8b4 100644
--- a/src/marshmallow/warnings.py
+++ b/src/marshmallow/warnings.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8 -*-
+from __future__ import absolute_import
 import functools
 import warnings
 
diff --git a/tests/test_utils.py b/tests/test_utils.py
index dff8317..ac5035e 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -7,6 +7,7 @@ from copy import copy, deepcopy
 import pytest
 
 from marshmallow import utils
+from marshmallow import warnings
 from tests.base import (
     assert_datetime_equal,
     central,
@@ -256,3 +257,7 @@ def test_get_func_args():
 
     for func in [f1, f2, f3]:
         assert utils.get_func_args(func) == ['self', 'foo', 'bar']
+
+def test_deprecated_warning():
+    with pytest.warns(warnings.RemovedInMarshmallow3Warning):
+        utils.float_to_decimal(0.1337)
Repository: burnash/gspread
Issue: worksheet.rows_auto_resize not working

**Important**: Please do not post usage questions here. 
To get a quick response, please ask a question on Stack Overflow using `gspread` tag.
See existing questions: https://stackoverflow.com/questions/tagged/gspread

---

**Describe the bug**
A clear and concise description of what the bug is.

Upon calling that method comes an error
It is because of redundant self in parameters for `_auto_resize` method

**To Reproduce**
Steps to reproduce the behavior:
1. login as usual
2. pick a spreadsheet and then a worksheet
3. try to call rows_auto_resize method of the worksheet

**Expected behavior**
A clear and concise description of what you expected to happen.

rows should be auto-resized

**Code example***
If applicable, provide a code example to help explain your problem.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment info:**
- Operating System [e.g. Linux, Windows, macOS]: Windows 10
- Python version: 3.9.7
- gspread version: 5.6.0

**Stack trace or other output that would be helpful**

`TypeError: _auto_resize() takes 4 positional arguments but 5 were given`

**Additional context**
Add any other context about the problem here.


Changed files:
gspread/worksheet.py

diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 1ba6c9a..e329710 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -1521,7 +1521,7 @@ class Worksheet:
 
         .. versionadded:: 5.3.3
         """
-        return self._auto_resize(self, start_row_index, end_row_index, Dimension.rows)
+        return self._auto_resize(start_row_index, end_row_index, Dimension.rows)
 
     def add_rows(self, rows):
         """Adds rows to worksheet.