Skip to content

Conversation

@IsakTheHacker
Copy link
Contributor

There are some Python packages that depend on version 44 or newer so an update to Cryptography would be highly appreciated. I've also heard that there has been some vulnerability affecting version 43 and lower but I have not looked into that any further at this time.

@mhsmith
Copy link
Member

mhsmith commented May 21, 2025

Have you built this version and tested it with the pkgtest app, as described in the README? If so, which Python versions and ABIs have you checked? You don't need to cover every combination, but you should test at least one before submitting a PR, and let me know the details.

@mhsmith
Copy link
Member

mhsmith commented Jul 26, 2025

If you want to proceed with this, please respond to my previous comments, and I'll reopen the PR.

@mhsmith mhsmith closed this Jul 26, 2025
@IsakTheHacker IsakTheHacker changed the title Update Cryptography package to version 45.0.2 Update Cryptography package to version 46.0.3 Nov 14, 2025
@IsakTheHacker
Copy link
Contributor Author

Could you reopen this PR for me?

@mhsmith mhsmith reopened this Nov 14, 2025
@IsakTheHacker
Copy link
Contributor Author

IsakTheHacker commented Nov 14, 2025

I have built and tested using Python 3.12 on x86_64 and arm64-v8a. The build succeeds and the tests in pkgtest succeed. The patches have been corrected to work with the newest version of Cryptography. This PR is ready to be merged now. One thing to note is that I have pulled the changes from #1413 since I thought they would help me when I was struggling. I am not sure if those are necessary for this PR but you should merge that PR before mine.

Other discussion perhaps, but why are the new wheels built with android-24 and not android-21 like it used to be. Is there any actual reason that we can't continue publishing wheels that work on newer versions while they continue to be backwards-compatible with older versions of chaquopy. I understand that API 24 is now the minimum in Chaquopy (which makes development easier since we could remove patches etc etc etc...) but what complexity issue are we solving by marking the new wheels as android-24 plus only. I would love if you could build this package for android-21 instead!

@IsakTheHacker IsakTheHacker marked this pull request as draft November 14, 2025 13:12
Newer versions require cffi 2.0.0. By using a slightly older version we
can get by with cffi 1.17.1 which is already patched and published to
the package repository
@IsakTheHacker
Copy link
Contributor Author

I encountered some additional issues. Accidentally, I had forgotten to pass my custom --extra-index-url so I tested the already published version. I discovered that newer versions of cryptography require cffi 2.0.0 or newer (pyca/cryptography#13468) so I downgraded to cryptography 46.0.0 and now everything works like a charm with our own cffi 1.17.1. This PR is now complete and I look forward to hearing your thoughts :)

@IsakTheHacker IsakTheHacker marked this pull request as ready for review November 14, 2025 13:48
@IsakTheHacker IsakTheHacker changed the title Update Cryptography package to version 46.0.3 Update Cryptography package to version 46.0.0 Nov 15, 2025
@mhsmith
Copy link
Member

mhsmith commented Nov 29, 2025

I understand that API 24 is now the minimum in Chaquopy (which makes development easier since we could remove patches etc etc etc...) but what complexity issue are we solving by marking the new wheels as android-24 plus only.

If the wheels are marked as compatible with android-21, then they must be tested on android-21, and this can't be done with the current version of Chaquopy. Having to test with different versions of Chaquopy would make the package test process even more time-consuming than it already is. So if I have to pick one, it should be the current one, because that's what the most people will be using.

Why do you need to support devices which are more than 9 years old?

@mhsmith
Copy link
Member

mhsmith commented Nov 29, 2025

One thing to note is that I have pulled the changes from #1413 since I thought they would help me when I was struggling. I am not sure if those are necessary for this PR but you should merge that PR before mine.

OK, I'll try to do that now. If you find that the changes aren't necessary for this PR after all, then you can remove them to unblock it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants