Commit graph

24 commits

Author SHA1 Message Date
Jie Luo
bbc9dd9e8a Drop Python 3.9 support
Python 3.9 reached its official End-of-Life (EOL) on October 31, 2025
https://devguide.python.org/versions/

PiperOrigin-RevId: 854341311
2026-01-09 14:20:23 -08:00
Jie Luo
8e3543177e Add Python 3.14 test coverage
#test-continuous

PiperOrigin-RevId: 829211258
2025-11-06 19:21:19 -08:00
Joshua Haberman
56b2b89e37 Publish s390x wheels for Python/upb.
PiperOrigin-RevId: 808302611
2025-09-17 15:50:14 -07:00
Zoey Greer
0f4aa11fde Add missing load for sh_binary in python/dist/BUILD.bazel (#23195)
This was causing a build failure, since `sh_binary` is referenced in `python/dist/BUILD.bazel`, but it was never initialized.

Closes #23195

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/23195 from tempoz:add-missing-load-sh-binary-to-python-dist e85d0323cf
PiperOrigin-RevId: 797114331
2025-08-19 19:30:27 -07:00
Adam Cozzette
20759b55fa Make protobuf codebase compatible with --incompatible_config_setting_private_default_visibility
This is necessary to get the BCR presubmit checks to pass.

PiperOrigin-RevId: 786432944
2025-07-23 14:54:29 -07:00
Aaron Levy
508aba1b50 Updating setuptools to patch CVE-2025-47273 (#22094)
Updating setuptools to patch CVE-2025-47273

Also updated Bazel to 7.4.0 due to https://github.com/bazelbuild/bazel/issues/4327

Fixes #22165

Closes #22094

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/22094 from aaronmaxlevy:aaron_update_setuptools e1278abf68
PiperOrigin-RevId: 780701752
2025-07-08 13:58:42 -07:00
Protobuf Team Bot
32838e8c2c Rename bazel "pip_deps" hub_name.
rules_python recommends not using "pip_deps" as a hub name unless the module is guaranteed to always be the root module, as the name must be unique between modules.

PiperOrigin-RevId: 715435028
2025-01-14 10:37:26 -08:00
Tony Liao
39808bc55d Remove the entire pb_unit_tests/ directory with reflection_test_wrapper.
The test wrappers were another way to document nonconformant behaviour between
different python backends. We can achieve the same by removing the wrapper
script and adding an if-condition in the test itself based on
api_implementation.Type(). Since we already do that for nonconformance between
pure Python vs. C++ backends, this change makes it easier to look for UPB
nonconformance instead of going through another layer of indirection.

Since this is the last remaining test file in the pb_unit_tests directory, I
have removed the entire directory. Future UPB tests will be in the same
directory as C++ and pure python implementations, namely:
//python/google/protobuf/internal.

Temporarily, we will need to hardcode the migrated test name in test_upb.yml
because not all tests under google.protobuf.internal support UPB yet.
(UPB testing for selected tests are added in 21e9aa6cac).

The reflection_test is a slightly more complicated test. In this commit I've
removed exemption of testParsingNestedClass in reflection_test. A follow-up
commit will ensure further conformance within the reflection_test. There are
quite a few if-conditions that were added to skip certain checks due to
nonconformant behavior -- they seem to no longer apply.

PiperOrigin-RevId: 712943652
2025-01-07 09:52:04 -08:00
Mike Kruskal
aa4e50fe78 Replace old branch of absl-py parameterization with a dev dependency
#test-continuous

PiperOrigin-RevId: 706910739
2024-12-16 18:57:05 -08:00
gongsu832
15e7d71eac Building python binding with bazel on s390x (#19232)
Changes needed for building python binding with bazel on s390x.

Closes #19232

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/19232 from gongsu832:python_bazel_s390x 7ed0c486f9
PiperOrigin-RevId: 699209740
2024-11-22 10:13:07 -08:00
Protobuf Team Bot
f5a293768f Drop Python 3.8 support
This was previously announced in https://engdoc.corp.google.com/eng/doc/devguide/proto/news/2024-10-02.md#dropping-python-38-support per our support policies.

#test-continuous

PiperOrigin-RevId: 698398370
2024-11-20 08:41:33 -08:00
Protobuf Team Bot
7060d3d723 Add Python 3.13 test coverage
#test-continuous

PiperOrigin-RevId: 690740783
2024-10-28 14:01:44 -07:00
Joshua Haberman
983910fa1a Removed aliases for the boostrap proto libraries.
These should only be used by bootstrapping. Users should be using the regular upb_proto_library() targets instead.

PiperOrigin-RevId: 666007278
2024-08-21 13:29:39 -07:00
Sandy Zhang
ed965bd140 Update python_tag select to include python limited_api
This is needed after python/dist:dist's limited_api_wheels was updated from 3.7->3.8 and was causing us to mislabel the python_tag for our 3.8 limited api wheels as the system python version of 3.7.

Also:
* Add LINT to prevent next time
* Clean up some documentation
PiperOrigin-RevId: 621915013
2024-04-04 11:20:37 -07:00
Protobuf Team Bot
d7f032ad15 Move private definitions out of //bazel
This is needed to make protobuf/bazel package minimal for other proto rules.

Keep 4 public bzl files in upb/bazel. They end up under protobuf/bazel, and they are legitimately used by other repositories.

Move upb_proto_library_internal/* under bazel/private. Those are utilities used in the rules. Moving them one level deeper makes protobuf/bazel package clean for other rules.

Move build_defs.bzl and amalgamation under /upb/bazel. Those are utilities used in the build.

Move lua.BUILD and python* uner /python/dist. Those are used in the WORKSPACE dependency setup.

PiperOrigin-RevId: 621442236
2024-04-03 01:37:51 -07:00
Protobuf Team Bot
83ec410d30 Internal change
PiperOrigin-RevId: 619377672
2024-03-27 05:50:55 -07:00
aiuto
3ab1276bbb Update Bazel references to rules_pkg to the supported file locations. (#15780)
WIP:  I want to see this pass CI first.

Fixes: #15779

3 scripted transforms:
```
  -load("@rules_pkg//:mappings.bzl", ...)
  +load("@rules_pkg//pkg:mappings.bzl", ...)
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_tar")
  +load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_zip")
  +load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
```

Closes #15780

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15780 from aiuto:rules_pkg a630276341
PiperOrigin-RevId: 606641398
2024-02-13 09:08:42 -08:00
Joshua Haberman
776d072fa1 Removed obsolete TODO.
PiperOrigin-RevId: 606317655
2024-02-12 11:48:35 -08:00
Eric Salo
8d0bfb0a5a upb: delete upb:upb, upb:collections, upb/upb.hpp, upb/collections/
PiperOrigin-RevId: 597923328
2024-01-12 12:44:04 -08:00
Adam Cozzette
5ca84008fc Move utf8_range into the protobuf repo
This makes third_party/utf8_range no longer a Git subtree, but instead the
permanent location and source of truth for utf8_range. It is also now
incorporated into the @com_google_protobuf Bazel repo. Utf8_range still has its
own separate CMake build for now, though.

PiperOrigin-RevId: 580682733
2023-11-08 15:43:35 -08:00
Adam Cozzette
24fef03259 Add support and partial CI coverage for Python 3.12
There's a test run in test_python.yml that is non-trivial to get working with
Python 3.12 due to some refactoring of our Docker images that would be needed.
But this change updates everything else to add coverage for Python 3.12.

The main changes necessary to get the builds working were to upgrade some Pip
packages via requirements.txt, including in a patch to `rules_fuzzing` that I
plan to upstream soon. I also had to take an explicit dependency on
`setuptools`.

I removed tox.ini, since it was outdated and we have not been actively
maintaining it.

PiperOrigin-RevId: 580548224
2023-11-08 08:53:27 -08:00
Eric Salo
8d67a40d30 upb: fix wheels build errors
PiperOrigin-RevId: 576925248
2023-10-26 10:59:04 -07:00
Adam Cozzette
8f831e973a Update Python versions to reflect that we now support 3.8 through 3.11
PiperOrigin-RevId: 569317472
2023-09-28 16:12:04 -07: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/dist/BUILD.bazel (Browse further)