question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change the hashes in the installation report to be a mapping

See original GitHub issue

What’s the problem this feature will solve?

Currently, pip install --report generates hash information that looks like:

        "archive_info": {
          "hash": "sha256=18f3e912f9ad1bdec27fb06b8198a2ccc32f201e24174cec1b3424dda605a310"
        }

This means that we can’t show hash information with multiple algorithms easily.

Describe the solution you’d like

Change archive information into being a mapping of hashes, similar to PEP 691:

      "hashes": {"sha256": "...", "blake2b": "..."},

We can put this key in archive_info, and replace the existing hash key with it.

Alternative Solutions

Not really. The other option is doing something like adding & as a separator between hashes, but that sounds like a horrible thing to do given the alternatives we have and that we’re allowed to make backwards incompatible changes right now.

Additional context

N/A

Code of Conduct

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
sbidoulcommented, Sep 30, 2022

I think this change will be backward compatible, though, as I plan to propose new a hashes field to the PEP 610 data structure, while keeping hash for backward compatibility.

1reaction
sbidoulcommented, Jul 29, 2022

Of course we could do without changing PEP 610.

Yet let me add these arguments:

  • the installation report is not an interoperability standard but it composes interoperability standards to ease consumption (as well as production)
  • download_info is explicitly documented as being PEP 610 compliant
  • diverging from it will make the implementation and documentation much more complex
  • it will make it harder to consume for our users
  • the fact that PEP 610 supports a single hash only is clearly an oversight

I’ll try to prepare an amendment PEP 610 and I’ll see how well it fits.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discussion on Changing Hashes · Issue #2247 - GitHub
I think it was because we don't want to loop through every installed package to see if a dependency is already installed. I...
Read more >
What is hashing and how does it work? - TechTarget
A hash table stores key and value pairs in a list that is accessible through its index. Because key and value pairs are...
Read more >
How To Manage Hashes in Redis - DigitalOcean
A Redis hash is a data type that represents a mapping between a string field and a string value. Hashes can hold many...
Read more >
How to Use The Ruby Map Method (With Examples)
Map is a Ruby method that you can use with Arrays, Hashes & Ranges. The main use for map is to TRANSFORM data....
Read more >
Interface Hashing - Android Open Source Project
Every package root directory (i.e. android.hardware mapping to ... When changing such an interface, add a new hash to the end of the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found