Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

fix: narrow acceptable RSA versions to maintain Python 2 compatability#528

Merged
crwilcox merged 5 commits intomasterfrom
crwilcox-patch-1-1
Jun 11, 2020
Merged

fix: narrow acceptable RSA versions to maintain Python 2 compatability#528
crwilcox merged 5 commits intomasterfrom
crwilcox-patch-1-1

Conversation

@crwilcox
Copy link
Copy Markdown
Contributor

Version 4.0 was the last version to support Python 2 and 3.4. Version 4.1 is compatible with Python 3.5+ only.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 11, 2020
@crwilcox crwilcox changed the title Narrow acceptable RSA versions to maintain Python 2 compat fix: narrow acceptable RSA versions to maintain Python 2 compatability Jun 11, 2020
@crwilcox
Copy link
Copy Markdown
Contributor Author

Also, related to https://issues.apache.org/jira/browse/BEAM-10244

@crwilcox
Copy link
Copy Markdown
Contributor Author

Also sybrenstuvel/python-rsa#152

Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
@crwilcox crwilcox added the automerge Merge the pull request once unit tests and other checks pass. label Jun 11, 2020
@crwilcox crwilcox removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 11, 2020
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
@busunkim96 busunkim96 added the automerge Merge the pull request once unit tests and other checks pass. label Jun 11, 2020
setup.py Outdated
# rsa 4.1, 4.1.1, 4.2 are broken on Py2: https://github.com/sybrenstuvel/python-rsa/issues/152
'rsa>=3.1.4,!=4.1,!=4.1.1,!=4.2,<5; python_version < 3',
'rsa>=3.1.4,<5; python_version >= 3'
"rsa>=3.1.4,!=4.1,!=4.1.1,!=4.2,<5; python_version < 3",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think "3" may need to be in quotes as in:
'rsa>=3.1.4,!=4.1,!=4.1.1,!=4.2,<5; python_version<"3"'
'rsa>=3.1.4,<5; python_version>="3"'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently fixing and testing locally

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My motivation for rsa>=3.1.4,!=4.1,!=4.1.1,!=4.2 was that there maybe another Py2 release (which we had) with additional fixes (there were security backports), and the range would be able to pick it up.
I also was hoping that new releases won't be broken on Py2, however, looks like 4.4 is installable and broken on Py2, so we'd have to exclude it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Narrowed in in #532

'rsa<4.1; python_version < "3"',
'rsa>=3.1.4,<5; python_version >= "3"',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Released 1.17.2 with the pin above

@sybrenstuvel
Copy link
Copy Markdown

I fixed it in the Python-RSA package so that package managers now know which version they can use. Python-RSA 4.3 is now the last one to support Python 2.7, version 4.4 explicitly requires Python 3.5+.

Hope this is now resolved for you, if there are still issues let me know.

@tvalentyn
Copy link
Copy Markdown

tvalentyn commented Jun 12, 2020

version 4.4 explicitly requires Python 3.5+.

Actually, 4.4 is still installable on Py2. Perhaps intended? We can continue this on sybrenstuvel/python-rsa#152.

gcf-merge-on-green bot pushed a commit that referenced this pull request Jun 12, 2020
Related to #528. RSA seems to have released another version without `python_requires` being enforced. This will guard against that for our package.
@busunkim96 busunkim96 mentioned this pull request Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants