damnever / pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)

Home Page:https://damnever.github.io/pigar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pigar generating requirements.txt with old version

o-felixz opened this issue · comments

I just noticed that my pigar installation does not seem to select the latest version of some packages. For example:

  • html5lib == 1.0.1 (latest is 1.1, released 2020-06-23)
  • nltk == 3.4.5 (latest is 3.5, released 2020-04-13)
  • responses == 0.10.16 (latest is 0.11.0, released 2020-08-24)

Is this expected in some way? I notice pigar --update is supposed to "update database" and that all these packages were released after pigar 0.10.0 was (2020-03-14) . Does pigar not check against pypi for the latest version of packages on-demand?

OS: Ubuntu 20.04
Python version: 3.8.2
pigar version: 0.10.0

pigar will check the package on PyPI if such a package was not installed in the local environment.

You could run pigar -c /path/to/requirements.txt to see what happens.

Ok, yes pigar -c /path/to/requirements.txt shows a list of installed vs latest packages (and some HTTP + logging errors) which is good, though I can't seem to find a way to upgrade the packages without manual edits?.

Would it be possible to document the current behavior and add a command to automatically update packages to their latest version? Preferably this command/flag would also be available during generation of a requirements file.

Would it be possible to document the current behavior?

Documentation is certainly needed. I think the default behavior is acceptable and intuitive since the latest versions may cause problems.

For now, you can delete the requirements.txt, pigar -c will regenerate for you, this is in the document(README/help).

Preferably this command/flag would also be available during generation of a requirements file.

I agree, the additional flag is better.