From 2d0486cd4751d828ee0ba70c9c78c8d8f778b6fa Mon Sep 17 00:00:00 2001 From: Adam Ryczkowski Date: Mon, 7 Oct 2024 11:23:00 +0200 Subject: [PATCH 1/3] A fix that gets rid of import pkg_resources --- beautysh/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beautysh/__init__.py b/beautysh/__init__.py index 639aca1..ebc6493 100755 --- a/beautysh/__init__.py +++ b/beautysh/__init__.py @@ -6,7 +6,7 @@ import re import sys -import pkg_resources # part of setuptools +import importlib.metadata from colorama import Fore # correct function style detection is obtained only if following regex are @@ -348,8 +348,8 @@ def parse_function_style(self, style_name): def get_version(self): try: - return pkg_resources.require("beautysh")[0].version - except pkg_resources.DistributionNotFound: + return importlib.metadata.version("beautysh") + except importlib.metadata.PackageNotFoundError: return "Not Available" def main(self): From 15167d0b409987f543715bf7a6ecfc7f582e9be3 Mon Sep 17 00:00:00 2001 From: Adam Ryczkowski Date: Mon, 7 Oct 2024 11:27:20 +0200 Subject: [PATCH 2/3] Version bump --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 85b98f7..2530d5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,9 @@ [tool.poetry] name = "beautysh" -version = "6.2.1" +version = "6.2.2" description = "A Bash beautifier for the masses." -authors = ["Bernardo Meurer "] +authors = ["Bernardo Meurer " + "Adam Ryczkowski "] license = "MIT" readme = "README.md" homepage = "https://github.com/lovesegfault/beautysh" @@ -26,7 +27,7 @@ include = ["LICENSE"] beautysh = "beautysh:main" [tool.poetry.dependencies] -python = "^3.6.2" +python = "^3.8.0" colorama = "^0.4.4" types-colorama = "^0.4.3" types-setuptools = "^57.4.0" From cd324d5646ba9ff18c621c3c4a3648d982d1baca Mon Sep 17 00:00:00 2001 From: Adam Ryczkowski Date: Mon, 7 Oct 2024 11:32:58 +0200 Subject: [PATCH 3/3] A fix --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2530d5c..6007389 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "beautysh" version = "6.2.2" description = "A Bash beautifier for the masses." -authors = ["Bernardo Meurer " +authors = ["Bernardo Meurer ", "Adam Ryczkowski "] license = "MIT" readme = "README.md"