saimn / sigal

yet another simple static gallery generator

Home Page:http://sigal.saimon.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Click 8.1 removes function used by gallery.py

japareaggae opened this issue · comments

get_terminal_size() was deprecated in Click 8.0 and removed in 8.1. (See pallets/click#2226 (comment))

With Click 8.1, building a gallery now fails with the following traceback:

Traceback (most recent call last):
  File "/usr/bin/sigal", line 33, in <module>
    sys.exit(load_entry_point('sigal==2.2', 'console_scripts', 'sigal')())
  File "/usr/bin/sigal", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/sigal/__init__.py", line 33, in <module>
    from .gallery import Gallery
  File "/usr/lib/python3.10/site-packages/sigal/gallery.py", line 39, in <module>
    from click import get_terminal_size, progressbar
ImportError: cannot import name 'get_terminal_size' from 'click' (/usr/lib/python3.10/site-packages/click/__init__.py)

This is on an Arch Linux system, running sigal 2.2 and python-click 8.1.2.

Sorry for the noise, I just noticed commit 29f69bc already removes the deprecated get_terminal_size function. I'll ask the Arch Linux maintainer to update the package, and leave this issue here in case anyone runs into this issue.

I will make a release with the fix soon.