Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: bumps version of requests in Pipfile and Pipfile.lock #99

Closed
wants to merge 2 commits into from

Conversation

lsh-0
Copy link
Contributor

@lsh-0 lsh-0 commented Oct 30, 2018

No description provided.

},
"flask-migrate": {
"hashes": [
"sha256:493f9b3795985b9b4915bf3b7d16946697f027b73545384e7d9e3a79f989d2fe",
"sha256:b709ca8642559c3c5a81a33ab10839fa052177accd5ba821047a99db635255ed"
"sha256:a25b3d2d2bb0f0724f104afbadae888a4b942e7221b451f720c69698d4863da7",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so much for a lock file if all the versions change when one package is upgraded; these do not seem requests dependencies, so they should stay the same? What is happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a huge issue here about it: pypa/pipenv#966

Looking at pipenv graph I can't see any dependencies between flask-migrate here and requests. I thought it might be a shared transitive dependency but I still can't find any paths between. I have a feeling the graph output may not be complete.

I think the actual problem is in the Pipfile and this ~=A.B , which means "update 'A.B' to 'A.B.C' as necessary", so there was probably a minor version bump hidden in those hashes somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @de-code is the pipenv expert here, he might be good enough to investigate for us.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure what I can add. The linked issue seems to describe the behaviour. The docs are a bit muted and could be more explicit. Looks like pipenv devs are looking into this issue. In the interim we could simply update the Pipfile to restrict the versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a little more digging and pipenv has a --selective-upgrade option.

doing this: pipenv install --selective-upgrade requests==2.20 updates requests and it's dependencies, however it's also touching a bunch of other things. Those other things look much less important than flask. I didn't figure out (again) how to revert in git, so I'm just going to open a new branch and a new pr

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that option. But if we know that another dependency is breaking the build, then maybe it might be better to declare the version it in the Pipfile. Otherwise maintaining the problem could become more difficult. I believe that is what we would do if we used a requirements.txt as well (until we can fix the underlying issue if there is one).

Copy link

@de-code de-code Nov 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting a git commit: Without the need to to rewrite the history (which shouldn't be necessary with a squash merge later on) it should be simply: git revert <commit> which will create another commit undoing the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting a git commit

I was being facetious - I've learnt how to revert in git at least a dozen times now and been burnt every single time. I think git is an abomination.

@lsh-0 lsh-0 closed this Nov 2, 2018
@lsh-0 lsh-0 deleted the fix-requests-vuln branch May 28, 2020 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants