Skip to content

Commit

Permalink
fix: support older versions of colorama
Browse files Browse the repository at this point in the history
  • Loading branch information
em230418 committed Nov 22, 2023
1 parent 007f830 commit 710ddde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion copier/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

from .types import IntSeq

colorama.just_fix_windows_console()
try:
colorama_init = colorama.just_fix_windows_console
except AttributeError: # pragma: no cover
colorama_init = colorama.init

colorama_init()


class Style:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ copier = "copier.__main__:copier_app_run"

[tool.poetry.dependencies]
python = ">=3.8,<4.0" # HACK https://github.com/PyCQA/isort/issues/1945
colorama = ">=0.4.6"
colorama = ">=0.4.3"
decorator = ">=5.1.1"
dunamai = ">=1.7.0"
funcy = ">=1.17"
Expand Down

0 comments on commit 710ddde

Please sign in to comment.