Changes between Version 1 and Version 5 of Ticket #18581


Ignore:
Timestamp:
06/04/15 06:07:55 (6 years ago)
Author:
jdemeyer
Comment:

I don't want a tuple of lists of tuples, that's just too complicated. I meant just one list of tuples.

Actually thinking a bit more about this, a dictionary makes more sense: the keys are the package names and the values are tuples (installed_version, latest_version).

And I certainly want the output format to be the same for local=True and local=False.

I also propose to make this a separate function package_versions() to avoid the many if version branches you will need. And then implement the old _package_lists_from_sage_output() as a very short function using this new package_versions() function.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18581

    • Property Status changed from new to needs_work
    • Property Authors changed from to John Palmieri
    • Property Summary changed from standard_packages()... should output installed and available versions to _package_lists_from_sage_output() should output installed and available versions
    • Property Branch changed from to u/jhpalmieri/versions
    • Property Commit changed from to 17bc8fad32020a978d940694edba35b46e81389f
  • Ticket #18581 – Description

    v1 v5  
    1 Currently, the function `_package_lists_from_sage_output` only gives the latest available version of a package, not the version which is installed. I propose to actually return a list of triples
     1Currently, the function `_package_lists_from_sage_output` only gives the latest available version of a package, not the version which is installed.
     2
     3I propose to define a new function `package_versions(local=False)` which returns a dictionary with key:value pairs of the form
    24{{{
    3 (package_name, installed_version, latest_version)
     5package_name: (installed_version, latest_version)
    46}}}
    57where `installed_version` is `None` if the package is not installed and `latest_version` is the newest available version.
    68
    7 If, for example, arb-2.5.0 is installed but arb-2.6.0 is availble, then one such triple would be
     9If, for example, arb-2.5.0 is installed but arb-2.6.0 is availble, then one such key:value pair would be
    810{{{
    9 ('arb', '2.5.0', '2.6.0')
     11'arb': ('2.5.0', '2.6.0')
    1012}}}
    1113
    1214If arb is not installed, this would be:
    1315{{{
    14 ('arb', None, '2.6.0')
     16'arb': (None, '2.6.0')
    1517}}}