Commit graph

8 commits

Author SHA1 Message Date
Runze Wang
927c504eea Emit deprecation warning when comparing descriptor containers with unrecognized types in OSS
PiperOrigin-RevId: 945830705
2026-07-10 12:16:37 -07:00
Runze Wang
12baad3caa internal change
PiperOrigin-RevId: 922907524
2026-05-28 12:21:38 -07:00
Runze Wang
3fca2336f8 This is a future breaking change.
PiperOrigin-RevId: 907076763
2026-04-28 11:12:07 -07:00
Runze Wang
c857f49224 Refactor container comparison function in py/C++ and py/upb to return enum instead of integer.
The new enum is:
```py
typedef enum {
  kPyUpb_CompareEqual, # formerly return value 1
  kPyUpb_CompareNotEqual, # formerly return value 0
  kPyUpb_CompareError, # formerly return value -1
} PyUpb_CompareResult;
```

PiperOrigin-RevId: 903510540
2026-04-21 17:21:22 -07:00
Joshua Haberman
87de6f795f Fixed asserts that could SEGV during shutdown.
During the shutdown sequence, it's possible for the module to have been removed prior to dealloc calls.  Our dealloc calls were accessing the module state, but only for logic assertions.  We can just bail on the assertion if the module state has been destroyed.

This probably never affected OSS, because OSS builds always disable asserts.

PiperOrigin-RevId: 770333761
2025-06-11 15:00:24 -07:00
Geoffry Song
5752b2d07b [python] Remove semicolon after PyObject_HEAD (#16123)
`PyObject_HEAD` already expands to a field with a semicolon; the extra semicolon is unnecessary, and makes some compilers unhappy.

Closes #16123

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/16123 from goffrie:pyobject_head 947438678f
PiperOrigin-RevId: 700735003
2024-11-27 10:08:21 -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/descriptor_containers.c (Browse further)