From: Artur Weber <aweber.kernel@gmail.com>
To: tools@kernel.org
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Artur Weber <aweber.kernel@gmail.com>
Subject: [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py
Date: Thu, 8 Jan 2026 17:52:00 +0100 [thread overview]
Message-ID: <20260108165200.11313-1-aweber.kernel@gmail.com> (raw)
Python 3.13 defaults to None for the other fields of the Generator type,
but the version of Generator in older versions does not support such syntax.
Explicitly add the missing fields to allow the tests to run on older Python
versions.
(An alternative solution would be to use typing-extensions for older
versions, though that would require adding another dependency.)
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
tests/conftest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index c5ced78..a9c9157 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -20,7 +20,7 @@ This is a test email body.
"""
@pytest.fixture
-def temp_data_dir() -> Generator[str]:
+def temp_data_dir() -> Generator[str, None, None]:
"""Create a temporary data directory structure for patatt."""
with tempfile.TemporaryDirectory() as tmpdirname:
# Create directory structure similar to patatt's data dir
--
2.52.0
next reply other threads:[~2026-01-08 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 16:52 Artur Weber [this message]
2026-01-08 18:20 ` [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py Artur Weber
2026-01-09 15:51 ` Konstantin Ryabitsev
2026-01-09 15:54 ` Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260108165200.11313-1-aweber.kernel@gmail.com \
--to=aweber.kernel@gmail.com \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.