Commit Graph

107 Commits

Author SHA1 Message Date
Brian Schubert 11907e2825 Fix dunder-method positional-only parameter discrepancies in third-party stubs (#14529) 2025-08-08 12:12:44 +02:00
Brian Schubert 81c8fcb2e6 Mark stub-only private symbols as @type_check_only in third-party stubs (#14545) 2025-08-08 11:29:48 +02:00
Neil Mitchell dbd3ad356e Make Mapping.get(default) more constrained (#14360) 2025-07-02 11:24:32 +01:00
Sebastian Rittau 126768408a Replace Incomplete | None = None in third party stubs (#14063) 2025-05-15 21:37:43 +02:00
Avasam 5c7fe07278 Run Black on *_pb2 files (#13930) 2025-05-05 15:22:59 +02:00
Avasam 2b2ea7185b stubtest-complete grpcio plugins (#13932) 2025-05-05 15:21:48 +02:00
Semyon Moroz c994e2d947 Bump protobuf to ~=6.30.2 (#13922)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2025-05-02 21:20:00 -04:00
Avasam f26b41bdd1 Mention rerunning sync_protobuf scripts (#13924) 2025-05-03 02:29:31 +02:00
Avasam 19cea106f0 Bump ruff to 0.11.2 (#13757) 2025-04-01 17:31:38 +01:00
Ageev Maxim cdfb10c340 [protobuf] Add missing properties for class FieldDescriptor (#13625) 2025-03-14 21:24:14 +01:00
Alex Waygood 73ebb9dfd7 Bump mypy to 1.15.0 (#13473) 2025-02-07 11:21:40 -08:00
Avasam 21c85bae39 Bump protobuf to ~=5.29.1 (#13209) 2024-12-06 17:16:59 +00:00
Avasam a2323a41a6 Add google.protobuf.runtime_version (#13161) 2024-12-02 17:27:59 +01:00
Avasam 335cc91b70 Bump tensorflow to ~=2.18.0 (#12916)
* Tensorflow proto script update

* Manual stubtest changes

* Use Path for arg type
2024-10-28 20:32:31 -07:00
Avasam bff5547abc Use lib/ts_utils for scripts/sync_protobuf (#12913)
- Simplified `download_file` error handling (400+ return codes already raised errors!)
- Moved `update_metadata` from `scripts/sync_protobuf/_utils.py` to `lib/ts_utils/metadata.py`
- Improved `update_metadata` to support any key (values unvalidated atm) and return the modified dictionary
- Updated `scripts/stubsabot.py` to use `update_metadata`
- Updated `scripts/sync_protobuf/*` to use  `lib/ts_utils`
- Updated `scripts/sync_protobuf/tensorflow.py` and `scripts/sync_protobuf/google_protobuf.py` to use the version directly from the `METADATA.toml` file
2024-10-28 11:47:52 +01:00
Avasam bb981771ed Bump protobuf to 5.28.* (#12689) 2024-09-23 19:14:28 +02:00
Avasam c025e37bbb Rewrote protobuf generation scripts in Python (#12527) 2024-09-19 08:11:21 +02:00
Raphaël Boudreault e8ad9437b3 Update MergeFrom annotations in protobuf containers.pyi (#12623) 2024-09-06 14:35:16 -07:00
Avasam 1dbf21fa8b Bump protobuf to 5.27.* (#12197) 2024-06-25 12:26:56 +02:00
Avasam 1017c525f8 Simplify protoc install in protobuf generation scripts (#11785) 2024-04-21 19:33:31 +02:00
Avasam ce049d505f Bump protobuf to 5.26.* (#11784)
Also update generate_proto_stubs script
2024-04-19 09:01:50 +02:00
Sebastian Rittau 7d56cd9a6c Remove remaining bare Incompletes (#11768)
Enable Y065
2024-04-16 06:26:14 -07:00
Avasam 144ac0a1a8 Bump protobuf to v25.3 (#11694) 2024-04-09 20:55:27 +02:00
Avasam 2135c8ced8 Bump protobuf to v24.4 and update generator script (#11693) 2024-04-07 06:57:40 -04:00
Shantanu 88fa182253 Use PEP 570 syntax in third party stubs (#11554) 2024-03-10 14:11:43 +01:00
Avasam 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 Waygood ccc81f224d Bump various test dependencies (#11249) 2024-01-05 14:09:02 -08:00
Sebastian Rittau b6eaadcfe5 Update typing_extensions imports in third-party stubs (#11245) 2024-01-05 15:40:13 +01:00
Ali Hamdan 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
Jelle Zijlstra 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 Nigmatullin aef4fa8756 Update protobufs to support new generated messages (#10717) 2023-09-19 13:16:40 -07:00
Avasam 22b055a147 Fill in all missing upstream_repository fields (#10571)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-13 22:03:33 +01:00
github-actions[bot] 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 Pichette 7e497f052d Add missing stubs in google.protobuf.message_factory module (#10537) 2023-08-07 05:14:35 +01:00
Koichi Akabe 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
Avasam db0149859c Add partial_stub metadata field (#10157) 2023-05-10 17:04:18 +02:00
github-actions[bot] b48d1b9caf [stubsabot] Bump protobuf to 4.23.* (#10158)
Release: https://pypi.org/pypi/protobuf/4.23.0
Homepage: https://developers.google.com/protocol-buffers/
2023-05-09 09:42:01 +01:00
Alex Waygood 60939b00af Various improvements to non-generated protobuf stubs (#10010) 2023-04-04 13:44:58 +01:00
spatinom f828ce63e8 Fix return type of protobuf.ScalarMap.get() (#9996) 2023-04-03 11:50:34 +02:00
Denys Zhak 0cd5bf0921 Update protobuf for v4.22 (#9824) 2023-02-27 23:50:46 +00:00
Avasam ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood 7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Alex Waygood 60789273a2 Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-02-07 11:53:54 +00:00
Avasam 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 Waygood 4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
Ilya Konstantinov 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 Sobolev ea2ccc3c21 Improve annotations for __instancecheck__, __subclasscheck__ (#9291) 2022-11-28 11:15:02 +00:00
github-actions[bot] 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 Bull 956690dec2 protobuf: Add some return types (#9259) 2022-11-23 16:17:39 +00:00
kasium 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