thrift
thrift copied to clipboard
THRIFT-5139: THRIFT-4181: Python3 type hints
Add type hinting and native enums (IntEnum) for python generated code
- [x] Did you create an Apache Jira ticket? (not required for trivial changes)
- [X] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
- [X] Did you squash your changes to a single commit? (not required, but preferred)
- [X] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
- [ ] If your change does not involve any code, include
[skip ci]
anywhere in the commit message to free up build resources.
Cool! There's a PR here for enum changes: #2489
Stupid question (probably): Can we make it the default or what reason does the switch have? Are there any potential incompatibilities? Just asking.
PS: you should rebase, theres's a conflict
Just in case if somebody use lower versions of Python. However it make sense to make it default, and for older versions users can use the previous version. For me both ways are good, what is your opinion? @Jens-G
I'll rebase
If there is a reason, leave it. I just want to make sure we don't introduce unnecessary switches. Seems not the case. As I said, stupid question :-)
rebased and fixed a bug, for some reason on de/serialization it used enum variable as string
What's blocking this from going forward?
What's blocking this from going forward?
Pending change requests?
Pending change requests?
what requests? I missed them probably
@Jens-G , @ShaneEverittM are there any other comments or it could be completed?
What remains to get this merged? It would be wonderful to see this land
@jeking3 wrote:
There's more than just type hint changes in here, I found a case that I think will break many things including mock unit tests.
I'm generally in favour of this PR but I personally don't use py that much myself, thus given the comment above I'm not quite sure whether I am the right person to finally decide about the merge. Would be great if jeking could be re-review.
@jeking3 Did you have any more feedback on this PR? Would love to have this! :D
Will this PR be merged?
This branch has conflicts that must be resolved Conflicting files compiler/cpp/src/thrift/generate/t_py_generator.cc