nebius/SWE-bench-extra huggingface dataset:
Repository: sklarsa/django-sendgrid-v5

Issue:
Add the ability to reply_to_list for Sendgrid
Since [this](https://github.com/sendgrid/sendgrid-oai/blob/main/CHANGELOG.md#2021-09-22-version-180) version, SendGrid has incorporated the ability to reply to a list of emails. It would be beneficial to integrate this capability into this library without any workarounds.

Comments:

Patch:
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 3c341bc..56e4923 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -10,5 +10,4 @@ pytest==6.2.5
 pytest-cov==3.0.0
 tox==3.8.5
 twine==3.3.0
-typed-ast==1.5.1
 wheel
diff --git a/sendgrid_backend/mail.py b/sendgrid_backend/mail.py
index dd63787..6e6afb7 100644
--- a/sendgrid_backend/mail.py
+++ b/sendgrid_backend/mail.py
@@ -471,6 +471,13 @@ class SendgridBackend(BaseEmailBackend):
                 )
             )
 
+        if hasattr(msg, "reply_to_list") and SENDGRID_6:
+            from sendgrid.helpers.mail import ReplyTo
+
+            mail.reply_to_list = [
+                ReplyTo(*self._parse_email_address(e)) for e in msg.reply_to_list
+            ]
+
         if hasattr(msg, "categories"):
             for cat in msg.categories:
                 mail.add_category(Category(cat))


Test patch:
diff --git a/test/test_mail.py b/test/test_mail.py
index 55ede5e..bb7862a 100644
--- a/test/test_mail.py
+++ b/test/test_mail.py
@@ -727,3 +727,28 @@ class TestMailGeneration(SimpleTestCase):
         assert not tracking_settings["click_tracking"]["enable"]
         assert "ganalytics" in tracking_settings
         assert tracking_settings["ganalytics"]["utm_source"] == "my-source"
+
+    def test_reply_to_list(self):
+        msg = EmailMessage(
+            subject="Hello, World!",
+            body="Hello, World!",
+            from_email="Sam Smith <sam.smith@example.com>",
+            to=["John Doe <john.doe@example.com>", "jane.doe@example.com"],
+            cc=["Stephanie Smith <stephanie.smith@example.com>"],
+            bcc=["Sarah Smith <sarah.smith@example.com>"],
+        )
+
+        msg.reply_to_list = ["John Doe <john.doe@example.com>", "jane.doe@example.com"]
+
+        mail = self.backend._build_sg_mail(msg)
+
+        reply_to_list = mail.get("reply_to_list")
+        if SENDGRID_5:
+            assert not reply_to_list
+        else:
+            assert reply_to_list
+            assert len(reply_to_list) == 2
+            assert reply_to_list[0].get("email") == "john.doe@example.com"
+            assert reply_to_list[0].get("name") == "John Doe"
+            assert reply_to_list[1].get("email") == "jane.doe@example.com"
+            assert not reply_to_list[1].get("name")
Repository: sloria/environs

Issue:
Inconsistent behavior with `env.list`
When `MY_ENV_VAR` is __not__ defined,

```py
env.int("MY_ENV_VAR", default=None)
```

returns `None` (as expected), but:

```py
env.list("MY_ENV_VAR", subcast=str, default=None)
```

yields the following Exception:

```py
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/environs/__init__.py", line 122, in method
    value = preprocess(value, **preprocess_kwargs)
  File "/usr/local/lib/python3.10/site-packages/environs/__init__.py", line 206, in _preprocess_list
    return typing.cast(str, value).split(delimiter) if value != "" else []
AttributeError: 'NoneType' object has no attribute 'split'
```

I believe the second example should return `None` as well.

Thoughts?

Comments:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 37487c8..b5264fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ Features:
 - `Env.__repr__` and `Env.__str__` no longer display environment variables, to prevent accidental exfiltration of sensitive data ([#292](https://github.com/sloria/environs/issues/292)).
   Thanks [mro-rhansen2](https://github.com/mro-rhansen2) for the suggestion.
 
+Bug fixes:
+
+- Fix passing `None` as default to `env.list` ([#298](https://github.com/sloria/environs/issues/298)).
+  Thanks [lucas-bremond](https://github.com/lucas-bremond) for reporting.
+
 ## 10.2.0 (2024-01-09)
 
 Features:
diff --git a/environs/__init__.py b/environs/__init__.py
index b52774d..3fc16ca 100644
--- a/environs/__init__.py
+++ b/environs/__init__.py
@@ -201,7 +201,7 @@ def _make_list_field(*, subcast: typing.Optional[type], **kwargs) -> ma.fields.L
 def _preprocess_list(
     value: typing.Union[str, typing.Iterable], *, delimiter: str = ",", **kwargs
 ) -> typing.Iterable:
-    if ma.utils.is_iterable_but_not_string(value):
+    if ma.utils.is_iterable_but_not_string(value) or value is None:
         return value
     return typing.cast(str, value).split(delimiter) if value != "" else []
 


Test patch:
diff --git a/tests/test_environs.py b/tests/test_environs.py
index 95484e9..e3248eb 100644
--- a/tests/test_environs.py
+++ b/tests/test_environs.py
@@ -82,12 +82,16 @@ class TestCasting:
         set_env({"LIST": "1,2,3"})
         assert env.list("LIST") == ["1", "2", "3"]
 
-    def test_list_with_default_from_string(self, set_env, env):
+    def test_list_with_default_from_string(self, env):
         assert env.list("LIST", "1,2") == ["1", "2"]
 
-    def test_list_with_default_from_list(self, set_env, env):
+    def test_list_with_default_from_list(self, env):
         assert env.list("LIST", ["1"]) == ["1"]
 
+    # https://github.com/sloria/environs/issues/298
+    def test_list_with_default_none(self, env):
+        assert env.list("LIST", default=None) is None
+
     def test_list_with_subcast(self, set_env, env):
         set_env({"LIST": "1,2,3"})
         assert env.list("LIST", subcast=int) == [1, 2, 3]
Repository: sloria/sphinx-issues

Issue:
Default to linking GH Sponsors for the `:user:` role
So I've been using regular `extlinks` for this (having seen the idea in the tox repo years ago). But I improved it for many of the projects I contribute to by linking the GitHub Sponsors pages of people, since this role is advertised for use in bylines. Here's some examples: https://setuptools.pypa.io/en/latest/history.html#v67-7-0 / https://yarl.aio-libs.org/en/latest/changes/#released-versions / https://yarl.aio-libs.org/en/latest/contributing/guidelines/#alright-so-how-to-add-a-news-fragment.

The primary motivation is to give credit to people who contribute / send pull requests. Then, when somebody else reads that changelog and clicks on the usernames, they are hinted to tip. 

It's also worth noting, that for the accounts that don't have GH Sponsors set up, GH itself automatically redirects to their normal profile pages, so there's always a fallback.

This is basically what I propose:
```diff
- issues_user_uri = "https://github.com/{user}"
+ issues_user_uri = "https://github.com/sponsors/{user}"
```

Comments:

Patch:
diff --git a/README.rst b/README.rst
index 654f972..1c875b6 100644
--- a/README.rst
+++ b/README.rst
@@ -152,6 +152,8 @@ Changelog
 3.1.0 (unreleased)
 ------------------
 
+- Default to linking GH Sponsors for the :user: role `Issue #93 <https://github.com/sloria/sphinx-issues/issues/129>`_.
+  Thanks @webknjaz for the suggestion.
 - Support Python 3.8-3.12. Older versions are no longer supported.
 - Remove `__version__`, `__author__`, and `__license__` attributes.
   Use `importlib.metadata` to read this metadata instead.
diff --git a/src/sphinx_issues/__init__.py b/src/sphinx_issues/__init__.py
index b5c7bec..f63824a 100644
--- a/src/sphinx_issues/__init__.py
+++ b/src/sphinx_issues/__init__.py
@@ -369,7 +369,10 @@ def setup(app):
     # e.g. 'https://github.com/{user}'
     app.add_config_value(
         "issues_user_uri",
-        default="https://github.com/{user}",
+        # Default to sponsors URL.
+        # GitHub will automatically redirect to profile
+        # if Sponsors isn't set up.
+        default="https://github.com/sponsors/{user}",
         rebuild="html",
         types=[str],
     )


Test patch:
diff --git a/tests/test_sphinx_issues.py b/tests/test_sphinx_issues.py
index 8462d1d..84b9f52 100644
--- a/tests/test_sphinx_issues.py
+++ b/tests/test_sphinx_issues.py
@@ -86,13 +86,13 @@ def inliner(app):
             "#42",
             "https://github.com/marshmallow-code/marshmallow/pull/42",
         ),
-        (user_role, "user", "sloria", "@sloria", "https://github.com/sloria"),
+        (user_role, "user", "sloria", "@sloria", "https://github.com/sponsors/sloria"),
         (
             user_role,
             "user",
             "Steven Loria <sloria>",
             "Steven Loria",
-            "https://github.com/sloria",
+            "https://github.com/sponsors/sloria",
         ),
         (
             cve_role,