From 5398b1ff62761963987663ef2816e30d1ba9a4e2 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sat, 11 Mar 2023 12:25:53 +0100 Subject: [PATCH 1/4] build(poetry): clean up PyPI trove classifiers Poetry [automatically adds](https://python-poetry.org/docs/pyproject/#classifiers) Python and licence classifiers. --- pyproject.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 65b178e7c6..da8ff6c60e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,17 +42,8 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: Implementation :: CPython", ] [tool.poetry.dependencies] From 60403a5935cc810ded7d9b5c9bdafc5c046bb821 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sat, 11 Mar 2023 13:32:25 +0100 Subject: [PATCH 2/4] build(poetry): drop `typing-extensions` dependency for Python >= 3.8 --- commitizen/defaults.py | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/commitizen/defaults.py b/commitizen/defaults.py index f2447483e9..da029db87d 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -1,8 +1,12 @@ import pathlib +import sys from collections import OrderedDict from typing import Any, Dict, Iterable, List, MutableMapping, Optional, Tuple, Union -from typing_extensions import TypedDict +if sys.version_info < (3, 8): + from typing_extensions import TypedDict +else: + from typing import TypedDict # Type Questions = Iterable[MutableMapping[str, Any]] diff --git a/pyproject.toml b/pyproject.toml index da8ff6c60e..c2263f9c9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ tomlkit = ">=0.5.3,<1.0.0" jinja2 = ">=2.10.3" pyyaml = ">=3.08" argcomplete = ">=1.12.1,<2.2" -typing-extensions = "^4.0.1" +typing-extensions = { version = "^4.0.1", python = "<3.8" } charset-normalizer = ">=2.1.0,<3.1" [tool.poetry.dev-dependencies] From 48c100deca5d5d1f5750f25163166bef7c2dc883 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sat, 11 Mar 2023 13:34:26 +0100 Subject: [PATCH 3/4] build(poetry): rely on pip for resolving `termcolor` dependency on Python < 3.7 --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c2263f9c9e..d5362583d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,10 +51,7 @@ python = "^3.6.2" questionary = "^1.4.0" decli = "^0.5.2" colorama = "^0.4.1" -termcolor = [ - { "version" = "^1.1", python = "< 3.7" }, - { "version" = ">= 1.1, < 3", python = ">= 3.7" }, -] +termcolor = ">=1.1,<3" packaging = ">=19" tomlkit = ">=0.5.3,<1.0.0" jinja2 = ">=2.10.3" From f81f749b87dc7ef24a1c93adc318b15b66c58f84 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sat, 11 Mar 2023 13:53:56 +0100 Subject: [PATCH 4/4] build(poetry): relax `charset-normalizer` dependency specification `charset-normalizer` [claims to follow semver convention](https://github.com/Ousret/charset_normalizer/blob/master/CHANGELOG.md). --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d5362583d4..7369391f57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ jinja2 = ">=2.10.3" pyyaml = ">=3.08" argcomplete = ">=1.12.1,<2.2" typing-extensions = { version = "^4.0.1", python = "<3.8" } -charset-normalizer = ">=2.1.0,<3.1" +charset-normalizer = ">=2.1.0,<4" [tool.poetry.dev-dependencies] ipython = "^7.2"