From c123be03b52868ef4b802891e575191ef1c516e2 Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Wed, 13 Nov 2024 15:16:16 +0100 Subject: [PATCH] remove 'packaging' package --- pyproject.toml | 1 - pytest_sugar.py | 8 ++------ setup.py | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e0ddd9f..7de95b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ Homepage = "https://github.com/Teemu/pytest-sugar" python = ">=3.8.1,<4.0" pytest = ">=6.2.0" termcolor = ">=2.1.0" -packaging = ">=21.3" [tool.poetry.dev-dependencies] black = "^24.0" diff --git a/pytest_sugar.py b/pytest_sugar.py index 587eeef..3f81c45 100644 --- a/pytest_sugar.py +++ b/pytest_sugar.py @@ -183,15 +183,11 @@ def pytest_configure(config) -> None: if config.pluginmanager.hasplugin("xdist"): try: - import xdist # type: ignore + import xdist # type: ignore # noqa: F401 except ImportError: pass else: - from packaging import version - - xdist_version = version.Version(xdist.__version__) - if xdist_version >= version.Version("1.14"): - config.pluginmanager.register(DeferredXdistPlugin()) + config.pluginmanager.register(DeferredXdistPlugin()) if IS_SUGAR_ENABLED and not getattr(config, "slaveinput", None): # Get the standard terminal reporter plugin and replace it with our diff --git a/setup.py b/setup.py index f14de30..b078ac1 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def get_version(filename): zip_safe=False, include_package_data=True, platforms="any", - install_requires=["pytest>=6.2.0", "termcolor>=2.1.0", "packaging>=21.3"], + install_requires=["pytest>=6.2.0", "termcolor>=2.1.0"], extras_require={ "dev": [ "black",