From 7b85e41cde27bfb820c0fecb0bdad541f58ff3dd Mon Sep 17 00:00:00 2001 From: Jeremy Tellaa Date: Wed, 22 Nov 2023 14:31:29 +0100 Subject: [PATCH] chore: remove use of deprecated pkg_resources --- poetry.lock | 29 +---------------------------- py_loop/looper.py | 4 ++-- pyproject.toml | 2 -- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/poetry.lock b/poetry.lock index 57f5ea6..ac0ee57 100644 --- a/poetry.lock +++ b/poetry.lock @@ -965,22 +965,6 @@ files = [ cryptography = ">=2.0" jeepney = ">=0.6" -[[package]] -name = "setuptools" -version = "69.0.2" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-69.0.2-py3-none-any.whl", hash = "sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2"}, - {file = "setuptools-69.0.2.tar.gz", hash = "sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - [[package]] name = "tabulate" version = "0.8.10" @@ -1028,17 +1012,6 @@ rfc3986 = ">=1.4.0" rich = ">=12.0.0" urllib3 = ">=1.26.0" -[[package]] -name = "types-setuptools" -version = "68.2.0.1" -description = "Typing stubs for setuptools" -optional = false -python-versions = ">=3.7" -files = [ - {file = "types-setuptools-68.2.0.1.tar.gz", hash = "sha256:8f31e8201e7969789e0eb23463b53ebe5f67d92417df4b648a6ea3c357ca4f51"}, - {file = "types_setuptools-68.2.0.1-py3-none-any.whl", hash = "sha256:e9c649559743e9f98c924bec91eae97f3ba208a70686182c3658fd7e81778d37"}, -] - [[package]] name = "typing-extensions" version = "4.8.0" @@ -1095,4 +1068,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "d75e8577c6efcb885e8a352861cb750c4ef1de49e0fd941c94d59245d47fc1d4" +content-hash = "e7786f6791b764b2c513432301b0c2bace6f5de7faaf36dd7d3951a5b1a7c568" diff --git a/py_loop/looper.py b/py_loop/looper.py index b70a31d..6796363 100644 --- a/py_loop/looper.py +++ b/py_loop/looper.py @@ -1,9 +1,9 @@ +import importlib.metadata import subprocess import time from typing import Any, List import cli_ui as ui -import pkg_resources class InvalidCommand(Exception): @@ -104,4 +104,4 @@ def loop(self) -> None: @classmethod def version(cls) -> str: - return pkg_resources.require("py-loop")[0].version + return importlib.metadata.version("py-loop") diff --git a/pyproject.toml b/pyproject.toml index 2511157..23bde06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ authors = ["jerem "] [tool.poetry.dependencies] python = ">=3.8.1,<4.0" cli-ui = "^0.17.2" -setuptools = "^69.0.2" [tool.poetry.group.dev.dependencies] twine = "^4.0.2" @@ -17,7 +16,6 @@ flake8 = "6.1.0" mypy = "1.7.0" pytest = "^7.4.3" pytest-cov = "^4.01.0" -types-setuptools = "^68.2.0.1" isort = "^5.12.0" [build-system]