From 6592b479feb59cf540ee6cffa8c5b7ab74afab9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 8 Jan 2023 19:12:57 +0000 Subject: [PATCH 1/3] Update python-slugify requirement from <3.0.0,>=1.2.1 to >=1.2.1,<8.0.0 Updates the requirements on [python-slugify](https://github.com/un33k/python-slugify) to permit the latest version. - [Release notes](https://github.com/un33k/python-slugify/releases) - [Changelog](https://github.com/un33k/python-slugify/blob/master/CHANGELOG.md) - [Commits](https://github.com/un33k/python-slugify/compare/1.2.1...v7.0.0) --- updated-dependencies: - dependency-name: python-slugify dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 setup.py diff --git a/requirements.txt b/requirements.txt index 7a86437b..0574d241 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ PyQt5>=5.6.0 Pillow>=5.2.0 psutil>=5.0.0 -python-slugify>=1.2.1,<3.0.0 +python-slugify>=1.2.1,<8.0.0 raven>=6.0.0 # PyQt5-tools mozjpeg-lossless-optimization \ No newline at end of file diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index a10d8ff9..343eb4a2 --- a/setup.py +++ b/setup.py @@ -94,7 +94,7 @@ def run(self): 'PyQt5>=5.6.0', 'Pillow>=5.2.0', 'psutil>=5.0.0', - 'python-slugify>=1.2.1,<3.0.0', + 'python-slugify>=1.2.1,<8.0.0', 'raven>=6.0.0', ], classifiers=[], From ac16f4550ae7e463823431dac3ceedc83f551823 Mon Sep 17 00:00:00 2001 From: Fabrizio Pietrucci Date: Sat, 28 May 2022 19:31:12 +0200 Subject: [PATCH 2/3] Fix 'slugify' dependency check New versions of slugify moved version informations to a standalone module (__verrsion__.py). Added a check to see if the imported version is indeed a string (as previously expected). If not, get the `__version__` variable in the `__version__` module. --- kindlecomicconverter/shared.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py index 507873b1..74a6fe10 100644 --- a/kindlecomicconverter/shared.py +++ b/kindlecomicconverter/shared.py @@ -118,6 +118,8 @@ def dependencyCheck(level): missing.append('psutil 5.0.0+') try: from slugify import __version__ as slugifyVersion + if not isinstance(slugifyVersion, str): + slugifyVersion = slugifyVersion.__version__ if StrictVersion('1.2.1') > StrictVersion(slugifyVersion): missing.append('python-slugify 1.2.1+') except ImportError: From e410840ca389a6f0b58b2952af9f2cf86dca299b Mon Sep 17 00:00:00 2001 From: Fabrizio Pietrucci Date: Mon, 30 May 2022 22:29:06 +0200 Subject: [PATCH 3/3] More precise type in slugify dependency check --- kindlecomicconverter/shared.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py index 74a6fe10..5c1136b0 100644 --- a/kindlecomicconverter/shared.py +++ b/kindlecomicconverter/shared.py @@ -117,8 +117,9 @@ def dependencyCheck(level): except ImportError: missing.append('psutil 5.0.0+') try: + from types import ModuleType from slugify import __version__ as slugifyVersion - if not isinstance(slugifyVersion, str): + if isinstance(slugifyVersion, ModuleType): slugifyVersion = slugifyVersion.__version__ if StrictVersion('1.2.1') > StrictVersion(slugifyVersion): missing.append('python-slugify 1.2.1+')