Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit e0e4ab4

Browse files
committed
Add py package as explicit dev dependency
It appears that this was previously a transitive dependency of one of the other packages installed in the tox environment, but is no longer (most likely due to the package being deprecated). This plugin only depends on the package for mypy typing and for backward compatibility with versions of PyTest prior to 7.0.
1 parent a31066e commit e0e4ab4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ dev =
4545
flake8
4646
flake8-quotes
4747
mypy
48+
py>=1.9.0
4849
pytest-xdist>=2.0.0
4950
requests-mock[fixture]
5051
types-requests

src/pytest_unflakable/_plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import logging
1111
import pprint
1212

13-
import py
1413
import pytest
1514
import _pytest
1615
import sys
@@ -27,6 +26,7 @@
2726
)
2827

2928
if TYPE_CHECKING:
29+
import py
3030
from typing import Literal
3131

3232
# Most of these types aren't defined or exported in older versions of pytest, but we only need
@@ -35,15 +35,16 @@
3535
CallPhase = Literal['setup', 'call', 'teardown']
3636
CollectReport = pytest.CollectReport
3737
Config = pytest.Config
38+
PathCompat = Union[py.path.local, Path]
3839
else:
3940
CallInfo = object
4041
CallPhase = str
4142
CollectReport = object
4243
Config = object
44+
PathCompat = object
4345

4446
TestPathAndName = Tuple[str, Tuple[str, ...]]
4547
QuarantinedTests = Set[TestPathAndName]
46-
PathCompat = Union[py.path.local, Path]
4748

4849

4950
class QuarantineMode(Enum):

0 commit comments

Comments
 (0)