[Python] How to check "range" of versions?

Discussão em 'Python' iniciado por Stack, Abril 11, 2025.

  1. Stack

    Stack Membro Participativo

    I have a build_requirments_file.py file, which builds a requirments.txt file for a given python program, but the thing is... It creates something like:

    huggingface_hub==currently installed version\
    pynput==currently installed version\
    module==current version


    But, how will I know in which "range" of versions will my code/programme work?

    For example, how will I generate something like:

    hugginface_hub>=versionx.x.x


    OR

    pynput<=versionx.x.x


    OR\

    pynput>versionx.x.x but <versionx.x.x (This means greater than versionx.x.x but less than versionx.x.x)


    For that we usually need to install and test all versions of the requirements..........

    I don't want to test so much, you need a whole team for testing, but what if you're just one-man-army??

    Continue reading...

Compartilhe esta Página