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

Pin PyOpenSSL<20 and prettytable<2 due to python2.7 conflicts #5131

Closed
wants to merge 3 commits into from

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Jan 29, 2021

In order to install st2 v3.3 requirements on python 2.7, we need to pin PyOpenSSL<20 and prettytable<2.

We require requests==2.23.0 which needs pyOpenSSL >= 0.14.
https://github.com/psf/requests/blob/v2.23.0/setup.py#L105

We also pin cryptography==2.8, but pyOpenSSL==20.0.0 was released Nov 27, 2020 and that requires cryptography>=3.2.
https://github.com/pyca/pyopenssl/blob/20.0.0/setup.py#L98

st2client requires prettytable. prettytable 2.0 was released in November as well, and it does not support python2. pip is still trying to install it though, so we need to prevent that.

In order to install st2 v3.3 requirements on py2.7, we need to pin
PyOpenSSL<20.

We require requests==2.23.0 which needs pyOpenSSL >= 0.14.
https://github.com/psf/requests/blob/v2.23.0/setup.py#L105

We also pin cryptography==2.8, but pyOpenSSL==20.0.0 was
released Nov 27, 2020 and that requires cryptography>=3.2.
https://github.com/pyca/pyopenssl/blob/20.0.0/setup.py#L98
@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Jan 29, 2021
@cognifloyd
Copy link
Member Author

cognifloyd commented Jan 29, 2021

Fixing this is required to fix the exchange pack tests on python2.7.

For the pack tests, we don't need to cut a release. Later, we'll probably need to release v3.3.1 with this fix. Anyone that needs python2.7 can't upgrade to v3.4, and v3.3 won't install on python 2.7 without this fix.

prettytable 2.0 was released in November 2020. It does not support
python 2.7. Pin it for the 3.3 branch.
@pull-request-size pull-request-size bot added size/S PR that changes 10-29 lines. Very easy to review. and removed size/XS PR that changes 0-9 lines. Quick fix/merge. labels Jan 29, 2021
@cognifloyd cognifloyd changed the title Pin PyOpenSSL<20 to avoid cryptography==2.8 conflict Pin PyOpenSSL<20 and prettytable<20 due to python2.7 conflicts Jan 29, 2021
@cognifloyd cognifloyd changed the title Pin PyOpenSSL<20 and prettytable<20 due to python2.7 conflicts Pin PyOpenSSL<20 and prettytable<2 due to python2.7 conflicts Jan 29, 2021
@cognifloyd
Copy link
Member Author

I’m trying to fix the packaging build. At first it was trying to use the master branch of st2-packaging to build this 3.3 only change. That checked for an rbac command that is only installed with the rbac package and that isn’t installed on 3.3, so I fixed that here: 97a0315

Now, el8 and bionic are passing on circleci, but both el7 and xenial are not.
They are both complaining that pip is not installed during “Build the ${DISTRO} Packages”. Any ideas?
https://app.circleci.com/pipelines/github/StackStorm/st2/948/workflows/07219ab8-90a7-403e-a1f8-adc553d3d6de/jobs/12289/parallel-runs/0?filterBy=ALL

Oh, and Travis was passing fine. One of the builds errored this time, but re-running should fix it.

@cognifloyd
Copy link
Member Author

It turns out that packaging build images no longer have python2.7. So, since xenial and centos7 needed python2.7 to build, we can no longer build the packages.

Re-adding python2.7 would take significant effort and probably isn't worth it. See the discussion here:
StackStorm/community#40 (comment)

@cognifloyd cognifloyd closed this Jan 30, 2021
@cognifloyd cognifloyd deleted the pyopenssl-fix-for-py27 branch February 12, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S PR that changes 10-29 lines. Very easy to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant