Commit Graph
12 Commits
Author SHA1 Message Date
Nipunn Koorapati 581b2d5180 Update protobuf generated stubs from mypy-protobuf 2.8 (#5804) 2021-07-23 16:21:26 -07:00
Nipunn Koorapati 6d6250f109 Supported repeated field containers for extensions (#5788)
See https://github.com/dropbox/mypy-protobuf/issues/244 for the
inspiration for this. Repeated extensions are allowed by protobuf,
and they generate to extension values with repeated fields.

Notably map fields (ScalarMap and MessageMap) are NOT allowed to be
extension values - producing errors as such - so those are omitted.

testproto/test_extensions3.proto:19:6: Map fields are not allowed to be extensions.
2021-07-16 10:11:42 -07:00
Nipunn Koorapati 5199ed5bd8 Upper bound protobuf containers based on scalar/composite (#5787) 2021-07-15 22:28:16 -07:00
Nipunn Koorapati 4765978f6c Support arbitrary values for extension values (#5774)
Proto itself supports primitives, not just messages.
See https://github.com/dropbox/mypy-protobuf/issues/244 for an example
motivating this change.

Test Plan: I was able to use MYPYPATH to test an updated version of
mypy-protobuf with this change.
2021-07-13 21:13:45 -07:00
Nipunn Koorapati 42eec29eed Update proto stubs with latest mypy-protobuf 2.6 (#5753) 2021-07-10 17:10:39 -07:00
Nipunn Koorapati 276c225cd9 Remove FieldDescriptor fallback for protobuf extension methods (#5754)
It was there for compatibility to older versions of mypy-protobuf.
With modular typeshed, this sort of straddling code will no longer
be necessary! Thanks @ilevkivskyi
2021-07-11 00:28:46 +02:00
Nipunn Koorapati c5dd23ac0d Allow unicode and bytes in EnumTypeWrapper.Value (#5743) 2021-07-09 11:22:38 +02:00
Nipunn Koorapati 07ea6614c8 Genericize types for stringly typed methods on google.protobuf.Message (#2807) 2019-02-22 22:23:32 -08:00
Nipunn Koorapati b7df5a670a Add type stubs for google.protobuf.service (#2187) 2018-06-27 15:38:29 -07:00
Nipunn Koorapati b7ee95aa56 Move google.protobuf from 2 to 2and3 (#2174)
* Move google protobuf from 2 to 2and3

This should generally be ok. I ran the internal consistency
tests and they seemed to pass.

* Convert str to bytes

* repr to use str in google.protobuf.internal.containers
2018-05-31 21:47:11 -07:00
Nipunn Koorapati cac7264d3a Add google.protobuf.internal.containers.pyi to typeshed (#1718) 2018-03-17 22:05:43 -07:00
Nipunn Koorapati 5af337b438 Add subprocess annotation for TimeoutExpired (#1954) 2018-03-13 08:26:59 -07:00