From 4c2bf50455bbb041093d6dd3f34c6a5450490e0e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 12 Oct 2020 16:13:45 +0200 Subject: [PATCH 01/16] test_pkgfile: --debug --- testing/test_collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_collection.py b/testing/test_collection.py index d6d93a73ef7..4c5cf70d624 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -679,7 +679,7 @@ def test_pkgfile(self, testdir): x = subdir.ensure("x.py") subdir.ensure("__init__.py") with subdir.as_cwd(): - config = testdir.parseconfigure(x) + config = testdir.parseconfigure(x, "--debug") col = testdir.getnode(config, x) assert col.name == "x.py" assert isinstance(col, pytest.Module) From d55db1417450784d275595bf486de60226512cd1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 14 Oct 2020 10:31:08 +0200 Subject: [PATCH 02/16] fix _should_rewrite: pass py.path.local --- src/_pytest/assertion/rewrite.py | 17 ++++++++++++----- src/_pytest/main.py | 2 +- testing/test_assertrewrite.py | 13 +++++++++---- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 3988ed6ecac..4d29ab5c741 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -18,6 +18,9 @@ from typing import Optional from typing import Set from typing import Tuple +from typing import TYPE_CHECKING + +import py.path from _pytest._io.saferepr import safeformat from _pytest._io.saferepr import saferepr @@ -31,6 +34,10 @@ from _pytest.pathlib import Path from _pytest.pathlib import PurePath +if TYPE_CHECKING: + from _pytest.assertion import AssertionState + from _pytest.main import Session + # pytest caches rewritten pycs in pycache dirs PYTEST_TAG = "{}-pytest-{}".format(sys.implementation.cache_tag, version) PYC_EXT = ".py" + (__debug__ and "c" or "o") @@ -46,7 +53,7 @@ def __init__(self, config): self.fnpats = config.getini("python_files") except ValueError: self.fnpats = ["test_*.py", "*_test.py"] - self.session = None + self.session = None # type: Optional[Session] self._rewritten_names = set() # type: Set[str] self._must_rewrite = set() # type: Set[str] # flag to guard against trying to rewrite a pyc file while we are already writing another pyc file, @@ -56,7 +63,7 @@ def __init__(self, config): self._marked_for_rewrite_cache = {} # type: Dict[str, bool] self._session_paths_checked = False - def set_session(self, session): + def set_session(self, session: "Optional[Session]") -> None: self.session = session self._session_paths_checked = False @@ -182,14 +189,14 @@ def _early_rewrite_bailout(self, name, state): state.trace("early skip of rewriting module: {}".format(name)) return True - def _should_rewrite(self, name, fn, state): + def _should_rewrite(self, name: str, fn: str, state: "AssertionState") -> bool: # always rewrite conftest files if os.path.basename(fn) == "conftest.py": state.trace("rewriting conftest file: {!r}".format(fn)) return True if self.session is not None: - if self.session.isinitpath(fn): + if self.session.isinitpath(py.path.local(fn)): state.trace( "matched test file (was specified on cmdline): {!r}".format(fn) ) @@ -205,7 +212,7 @@ def _should_rewrite(self, name, fn, state): return self._is_marked_for_rewrite(name, state) - def _is_marked_for_rewrite(self, name: str, state): + def _is_marked_for_rewrite(self, name: str, state: "AssertionState") -> bool: try: return self._marked_for_rewrite_cache[name] except KeyError: diff --git a/src/_pytest/main.py b/src/_pytest/main.py index 1d4fea08b92..09ec2e5b3d3 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -458,7 +458,7 @@ def pytest_runtest_logreport(self, report): pytest_collectreport = pytest_runtest_logreport - def isinitpath(self, path): + def isinitpath(self, path: "py.path.local") -> bool: return path in self._initialpaths def gethookproxy(self, fspath: py.path.local): diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index c947ab47a60..1aa04d41bc6 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -21,10 +21,15 @@ from _pytest.assertion.rewrite import PYC_TAIL from _pytest.assertion.rewrite import PYTEST_TAG from _pytest.assertion.rewrite import rewrite_asserts +from _pytest.compat import TYPE_CHECKING from _pytest.config import ExitCode from _pytest.pathlib import Path from _pytest.pytester import Testdir +if TYPE_CHECKING: + from typing import List + from typing import Set + def setup_module(mod): mod._old_reprcompare = util._reprcompare @@ -1250,14 +1255,14 @@ def spy_write_pyc(*args, **kwargs): class TestEarlyRewriteBailout: @pytest.fixture - def hook(self, pytestconfig, monkeypatch, testdir): + def hook(self, pytestconfig, monkeypatch, testdir) -> AssertionRewritingHook: """Returns a patched AssertionRewritingHook instance so we can configure its initial paths and track if PathFinder.find_spec has been called. """ import importlib.machinery - self.find_spec_calls = [] - self.initial_paths = set() + self.find_spec_calls = [] # type: List[str] + self.initial_paths = set() # type: Set[py.path.local] class StubSession: _initialpaths = self.initial_paths @@ -1277,7 +1282,7 @@ def spy_find_spec(name, path): testdir.syspathinsert() return hook - def test_basic(self, testdir, hook): + def test_basic(self, testdir: "Testdir", hook: AssertionRewritingHook) -> None: """ Ensure we avoid calling PathFinder.find_spec when we know for sure a certain module will not be rewritten to optimize assertion rewriting (#3918). From 06ba76a10283b432291b6c92f3559868b52615d4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 14 Oct 2020 10:39:09 +0200 Subject: [PATCH 03/16] assert --- src/_pytest/python.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index db9c956e30e..c264e6267b5 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -605,7 +605,8 @@ def setup(self): def gethookproxy(self, fspath: py.path.local): return super()._gethookproxy(fspath) - def isinitpath(self, path): + def isinitpath(self, path: "py.path.local") -> bool: + assert isinstance(path, py.path.local), repr(path) return path in self.session._initialpaths def collect(self): From 68af3109e7f9019aae910402da458cc273577ddb Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 00:31:33 +0100 Subject: [PATCH 04/16] TEMP/TEST: tox.ini remove pinning of pylib --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 7c7267d1a04..b7e32d777d7 100644 --- a/tox.ini +++ b/tox.ini @@ -53,8 +53,6 @@ deps = twisted: {env:_PYTEST_TOX_TWISTED:twisted} xdist: pytest-xdist>=1.13 {env:_PYTEST_TOX_EXTRA_DEP:} - # Pin pylib for Windows (pending investigation of test failures). - py>=1.5.0,!=1.8.2,<1.9.0 ; sys_platform == 'win32' [testenv:upstream] skip_install = True From c60f288c18a65afd8e775a965ca229899341614d Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 01:03:53 +0100 Subject: [PATCH 05/16] Use strs with _collection_pkg_roots/seen_dirs --- src/_pytest/main.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index 09ec2e5b3d3..0e818fdbb28 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -35,6 +35,8 @@ if TYPE_CHECKING: + from typing import Generator + from typing import Set from typing import Type from typing_extensions import Literal @@ -377,7 +379,7 @@ def __init__(self, config: Config) -> None: ) # type: Dict[Tuple[Type[nodes.Collector], str], CollectReport] # Dirnames of pkgs with dunder-init files. - self._collection_pkg_roots = {} # type: Dict[py.path.local, Package] + self._collection_pkg_roots = {} # type: Dict[str, Package] self._bestrelpathcache = _bestrelpath_cache( config.rootdir @@ -538,7 +540,9 @@ def collect(self): self._collection_node_cache3.clear() self._collection_pkg_roots.clear() - def _collect(self, argpath, names): + def _collect( + self, argpath: "py.path.local", names: "List[str]" + ) -> "Generator[Union[nodes.Item, nodes.Collector], None, None]": from _pytest.python import Package # Start with a Session root, and delve to argpath item (dir or file) @@ -557,7 +561,7 @@ def _collect(self, argpath, names): col = self._collectfile(pkginit, handle_dupes=False) if col: if isinstance(col[0], Package): - self._collection_pkg_roots[parent] = col[0] + self._collection_pkg_roots[str(parent)] = col[0] # always store a list in the cache, matchnodes expects it self._collection_node_cache1[col[0].fspath] = [col[0]] @@ -566,21 +570,21 @@ def _collect(self, argpath, names): if argpath.check(dir=1): assert not names, "invalid arg {!r}".format((argpath, names)) - seen_dirs = set() + seen_dirs = set() # type: Set[str] for path in argpath.visit( fil=self._visit_filter, rec=self._recurse, bf=True, sort=True ): - dirpath = path.dirpath() - if dirpath not in seen_dirs: + dirname = path.dirname + if dirname not in seen_dirs: # Collect packages first. - seen_dirs.add(dirpath) - pkginit = dirpath.join("__init__.py") + seen_dirs.add(dirname) + pkginit = path.dirpath().join("__init__.py") if pkginit.exists(): for x in self._collectfile(pkginit): yield x if isinstance(x, Package): - self._collection_pkg_roots[dirpath] = x - if dirpath in self._collection_pkg_roots: + self._collection_pkg_roots[dirname] = x + if dirname in self._collection_pkg_roots: # Do not collect packages here. continue @@ -614,7 +618,7 @@ def _collect(self, argpath, names): # file in it, which gets ignored by the default # "python_files" option. pass - return + return None yield from m @staticmethod From cb87d12e722ee954d02d368b25d46a892fa1bb09 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 21:14:16 +0100 Subject: [PATCH 06/16] squash! Use strs with _collection_pkg_roots/seen_dirs Use py.path.local, but consistently. --- src/_pytest/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index 0e818fdbb28..232b747564c 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -379,7 +379,7 @@ def __init__(self, config: Config) -> None: ) # type: Dict[Tuple[Type[nodes.Collector], str], CollectReport] # Dirnames of pkgs with dunder-init files. - self._collection_pkg_roots = {} # type: Dict[str, Package] + self._collection_pkg_roots = {} # type: Dict[py.path.local, Package] self._bestrelpathcache = _bestrelpath_cache( config.rootdir @@ -561,7 +561,7 @@ def _collect( col = self._collectfile(pkginit, handle_dupes=False) if col: if isinstance(col[0], Package): - self._collection_pkg_roots[str(parent)] = col[0] + self._collection_pkg_roots[parent] = col[0] # always store a list in the cache, matchnodes expects it self._collection_node_cache1[col[0].fspath] = [col[0]] @@ -570,21 +570,21 @@ def _collect( if argpath.check(dir=1): assert not names, "invalid arg {!r}".format((argpath, names)) - seen_dirs = set() # type: Set[str] + seen_dirs = set() # type: Set[py.path.local] for path in argpath.visit( fil=self._visit_filter, rec=self._recurse, bf=True, sort=True ): - dirname = path.dirname - if dirname not in seen_dirs: + dirpath = path.dirpath() + if dirpath not in seen_dirs: # Collect packages first. - seen_dirs.add(dirname) + seen_dirs.add(dirpath) pkginit = path.dirpath().join("__init__.py") if pkginit.exists(): for x in self._collectfile(pkginit): yield x if isinstance(x, Package): - self._collection_pkg_roots[dirname] = x - if dirname in self._collection_pkg_roots: + self._collection_pkg_roots[dirpath] = x + if dirpath in self._collection_pkg_roots: # Do not collect packages here. continue @@ -601,7 +601,7 @@ def _collect( if argpath in self._collection_node_cache1: col = self._collection_node_cache1[argpath] else: - collect_root = self._collection_pkg_roots.get(argpath.dirname, self) + collect_root = self._collection_pkg_roots.get(argpath.dirpath(), self) col = collect_root._collectfile(argpath, handle_dupes=False) if col: self._collection_node_cache1[argpath] = col From 30eb9f616c332fab641b601d2636bbab6742d7fa Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 22:41:38 +0100 Subject: [PATCH 07/16] Fix Package.collect --- src/_pytest/python.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index c264e6267b5..f6160ddd5e2 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -53,7 +53,6 @@ from _pytest.mark.structures import normalize_mark_list from _pytest.outcomes import fail from _pytest.outcomes import skip -from _pytest.pathlib import parts from _pytest.warning_types import PytestCollectionWarning from _pytest.warning_types import PytestUnhandledCoroutineWarning @@ -609,14 +608,15 @@ def isinitpath(self, path: "py.path.local") -> bool: assert isinstance(path, py.path.local), repr(path) return path in self.session._initialpaths - def collect(self): + def collect(self) -> "Iterator[Union[nodes.Item, nodes.Collector]]": this_path = self.fspath.dirpath() init_module = this_path.join("__init__.py") if init_module.check(file=1) and path_matches_patterns( init_module, self.config.getini("python_files") ): yield Module.from_parent(self, fspath=init_module) - pkg_prefixes = set() + + pkg_prefixes = set() # type: Set[py.path.local] for path in this_path.visit(rec=self._recurse, bf=True, sort=True): # We will visit our own __init__.py file, in which case we skip it. is_file = path.isfile() @@ -624,12 +624,12 @@ def collect(self): if path.basename == "__init__.py" and path.dirpath() == this_path: continue - parts_ = parts(path.strpath) - if any( - pkg_prefix in parts_ and pkg_prefix.join("__init__.py") != path - for pkg_prefix in pkg_prefixes - ): - continue + parts_ = path.parts() + if any( + pkg_prefix in parts_ and pkg_prefix.join("__init__.py") != path + for pkg_prefix in pkg_prefixes + ): + continue if is_file: yield from self._collectfile(path) From f68437894e3766d91b87d2b23347d575b14ccad2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 22:47:07 +0100 Subject: [PATCH 08/16] fixup! fix _should_rewrite: pass py.path.local --- src/_pytest/assertion/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 4d29ab5c741..b468f8fb51b 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -18,7 +18,6 @@ from typing import Optional from typing import Set from typing import Tuple -from typing import TYPE_CHECKING import py.path @@ -30,6 +29,7 @@ format_explanation as _format_explanation, ) from _pytest.compat import fspath +from _pytest.compat import TYPE_CHECKING from _pytest.pathlib import fnmatch_ex from _pytest.pathlib import Path from _pytest.pathlib import PurePath From 164f274c20bf772837b30ca3409269c98531d765 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 22:47:56 +0100 Subject: [PATCH 09/16] fixup! Fix Package.collect --- src/_pytest/python.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index f6160ddd5e2..8d24c6bd0eb 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -57,6 +57,9 @@ from _pytest.warning_types import PytestUnhandledCoroutineWarning if TYPE_CHECKING: + from typing import Iterator + from typing import Set + from _pytest._io import TerminalWriter From 66b7905b3c336ac72721180c37df1d736ddb28c8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 22:59:52 +0100 Subject: [PATCH 10/16] fixup! fix _should_rewrite: pass py.path.local --- src/_pytest/assertion/rewrite.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index b468f8fb51b..1949a4ad19d 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -189,25 +189,24 @@ def _early_rewrite_bailout(self, name, state): state.trace("early skip of rewriting module: {}".format(name)) return True - def _should_rewrite(self, name: str, fn: str, state: "AssertionState") -> bool: + def _should_rewrite(self, name: str, path: "py.path.local", state: "AssertionState") -> bool: # always rewrite conftest files - if os.path.basename(fn) == "conftest.py": - state.trace("rewriting conftest file: {!r}".format(fn)) + if path.basename == "conftest.py": + state.trace("rewriting conftest file: {}".format(path)) return True if self.session is not None: - if self.session.isinitpath(py.path.local(fn)): + if self.session.isinitpath(path): state.trace( - "matched test file (was specified on cmdline): {!r}".format(fn) + "matched test file (was specified on cmdline): {}".format(path) ) return True # modules not passed explicitly on the command line are only # rewritten if they match the naming convention for test files - fn_path = PurePath(fn) for pat in self.fnpats: - if fnmatch_ex(pat, fn_path): - state.trace("matched test file {!r}".format(fn)) + if fnmatch_ex(pat, path): + state.trace("matched test file {}".format(path)) return True return self._is_marked_for_rewrite(name, state) From 036197544564b4377d26c51f4f1181d0bfb3b7f8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 23:06:23 +0100 Subject: [PATCH 11/16] fixup! fixup! fix _should_rewrite: pass py.path.local --- src/_pytest/assertion/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 1949a4ad19d..e2cacd6065c 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -97,7 +97,7 @@ def find_spec(self, name, path=None, target=None): else: fn = spec.origin - if not self._should_rewrite(name, fn, state): + if not self._should_rewrite(name, py.path.local(fn), state): return None return importlib.util.spec_from_file_location( From 9263b5309ac91876a0a79a1429a5f31781a5a76f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 23 Dec 2020 23:23:04 +0100 Subject: [PATCH 12/16] fixup! fix _should_rewrite: pass py.path.local --- testing/test_assertrewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 1aa04d41bc6..a6c2236b824 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -1278,7 +1278,7 @@ def spy_find_spec(name, path): # use default patterns, otherwise we inherit pytest's testing config hook.fnpats[:] = ["test_*.py", "*_test.py"] monkeypatch.setattr(hook, "_find_spec", spy_find_spec) - hook.set_session(StubSession()) + hook.set_session(StubSession()) # type: ignore[arg-type] testdir.syspathinsert() return hook From a5c835d23262883bc3df0c829873ef260db747f3 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 15 Sep 2021 00:38:46 +0200 Subject: [PATCH 13/16] ci: (keep) coverage for old pluggy (before 1.0) --- .github/workflows/main.yml | 2 +- tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e36c3ea860a..3725e2241b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: - name: "ubuntu-py38" python: "3.8" os: ubuntu-latest - tox_env: "py38-numpy-oldattrs-twisted-coverage" + tox_env: "py38-numpy-oldattrs-oldpluggy-twisted-coverage" - name: "ubuntu-pypy3" python: "pypy3" os: ubuntu-latest diff --git a/tox.ini b/tox.ini index b7e32d777d7..afd26accd2e 100644 --- a/tox.ini +++ b/tox.ini @@ -46,6 +46,7 @@ deps = doctesting: PyYAML grouped: pytest-test-groups oldattrs: attrs==17.4.0 + oldpluggy: pluggy==0.13.1 numpy: numpy pexpect: pexpect pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master From 8cbc665183fbadd7ddaaab6b9db6cfbced7235ee Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 15 Sep 2021 00:40:21 +0200 Subject: [PATCH 14/16] Revert "test_pkgfile: --debug" This reverts commit 4c2bf50455bbb041093d6dd3f34c6a5450490e0e. --- testing/test_collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_collection.py b/testing/test_collection.py index 4c5cf70d624..d6d93a73ef7 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -679,7 +679,7 @@ def test_pkgfile(self, testdir): x = subdir.ensure("x.py") subdir.ensure("__init__.py") with subdir.as_cwd(): - config = testdir.parseconfigure(x, "--debug") + config = testdir.parseconfigure(x) col = testdir.getnode(config, x) assert col.name == "x.py" assert isinstance(col, pytest.Module) From caf9a0ebe056015dfb47ad2a8fc2bd24d9100d09 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 15 Sep 2021 00:40:57 +0200 Subject: [PATCH 15/16] squash! Fix Package.collect remove now unused _pytest.pathlib.parts --- src/_pytest/pathlib.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index 54ddb68c973..db5adfd2961 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -362,11 +362,6 @@ def fnmatch_ex(pattern: str, path) -> bool: return fnmatch.fnmatch(name, pattern) -def parts(s: str) -> Set[str]: - parts = s.split(sep) - return {sep.join(parts[: i + 1]) or sep for i in range(len(parts))} - - def _shorten_path(path: str, relative_to: str = None) -> str: if not os.path.isabs(path): return path From a77ba9544acc942ac14f934a0a5d92d5b4aa72aa Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 15 Sep 2021 00:46:13 +0200 Subject: [PATCH 16/16] fixup! squash! Fix Package.collect --- src/_pytest/pathlib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index db5adfd2961..128a9444b02 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -14,7 +14,6 @@ from posixpath import sep as posix_sep from typing import Iterable from typing import Iterator -from typing import Set from typing import TypeVar from typing import Union