8000 use Contextmanagers to handle StopIteration in generators by RonnyPfannschmidt · Pull Request #12934 · pytest-dev/pytest · GitHub
[go: up one dir, main page]

Skip to content

use Contextmanagers to handle StopIteration in generators #12934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rebase fixup more
  • Loading branch information
RonnyPfannschmidt committed Mar 27, 2025
commit c69bb2a0ad0f0f38422931925b725de9838345b9
6 changes: 0 additions & 6 deletions src/_pytest/threadexception.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
from __future__ import annotations

from contextlib import contextmanager
import collections
from collections.abc import Callable
import functools
import sys
import threading
import traceback
from types import TracebackType
from typing import Any
from typing import Callable
from typing import Generator
from typing import Iterator
from typing import NamedTuple
from typing import TYPE_CHECKING
import warnings
Expand Down
2 changes: 1 addition & 1 deletion testing/example_scripts/hook_exceptions/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Iterator
from collections.abc import Iterator

import pytest

Expand Down
0