Commit Graph
76 Commits
Author SHA1 Message Date
AvasamandGitHub 1dbf21fa8b Bump protobuf to 5.27.* (#12197) 2024-06-25 12:26:56 +02:00
AvasamandGitHub ce049d505f Bump protobuf to 5.26.* (#11784)
Also update generate_proto_stubs script
2024-04-19 09:01:50 +02:00
Sebastian RittauandGitHub 7d56cd9a6c Remove remaining bare Incompletes (#11768)
Enable Y065
2024-04-16 06:26:14 -07:00
AvasamandGitHub 144ac0a1a8 Bump protobuf to v25.3 (#11694) 2024-04-09 20:55:27 +02:00
AvasamandGitHub 2135c8ced8 Bump protobuf to v24.4 and update generator script (#11693) 2024-04-07 06:57:40 -04:00
ShantanuandGitHub 88fa182253 Use PEP 570 syntax in third party stubs (#11554) 2024-03-10 14:11:43 +01:00
88238202d7 Add pyupgrade check outdated-version-block (UP036) (#11509)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-01 07:15:53 -08:00
Alex WaygoodandGitHub ccc81f224d Bump various test dependencies (#11249) 2024-01-05 14:09:02 -08:00
Sebastian RittauandGitHub b6eaadcfe5 Update typing_extensions imports in third-party stubs (#11245) 2024-01-05 15:40:13 +01:00
6748816d43 Enable ruff's isort rules on files generated using mypy-protobuf (#10939)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-10-28 07:27:45 -07:00
f9f30cc0f2 Update mypy-protobuf (#10914)
Co-authored-by: Avasam <samuel.06@hotmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-22 16:31:02 -07:00
Ruslan NigmatullinandGitHub aef4fa8756 Update protobufs to support new generated messages (#10717) 2023-09-19 13:16:40 -07:00
0b65653746 [stubsabot] Bump protobuf to 4.24.* (#10545)
Release: https://pypi.org/pypi/protobuf/4.24.0
Homepage: https://developers.google.com/protocol-buffers/

Co-authored-by: stubsabot <>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-09 11:50:46 +01:00
Mathieu PichetteandGitHub 7e497f052d Add missing stubs in google.protobuf.message_factory module (#10537) 2023-08-07 05:14:35 +01:00
Koichi AkabeandGitHub 53a8932797 Pretend _EnumTypeWrapper inherits from type (#10203)
Pretend `google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper` inherits from `type`. It doesn't really, but this makes type checkers stop complaining when you use it as a metaclass, which is the only reason the class exists.
2023-07-22 15:50:40 +01:00
Alex WaygoodandGitHub 60939b00af Various improvements to non-generated protobuf stubs (#10010) 2023-04-04 13:44:58 +01:00
spatinomandGitHub f828ce63e8 Fix return type of protobuf.ScalarMap.get() (#9996) 2023-04-03 11:50:34 +02:00
Denys ZhakandGitHub 0cd5bf0921 Update protobuf for v4.22 (#9824) 2023-02-27 23:50:46 +00:00
Alex WaygoodandGitHub 7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
AvasamandGitHub f1aede7162 Manual changes of Any union to Incomplete in stubs folder (#9566)
- ClassVar[Any | None]
- Missed previous changes due to alias
- Manual review of leftover Any unions (`| Any` and `Any |`)
2023-02-02 06:48:41 -08:00
Alex WaygoodandGitHub 4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
578cebe1c5 protobuf: Annotate well_known_types.pyi (#9323)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-12-05 18:49:55 +00:00
Nikita SobolevandGitHub ea2ccc3c21 Improve annotations for __instancecheck__, __subclasscheck__ (#9291) 2022-11-28 11:15:02 +00:00
5453c97753 Bump protobuf to 4.21.*; delete google/__init__.pyi (#8360)
This major version bump of the stubs package deletes google/__init__.py, which does not exist at runtime, and caused problems for several users. Mypy now has --namespace-packages enabled by default, which should hopefully mean that this causes minimal pain.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-11-25 11:28:56 +00:00
Sam BullandGitHub 956690dec2 protobuf: Add some return types (#9259) 2022-11-23 16:17:39 +00:00
kasiumGitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>AlexWaygood
f9cd5ee859 Improve ast types; revert several "redundant numeric union" changes from #7906 (#9130)
* Adapt number types in ast

Since mypy  0.990 type promotions was limited.
This means that complex is not longer promoted to int/float, therefore
we should adapt the types to list all possible types

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2022-11-14 09:41:23 +00:00
Nikita SobolevandGitHub 62a6c3d616 Annotate known magic-method return types (#9131) 2022-11-08 18:28:42 +00:00
Brendan GrahamandGitHub f4ef058169 google.protobuf: Add an __init__ stub to fix type checking (#8982) 2022-10-25 13:20:43 -07:00
Nipunn KoorapatiandGitHub f43ee406f1 Bump mypy-protobuf to 3.4.0 (#8951) 2022-10-21 01:26:57 +01:00
Nipunn KoorapatiandGitHub bcad078264 types-protobuf: Bump the rev of protobuf supported to 4.21.8 (#8937) 2022-10-20 23:23:53 +01:00
Alex WaygoodandGitHub 97c935a3fe Fix protobuf stubtest errors (#8758) 2022-09-18 17:47:36 -07:00
Alex WaygoodandGitHub 246f7e7720 protobuf: fix stubtest errors (#8735) 2022-09-14 21:45:29 -07:00
Alexander ReynoldsandGitHub fdbf1396d1 [protobuf] MessageToJson indent parameter can be None (#8705) 2022-09-08 13:41:18 +02:00
Nipunn KoorapatiandGitHub 7beaebff40 Bump to mypy-protobuf 3.3.0 (#8612)
* Bump to mypy-protobuf 3.3.0

* Remove some ignores for formatting
2022-08-26 07:24:11 +01:00
Nipunn KoorapatiandGitHub c17c0d5607 Bump protobuf to 3.20.1 (#8609)
There are even newer versions available (4.*), but I had found a bug
in it which prevented it from working with mypy-protobuf. For now,
sticking to just 3.20.1
2022-08-25 13:28:08 +01:00
Alex WaygoodandGitHub 43f923b6c2 protobuf: Delete some __new__ and __init__ methods (#8088) 2022-06-16 17:10:14 +02:00
Alex WaygoodandGitHub 76a4bd796b Simplify and correct many numeric unions (#7906)
Unblocks PyCQA/flake8-pyi#222
2022-05-21 15:25:00 +01:00
Alex WaygoodandGitHub fed1f35c32 Remove explicit inheritance from object (#7819) 2022-05-10 16:24:53 +03:00
Alex WaygoodandGitHub ac30b96d14 Use str instead of Text (#7812) 2022-05-09 20:47:11 +01:00
Alex WaygoodandGitHub b093c90a94 Use TypeAlias for type aliases where possible, part II (#7667) 2022-04-20 20:02:47 +01:00
Alex WaygoodandGitHub 653f2c6ba4 Third-party stubs: import from collections.abc where possible (#7637) 2022-04-16 14:52:57 +01:00
Alex WaygoodandGitHub 740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Jelle ZijlstraandGitHub fa9074366b Revert "Remove google/__init__.pyi (#6106)" (#7522)
This reverts commit a11a6643a7.
2022-03-21 19:49:00 +01:00
Nipunn KoorapatiandGitHub a11a6643a7 Remove google/__init__.pyi (#6106)
Since google is a namespace package, it won't have an init.
Depends on https://github.com/typeshed-internal/stub_uploader/pull/33
2022-03-20 14:41:16 -07:00
Alex WaygoodandGitHub e8286e7048 Use PEP 604 syntax in non-autogenerated protobuf stubs (#7506) 2022-03-17 11:34:31 +00:00
Nipunn KoorapatiandGitHub 96a09f6a35 protobuf: Bring back Message.Extensions (#7154) 2022-02-08 13:51:41 +01:00
Alex WaygoodandGitHub 494481a0ae Improve a bunch of __(deep)copy__ methods (#7148) 2022-02-06 15:40:44 -08:00
ebcdcfa24e Makes DESCRIPTOR non nullable again (#7125)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-04 22:05:58 +02:00
Nipunn KoorapatiandGitHub 90f5422df7 Add/fix types to a bunch of non-generated protobuf files (#7017) 2022-02-02 12:30:39 +01:00
Nipunn KoorapatiandGitHub 470ea31ccd Use relax_strict_optional_primitives on protobuf generated code (#7038)
Per the suggestion in https://github.com/dropbox/mypy-protobuf/issues/344
This generates more permissive constructors (which protobuf itself actually
accepts).

Philosophically, I think it makes sense for the generated code hosted on
typeshed to be most permissive, while the generated code of individual
projects can make individual decisions (defaulting to less permissive).
2022-01-28 17:37:57 -08:00