* [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py
@ 2026-01-08 16:52 Artur Weber
2026-01-08 18:20 ` Artur Weber
2026-01-09 15:54 ` Konstantin Ryabitsev
0 siblings, 2 replies; 4+ messages in thread
From: Artur Weber @ 2026-01-08 16:52 UTC (permalink / raw)
To: tools; +Cc: Konstantin Ryabitsev, Artur Weber
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py
2026-01-08 16:52 [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py Artur Weber
@ 2026-01-08 18:20 ` Artur Weber
2026-01-09 15:51 ` Konstantin Ryabitsev
2026-01-09 15:54 ` Konstantin Ryabitsev
1 sibling, 1 reply; 4+ messages in thread
From: Artur Weber @ 2026-01-08 18:20 UTC (permalink / raw)
To: tools; +Cc: Konstantin Ryabitsev
On 8.01.2026 17:52, Artur Weber wrote:
> 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>
It just occurred to me that I didn't mention what this patch is for
anywhere in this mail.
This is a patch for patatt :)
Best regards
Artur
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py
2026-01-08 18:20 ` Artur Weber
@ 2026-01-09 15:51 ` Konstantin Ryabitsev
0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Ryabitsev @ 2026-01-09 15:51 UTC (permalink / raw)
To: Artur Weber; +Cc: tools
On Thu, Jan 08, 2026 at 07:20:41PM +0100, Artur Weber wrote:
> > Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
>
> It just occurred to me that I didn't mention what this patch is for anywhere
> in this mail.
>
> This is a patch for patatt :)
Thank you for the clarification! I would have eventually figured it out, but
it does help. :)
(FTR, if you use b4 to send patatt patches, it does stick patatt into the
prefix line.)
-K
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py
2026-01-08 16:52 [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py Artur Weber
2026-01-08 18:20 ` Artur Weber
@ 2026-01-09 15:54 ` Konstantin Ryabitsev
1 sibling, 0 replies; 4+ messages in thread
From: Konstantin Ryabitsev @ 2026-01-09 15:54 UTC (permalink / raw)
To: tools, Artur Weber
On Thu, 08 Jan 2026 17:52:00 +0100, Artur Weber wrote:
> 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.)
>
> [...]
Applied, thanks!
[1/1] Use pre-Python 3.13 Generator type syntax in conftest.py
commit: 3b9f6ecec8e17225b66483ffd0aecb8ba1c328f5
Best regards,
--
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-09 15:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 16:52 [PATCH] Use pre-Python 3.13 Generator type syntax in conftest.py Artur Weber
2026-01-08 18:20 ` Artur Weber
2026-01-09 15:51 ` Konstantin Ryabitsev
2026-01-09 15:54 ` Konstantin Ryabitsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox