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

Update fixate-requirements.py to cope with PIP 20.3.3 #5123

Merged
merged 44 commits into from
Mar 18, 2021

Conversation

amanda11
Copy link
Contributor

Building upon #5060. Updates to fixate-requirements.py to see if can use newer version of pip for make requirements.

@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Jan 25, 2021
@amanda11 amanda11 marked this pull request as draft January 25, 2021 16:08
@amanda11
Copy link
Contributor Author

Need to resolve problem seen when try and building this version of ST2 using the dockerfiles from StackStorm/st2packaging-dockerfiles#97:

ERROR: Command errored out with exit status 1:
[wheelhouse: st2]           command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-njg1eihv/simplejson_b53c2b0962984f95ae8a5c6c5ab9b98d/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-njg1eihv/simplejson_b53c2b0962984f95ae8a5c6c5ab9b98d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-w_idsqh0
[wheelhouse: st2]               cwd: /tmp/pip-wheel-njg1eihv/simplejson_b53c2b0962984f95ae8a5c6c5ab9b98d/
[wheelhouse: st2]          Complete output (6 lines):
[wheelhouse: st2]          Traceback (most recent call last):
[wheelhouse: st2]            File "<string>", line 1, in <module>
[wheelhouse: st2]            File "/tmp/pip-wheel-njg1eihv/simplejson_b53c2b0962984f95ae8a5c6c5ab9b98d/setup.py", line 39
[wheelhouse: st2]              except DistutilsPlatformError, x:
[wheelhouse: st2]                                           ^
[wheelhouse: st2]          SyntaxError: invalid syntax

@amanda11
Copy link
Contributor Author

Looks like if you upgrade the version of pip used when you do the build that it has a different way of determining dependencies, and it goes back through lots of old versions - if it gets to versions that aren't python3 compatible then it fails. So have to then fixate those requirements so the min is at least a py3 version.
See: pypa/pip#8713

@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines. Requires some effort to review. and removed size/M PR that changes 30-99 lines. Good size to review. labels Jan 25, 2021
@amanda11
Copy link
Contributor Author

The build takes much longer with this pip, will need to probably update the version requirements to much higher ones to enable it to have less versions to compare when it works out its dependencies.

@cognifloyd
Copy link
Member

We just reformatted the code with black. (Hooray!) And this PR got caught in the cross fire. (Arrgh!)
This is just a note to let you know why merging master into this branch will be a bit less fun this time around and to commiserate on how hard it is to get pip updated...

@amanda11 amanda11 marked this pull request as draft March 11, 2021 14:56
@amanda11 amanda11 marked this pull request as ready for review March 11, 2021 16:23
Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

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

Just a few comment suggestions. The code looks great.

scripts/fixate-requirements.py Outdated Show resolved Hide resolved
scripts/fixate-requirements.py Outdated Show resolved Hide resolved
fixed-requirements.txt Outdated Show resolved Hide resolved
@cognifloyd
Copy link
Member

CI failures are resolved on master. Merging should resolve them.

@cognifloyd
Copy link
Member

Weird. I wonder why GHA didn't check the last commit.

@amanda11
Copy link
Contributor Author

Related change is merged, but waiting for dockerfiles to be published: StackStorm/st2packaging-dockerfiles#98
May need to wait for StackStorm/st2-packages#684 to be merged

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

👍

Thanks a lot for diving deep here!

@amanda11 amanda11 merged commit 4022aea into master Mar 18, 2021
@amanda11 amanda11 deleted the amanda_tmp_virtualenv branch March 18, 2021 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants