• How to get the needed version of a dependency

    From Cecil Westerhof@21:1/5 to All on Wed Dec 14 09:55:34 2022
    If I want to know the dependencies for requests I use:
    pip show requests

    And one of the lines I get is:
    Requires: certifi, charset-normalizer, idna, urllib3

    But I want (in this case) to know with version of charset-normalizer
    requests needs.
    How do I get that?

    --
    Cecil Westerhof
    Senior Software Engineer
    LinkedIn: http://www.linkedin.com/in/cecilwesterhof

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to Cecil Westerhof on Wed Dec 14 08:38:54 2022
    On 12/14/2022 3:55 AM, Cecil Westerhof wrote:
    If I want to know the dependencies for requests I use:
    pip show requests

    And one of the lines I get is:
    Requires: certifi, charset-normalizer, idna, urllib3

    But I want (in this case) to know with version of charset-normalizer
    requests needs.
    How do I get that?

    Check the METADATA file in the *dist-info package files usually found in Lib\site-packages.

    ie \Python\3.11.0\Lib\site-packages\pandas-1.5.2.dist-info

    Look for config lines beginning with 'Requires':

    Requires-Python: >=3.8
    Requires-Dist: python-dateutil (>=2.8.1)

    $ pip list will show you which version of the package you have
    installed, so you can search for the matching .dist-info file

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Cecil Westerhof@21:1/5 to DFS on Wed Dec 14 22:05:26 2022
    DFS <nospam@dfs.com> writes:

    On 12/14/2022 3:55 AM, Cecil Westerhof wrote:
    If I want to know the dependencies for requests I use:
    pip show requests
    And one of the lines I get is:
    Requires: certifi, charset-normalizer, idna, urllib3
    But I want (in this case) to know with version of charset-normalizer
    requests needs.
    How do I get that?

    Check the METADATA file in the *dist-info package files usually found in Lib\site-packages.

    ie \Python\3.11.0\Lib\site-packages\pandas-1.5.2.dist-info

    Look for config lines beginning with 'Requires':

    Requires-Python: >=3.8
    Requires-Dist: python-dateutil (>=2.8.1)

    $ pip list will show you which version of the package you have
    installed, so you can search for the matching .dist-info file

    Works. In /usr/local/lib/python3.9/dist-packages/requests-2.28.1.dist-info/METADATA
    I see:
    Requires-Dist: charset-normalizer (<3,>=2)

    That already keeps charset-normalizer two months from being updated.
    Maybe I should contact Kenneth Reitz.

    --
    Cecil Westerhof
    Senior Software Engineer
    LinkedIn: http://www.linkedin.com/in/cecilwesterhof

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)