-
Notifications
You must be signed in to change notification settings - Fork 4k
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
THRIFT-2059: Support for Enums in Python >= 3.4 #2489
Conversation
In the spirit and steps of https://grokbase.com/t/thrift/user/13614a6xd1/introspection-of-thrift-enums-in-python (cherry picked from commit 4a8beb6)
Technically this can work in older versions of Python with enum34. |
A few failures, but seems like flaky tests. I spotted this in 2 runs:
and did hit this locally. I'd have to run the test command twice for it to pass. I think there's some CMake dependency issue. Can continue to look at it for a future PR. |
I do not have enough experience messing with the python compiler 😅 We do have plan to drop support for python 2, or python3 before 3.4 (as they are all EOL now), so if we do this after that we don't really have to do any special handling and can just support it blindly. but doing it now means that we still need to handle the case of <3.4 that |
I'm pretty sure these 2 travis failures do not show before this pr: |
Yes that's right. But it might also be good to keep this as an option when introduced, and then in a later version make it the new default just to make sure it's stable.
ah, I only updated the CMake tests, looks like there's also equivalent for Make. |
Looks like tests are passing, but some failures with js and erl. |
Nice. Didn't notice that it was 1000 commits :-( |
You could consider turning off Merge commits on the repo and only enable Squash.
…On Sat, Mar 5, 2022, at 9:20 AM, Jens Geyer wrote:
Nice. Didn't notice that it was 1000 commits
—
Reply to this email directly, view it on GitHub <#2489 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACCFOYL35JZ5YR7O3GKEZLU6OJXDANCNFSM5J4WASJA>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
You could consider squashing as well, right? |
Currently in Python, the generated enum classes for enum thrift objects, are not being used in deserialization (or serialization). This means that the string representations of enums are never used. Moving one step further than the patch contained in THRIFT-2059, this creates python IntEnum classes and retrieves the string representation on deserialization while storing the integer representation on serialization.
[Recreated original PR from #1788 by @constd]
[skip ci]
anywhere in the commit message to free up build resources.