pyup icon indicating copy to clipboard operation
pyup copied to clipboard

get_hashes is bogus

Open cblegare opened this issue 4 years ago • 2 comments

Hello there!

I'm trying out the bot before even considering the service. I have a requirements.txt file with hashes.

I get the following error

Update cryptography to 3.4.7:   0%|                                                                                                                                                                                                                   | 0/15 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/chabou1/git/gitlab.com/exfo/products/tandm/basecamp/cloud/admin/.venv/bin/pyup", line 8, in <module>
    sys.exit(main())

...

  File "/home/me/project/.venv/lib/python3.8/site-packages/pyup/requirements.py", line 473, in get_hashes
    return data["hashes"]
KeyError: 'hashes'

And I most likely found a bug in https://github.com/pyupio/pyup/blob/master/pyup/requirements.py#L462-L473

Also, this function looks like is mocked in test, not tested itself. I might have missed something...

cblegare avatar Apr 30 '21 17:04 cblegare

PR started last year: #392

cblegare avatar Apr 30 '21 18:04 cblegare

I there are no issue about this, only a PR, so I reopen

cblegare avatar May 01 '21 02:05 cblegare