-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Generate .pyi files in py_proto_library (#10366) #21567
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
Conversation
+1; with |
@anandolee Thanks for adding the tag! It looks like my PR passes CI, so I look forward to your review. |
We here update the minimum required version of `rules_python` from 1.0.0 to 1.1.0 in order to enable using the new `direct_pyi_files` and `transitive_pyi_files` members of `PyInfo` in protocolbuffers#21567. Closes protocolbuffers#22078.
3c5da60
to
a4bbe43
Compare
We here update the minimum required version of `rules_python` from 1.0.0 to 1.1.0 in order to enable using the new `direct_pyi_files` and `transitive_pyi_files` members of `PyInfo` in #21567. Closes #22078. Closes #22079 COPYBARA_INTEGRATE_REVIEW=#22079 from dws:rules_python-1.1.0 7d0dc78 PiperOrigin-RevId: 769258504
@mkruskal-google Now that the rules_python bump has landed, please try another round of CI here. |
@mkruskal-google ping? |
1 similar comment
@mkruskal-google ping? |
@anandolee perhaps you could enable a new round of CI testing? I think that's all that should be needed to land this now that it is approved. |
We here adjust py_proto_library to produce `.pyi` files along with the `.py` files it already generates. This achieves the same effect as the gRPC py_proto_library. Closes protocolbuffers#10366.
Per reviewer feedback, we here propagate the paths to the `.pyi` files via the `direct_pyi_files` and `transitive_pyi_files` members of `PyInfo` which are available starting in `rules_python` 1.1.0. Since this means that the files are not automatically in the runfiles of the `py_proto_library`, tooling to run mypy will need to be adjusted to add what is needed from these provider fields to the runfiles if that is what is wanted.
We here adjust py_proto_library to produce
.pyi
files along with the.py
files it already generates. This achieves the same effect as the gRPC py_proto_library.Per reviewer feedback, we here propagate the paths to the
.pyi
files via the
direct_pyi_files
andtransitive_pyi_files
membersof
PyInfo
which are available starting inrules_python
1.1.0.Since this means that the files are not automatically in the runfiles
of the
py_proto_library
, tooling to run mypy will need to beadjusted to add what is needed from these provider fields to the
runfiles if that is what is wanted.
Closes #10366.