gnebbia / kb

A minimalist command line knowledge base manager
GNU General Public License v3.0
3.17k stars 104 forks source link

Upgrade to 0.1.6 did not upgrade typing_extensions or warn about compatibility issues #92

Open JoshuaEnglish opened 3 years ago

JoshuaEnglish commented 3 years ago

Expected Behavior

kb list .... stuff

Actual Behavior

... yadda yadda yadda from typing_extensions import Final, Literal, SupportsIndex # noqa: F401 ImportError: cannot import name 'SupportsIndex' frohm 'typing_extensions'

Steps to Reproduce the Problem

1. 1. 1.

Specifications

Note: I did resolve this by upgrading typing_extensions from 3.7.4 to 3.10.0.2

xscode-auto-reply[bot] commented 3 years ago

Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/gnebbia/kb

gnebbia commented 3 years ago

Sorry Sir, I did not enforce any kind of version for typing extensions and it is not either in the requirements.txt file. Could you better pinpoint the issue? Or provide some suggestions? Should we enforce a specific version of typing_extensions in the requirements.txt ?

dnorthup-ums commented 3 years ago

Looks like you need to set minimum version for something else... attrs version 19.3.0 (installed by Ubuntu 20.04) was newer than the 0.3.1 pip3 auto-downloaded when I installed kb, but kb required me to upgrade it. I'm now at version 21.2.0 of attrs and kb works fine so far. The hint was in the following error message:

n1xim@Leopard:~$ kb help
Traceback (most recent call last):
  File "/home/n1xim/.local/bin/kb", line 5, in <module>
    from kb.main import main
  File "/home/n1xim/.local/lib/python3.8/site-packages/kb/main.py", line 19, in <module>
    from kb.commands.add import add
  File "/home/n1xim/.local/lib/python3.8/site-packages/kb/commands/add.py", line 19, in <module>
    import kb.db as db
  File "/home/n1xim/.local/lib/python3.8/site-packages/kb/db.py", line 21, in <module>
    from kb.entities.artifact import Artifact
  File "/home/n1xim/.local/lib/python3.8/site-packages/kb/entities/artifact.py", line 18, in <module>
    @attr.s(auto_attribs=True, frozen=True, slots=True)
AttributeError: module 'attr' has no attribute 's'

FWIW this is the output from the actual install (on my home desktop). Note the exceptionally old versions of some things. Part of this may be a pip bug, but setting minimum versions would be more predictable for users.

n1xim@Leopard:~$ pip3 install -U kb-manager
Collecting kb-manager
  Downloading kb_manager-0.1.6-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 644 kB/s 
Collecting attr
  Downloading attr-0.3.1.tar.gz (1.7 kB)
Requirement already satisfied, skipping upgrade: attrs in /usr/lib/python3/dist-packages (from kb-manager) (19.3.0)
Collecting gitpython
  Downloading GitPython-3.1.24-py3-none-any.whl (180 kB)
     |████████████████████████████████| 180 kB 999 kB/s 
Collecting colored
  Downloading colored-1.4.2.tar.gz (56 kB)
     |████████████████████████████████| 56 kB 645 kB/s 
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting gitdb<5,>=4.0.1
  Downloading gitdb-4.0.7-py3-none-any.whl (63 kB)
     |████████████████████████████████| 63 kB 360 kB/s 
Collecting typing-extensions>=3.7.4.3; python_version < "3.10"
  Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting smmap<5,>=3.0.1
  Downloading smmap-4.0.0-py2.py3-none-any.whl (24 kB)
Building wheels for collected packages: attr, colored
  Building wheel for attr (setup.py) ... done
  Created wheel for attr: filename=attr-0.3.1-py3-none-any.whl size=2459 sha256=5fd389be2c445bc1aa3fbe1090d80b2900ae005f3ef36d2ba862d12bf08c82a3
  Stored in directory: /home/n1xim/.cache/pip/wheels/47/53/81/061bfd275ab8eb923cfe874f1f6cbe1e607092df09d606c982
  Building wheel for colored (setup.py) ... done
  Created wheel for colored: filename=colored-1.4.2-py3-none-any.whl size=14002 sha256=02e55ea37381b162a622ecdb007a6c19ac3928bc185d6a7bad02ec1d70b1d637
  Stored in directory: /home/n1xim/.cache/pip/wheels/ae/61/d2/51d0185d88a932058c7341ae08278b27f5312f3667efe433fc
Successfully built attr colored
Installing collected packages: attr, smmap, gitdb, typing-extensions, gitpython, colored, toml, kb-manager
  WARNING: The script kb is installed in '/home/n1xim/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed attr-0.3.1 colored-1.4.2 gitdb-4.0.7 gitpython-3.1.24 kb-manager-0.1.6 smmap-4.0.0 toml-0.10.2 typing-extensions-3.10.0.2