Conversation
|
Hi! Welcome, and thanks for opening this pull request. We have some guidelines for new pull requests, and soon you'll hear back about the results of our tests and continuous integration checks. Thank you for your contribution! |
|
Hmm. Have you used this function? Or verified it still produces correct results? |
|
I verified that this produces the correct results. |
matthewturk
left a comment
There was a problem hiding this comment.
This seems like it might include multiple PRs in one. If it's just the rdbeta change or just the field parameters it'd be OK with me.
yup, this one #5377 has the same first commit @yaochengchen , would you mind separating out the two PRs to make it a bit clearer (i.e., remove the changes to profile from this PR)? Or we can block this one until #5377 is reviewed. (also, thanks for the contributions!) |
a5c0ca5 to
e654747
Compare
@matthewturk @chrishavlin Sorry about that — I mistakenly based this PR on the previous PR’s commit without double-checking before pushing. That’s my fault, and I apologize for the confusion. I’ve now removed the profile changes from this PR so it only includes the intended fix. |
PR Summary
PR Summary
This PR updates the internal _rdbeta helper function to replace the deprecated base64.decodestring API with base64.decodebytes.
In addition, it fixes Python 3 byte handling in the XOR decoding logic. The previous implementation mixed str and bytes types and relied on ord() calls that raise TypeError under Python 3 (since iterating over bytes yields integers).
The updated implementation performs the XOR operation directly on byte values and decodes the result in a Python 3–compatible manner. This change preserves behavior while preventing runtime errors and future compatibility issues with newer Python versions.
PR Checklist
Adds a test for any bugs fixed. Adds tests for new features.