Commit graph

9 commits

Author SHA1 Message Date
Runze Wang
be53faf37d internal change
PiperOrigin-RevId: 930072020
2026-06-10 14:17:37 -07:00
Joshua Haberman
8ff5d8ad3f Added free threading support to PyUpb_WeakMap
Previously we had a lock in the global object cache (an instance of `PyUpb_WeakMap`), but this CL refactors `PyUpb_WeakMap` to be internally synchronized.

We also add code to handle a tricky edge case that can occur when a dealloc operation races with lookup.  This implementation mirrors the code previously implemented in C++ (`PyWeakValueMap`).

PiperOrigin-RevId: 921534474
2026-05-26 10:13:14 -07:00
Jie Luo
f9e028f29f bazel 9 tests for csharp, hpb, objc, php, python, rust and upb
PiperOrigin-RevId: 918164613
2026-05-19 19:58:47 -07:00
Jie Luo
f10c1de25f Protobuf Python UPB Free Threading support.
Add obj_cache lock to pass current free threading tests on python upb.

PiperOrigin-RevId: 864903528
2026-02-03 09:04:20 -08:00
Joshua Haberman
a014dbbd3d Removed old Python bug workaround now that we have dropped Python <3.8.
PiperOrigin-RevId: 758825465
2025-05-14 14:06:12 -07:00
Joshua Haberman
8422e9795f Migrated upb to use Copybara-standard stripping.
This CL is mostly a no-op, except that now google3-only code is actually stripped from OSS, instead of being preserved in `# begin:google_only` blocks.

This follows the conventions of the greater Copybara ecosystem.

PiperOrigin-RevId: 669513564
2024-08-30 18:34:23 -07:00
Sandy Zhang
5b32936822 Register Scalar/MessageMapContainerTypes as virtual subclasses of MutableMapping instead of inheriting directly.
This prevents these from using abc.ABCMeta metaclass to avoid deprecation warning:
```
DeprecationWarning: Type google._upb._message.MessageMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.
```

Fixes #15077
Fixes #12186

PiperOrigin-RevId: 613029479
2024-03-05 17:56:32 -08:00
Protobuf Team Bot
0fab773c1d Update remainder of upb to new short license style.
PiperOrigin-RevId: 584116886
2023-11-20 13:43:32 -08:00
Adam Cozzette
501ececd39 Reorganize upb file structure
This change moves almost everything in the `upb/` directory up one level, so
that for example `upb/upb/generated_code_support.h` becomes just
`upb/generated_code_support.h`. The only exceptions I made to this were that I
left `upb/cmake` and `upb/BUILD` where they are, mostly because that avoids
conflict with other files and the current locations seem reasonable for now.

The `python/` directory is a little bit of a challenge because we had to merge
the existing directory there with `upb/python/`. I made `upb/python/BUILD` into
the BUILD file for the merged directory, and it effectively loads the contents
of the other BUILD file via `python/build_targets.bzl`, but I plan to clean
this up soon.

PiperOrigin-RevId: 568651768
2023-09-26 14:38:35 -07:00
Renamed from upb/python/protobuf.h (Browse further)