Jie Luo
bd7a9df1eb
Change upb python to keep the meta class ref on message descriptor. Also add Garbage Collection on meta class and message descriptor.
...
PiperOrigin-RevId: 563136413
1 year ago
Joshua Haberman
56e9f2b4e4
Added malloc_trim() calls to Python allocator so RSS will decrease when memory is freed
...
This partially fixes https://github.com/protocolbuffers/protobuf/issues/10088 . The test case from that bug significantly improves with this change. However we still have a global map that does not shrink, which can still create the appearance of leaking memory, as it will not be freed until the module is unloaded.
PiperOrigin-RevId: 563124724
1 year ago
Protobuf Team Bot
0b2377927d
Adds Protobuf Editions for Schema Producers to the GitHub code repository.
...
PiperOrigin-RevId: 563110832
1 year ago
Protobuf Team Bot
ccbc80117c
Adds "Protobuf Editions Design: Features" to the GitHub code repository.
...
PiperOrigin-RevId: 563109674
1 year ago
Protobuf Team Bot
5e9a9a87bc
Use the TcParseFunction enum instead of strings when generating the table
...
instructions.
This avoids the string creation in the reflection case altogether, as well
as the map lookups.
PiperOrigin-RevId: 563108247
1 year ago
Protobuf Team Bot
7b77796f86
Adds "Protobuf Design: Options Attributes" to the GitHub code repository.
...
PiperOrigin-RevId: 563104277
1 year ago
Protobuf Team Bot
159306ba74
Auto-generate files after cl/563088162
1 year ago
Martijn Vels
1caa01b12a
Enable explicit constructors for internal implementation classes.
...
This changes the code to use explicit constructors instead of aggregate initialization, which allows optimizations when creating and copying messages.
PiperOrigin-RevId: 563088162
1 year ago
Richard Levasseur
131a7869c7
Internal change
...
PiperOrigin-RevId: 563086384
1 year ago
Protobuf Team Bot
18baa3c05a
Adds "Editions: Life of a FeatureSet" to the GitHub code repository.
...
PiperOrigin-RevId: 563082121
1 year ago
Protobuf Team Bot
17e934bb28
Adds "Edition Naming" to the GitHub code repository.
...
PiperOrigin-RevId: 563077292
1 year ago
Adrian Sadłocha
8c08df5a84
Implement mutators for singular primitive fields without presence
...
PiperOrigin-RevId: 563043919
1 year ago
Protobuf Team Bot
dcc1f61973
Auto-generate files after cl/562889855
1 year ago
Eric Salo
3be9a6ca12
upb: Remove the mirrored definitions in upb_MapEntry and upb_MessageInternal
...
Create message/internal/types.h as a new leaf header
Move map_entry.h from message/internal/ to collections/internal/ where it belongs
PiperOrigin-RevId: 562889855
1 year ago
Protobuf Team Bot
ad88453480
Auto-generate files after cl/562830310
1 year ago
Protobuf Team Bot
cd4b6ea830
Fix comment on upb_JsonEncode.
...
PiperOrigin-RevId: 562830310
1 year ago
Protobuf Team Bot
d6c1170096
Auto-generate files after cl/562810187
1 year ago
Chris Kennelly
5df5d77f5b
Add restrict on unsafe swap methods.
...
These have preconditions around not self-swapping, so restrict is safe here.
Comparison of generated code for methods used by message_unittest,
vectorization improves.
PiperOrigin-RevId: 562810187
1 year ago
Protobuf Team Bot
f75a800be0
Change SkipRestOfBlock to be iterative instead of recursive to avoid stack
...
overflows on invalid input with many unbalanced `{` characters.
PiperOrigin-RevId: 562806350
1 year ago
Protobuf Team Bot
91114633bb
Do not expose mutable methods in the CProxy.
...
PiperOrigin-RevId: 562800851
1 year ago
Protobuf Team Bot
f7d6dd15b2
Delete dead Message::GetInvariantPerBuild
...
This is a protected member function and not part of the public interface.
PiperOrigin-RevId: 562774514
1 year ago
Protobuf Team Bot
8bcc8ccaca
Escape trigraphs when emitting string literals.
...
The EscapeTrigraphs function is copied from Google Protobuf.
PiperOrigin-RevId: 562774473
1 year ago
Protobuf Team Bot
f42ad1eaaf
Internal Code Change
...
PiperOrigin-RevId: 562769083
1 year ago
Thibaut Cuvelier
8f1c050c2a
Update the link for the Julia implementation ( #13707 )
...
https://github.com/tanmaykm/ProtoBuf.jl now redirects to the JuliaIO organisation.
Closes #13707
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13707 from dourouc05:patch-1 a1d8ce6053
PiperOrigin-RevId: 562112768
1 year ago
Mike Kruskal
3e3c83f0ca
Clarify staleness tests
...
- They will now output the regen command on failure
- On fork presubmits, they won't be named by branch
PiperOrigin-RevId: 562068279
1 year ago
Jie Luo
3e966f1dc9
Add lock to pure python's field decoders
...
Fix data race that may increase flake rate of some tests.
PiperOrigin-RevId: 562044867
1 year ago
Martijn Vels
e052928c94
Add dependency on absl::layout, and explicitly include absl layout includes
...
This header was transitively included from (deprecated) absl cord includes.
PiperOrigin-RevId: 562008066
1 year ago
Protobuf Team Bot
fa98bb316a
Auto-generate files after cl/561993644
1 year ago
Mike Kruskal
d0e8969166
Editions: Introduce an Edition enum and setup migration from strings
...
PiperOrigin-RevId: 561993644
1 year ago
Cong Liu
0a7a73d757
Remove redundant option: profile_driven_inline_string.
...
PiperOrigin-RevId: 561976278
1 year ago
Protobuf Team Bot
cb8da95e91
Fix SetExtension value semantics.
...
Move SetExtension common code out of header to protos.cc.
PiperOrigin-RevId: 561829364
1 year ago
Protobuf Team Bot
12d4f418a7
Comparing a proto message with an object of unknown returns NotImplemented
...
The Python comparison protocol requires that if an object doesn't know how to
compare itself to an object of a different type, it returns NotImplemented
rather than False. The interpreter will then try performing the comparison using
the other operand. This translates, for protos, to:
If a proto message doesn't know how to compare itself to an object of
non-message type, it returns NotImplemented. This way, the interpreter will then
try performing the comparison using the comparison methods of the other object,
which may know how to compare itself to a message. If not, then Python will
return the combined result (e.g., if both objects don't know how to perform
__eq__, then the equality operator `==` return false).
This change allows one to compare a proto with custom matchers such as mock.ANY
that the message doesn't know how to compare to, regardless of whether
mock.ANY is on the right-hand side or left-hand side of the equality (prior to
this change, it only worked with mock.ANY on the left-hand side).
Fixes https://github.com/protocolbuffers/protobuf/issues/9173
PiperOrigin-RevId: 561728156
1 year ago
Mike Kruskal
14222b30f7
Fix permissions of janitor GHA
...
PiperOrigin-RevId: 561707787
1 year ago
Hong Shin
fcebbd1442
Squelch snake case warnings for modules
...
PiperOrigin-RevId: 561697301
1 year ago
Protobuf Team Bot
9d75ac6145
Address -Wint-conversion issues.
...
PiperOrigin-RevId: 561684898
1 year ago
Protobuf Team Bot
0522054f3e
Workaround ICE on gcc 7.5 by not having one overload call the other one with a
...
const_cast.
Fixes https://github.com/protocolbuffers/protobuf/issues/13715
PiperOrigin-RevId: 561660761
1 year ago
Michael Diamond
a7eee92b66
Update reference to missing function JsonStringToBinary() ( #13581 )
...
Also tweaked the "simple wrapper" language since the implementation does not appear to delegate to JsonToBinaryStream() directly.
Closes #13581
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13581 from dimo414:dimo414-patch-1 7522ae1673
PiperOrigin-RevId: 561610218
1 year ago
Protobuf Team Bot
a773618181
Internal Code Change
...
PiperOrigin-RevId: 561592059
1 year ago
Protobuf Team Bot
32b20e596d
Auto-generate files after cl/561528198
1 year ago
Mike Kruskal
0cf3b66eac
Silence warnings about extra semicolon in non-TSAN builds.
...
Fixes https://github.com/protocolbuffers/protobuf/issues/13787
PiperOrigin-RevId: 561528198
1 year ago
Mike Kruskal
4d5ab7324e
Create a reflection helper for ExtensionIdentifier.
...
This will allow easy access to the FieldDescriptor of a generated extension.
PiperOrigin-RevId: 561480962
1 year ago
Jie Luo
9c76ea4413
Add upb python Py_mp_subscript for descriptor sequences.
...
A behavior diff that between upb and the other two implementations.
PiperOrigin-RevId: 561471616
1 year ago
Mike Kruskal
e897bcf3ff
Editions: Provide an API for C++ generators to specify their features.
...
This works for both built-in generators and plugins written in C++. Any feature extensions specified by this virtual method will end up fully resolved in the descriptors.
PiperOrigin-RevId: 561446773
1 year ago
Protobuf Team Bot
a3dfe32eeb
Set top and job level permissions for janitor.yml
...
It seems that the janitor.yml workflow only needs pull-requests: write permission -- to close the PRs. I've also granted the contents: read just in case.
PiperOrigin-RevId: 561444486
1 year ago
Protobuf Team Bot
403a32d0ab
Auto-generate files after cl/561422951
1 year ago
Alyssa Haroldsen
614e29f946
Implement v0.6 string fields
...
This is predominantly a wrapper around `BytesMut`, for simplicity.
Bytes and string fields are mostly the same, except for possible UTF-8 handling.
This also implements some minor parts of `ProtoStr` that were missed.
PiperOrigin-RevId: 561422951
1 year ago
Mike Kruskal
395bfe1d55
Cleanup Bazel/Bash CI commands
...
PiperOrigin-RevId: 561422532
1 year ago
dependabot[bot]
fa57b05755
Bump actions/setup-python from 4.5.0 to 4.7.0 ( #13766 )
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 4.5.0 to 4.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-python/releases ">actions/setup-python's releases</a>.</em></p>
<blockquote>
<h2>v4.7.0</h2>
<p>In scope of this release, the support for reading python version from pyproject.toml was added (<a href="https://redirect.github.com/actions/setup-python/pull/669 ">actions/setup-python#669</a>).</p>
<pre lang="yaml"><code> - name: Setup Python
uses: actions/setup-python@v4
with:
python-version-file: pyproject.toml
</code></pre>
<h3>Besides, it includes such changes as:</h3>
<ul>
<li>Bump tough-cookie and <code>@azure/ms-rest-js</code> by <a href="https://github.com/dependabot "><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/697 ">actions/setup-python#697</a></li>
<li>Bump semver from 7.3.8 to 7.5.2 by <a href="https://github.com/dependabot "><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/692 ">actions/setup-python#692</a></li>
<li>Fix typos found by codespell by <a href="https://github.com/DimitriPapadopoulos "><code>@DimitriPapadopoulos</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/650 ">actions/setup-python#650</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/dariocurr "><code>@dariocurr</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/669 ">actions/setup-python#669</a></li>
<li><a href="https://github.com/DimitriPapadopoulos "><code>@DimitriPapadopoulos</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/650 ">actions/setup-python#650</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.7.0 ">https://github.com/actions/setup-python/compare/v4...v4.7.0 </a></p>
<h2>v4.6.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix <code>allow-prereleases</code> sample configuration by <a href="https://github.com/mayeut "><code>@mayeut</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/615 ">actions/setup-python#615</a></li>
<li>Fix a incorrect link advanced-usage.md by <a href="https://github.com/siyuan0322 "><code>@siyuan0322</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/657 ">actions/setup-python#657</a></li>
<li>Remove implicit dependency by <a href="https://github.com/nikolai-laevskii "><code>@nikolai-laevskii</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/668 ">actions/setup-python#668</a></li>
<li>Automatic update of configuration files from 05/23/2023 by <a href="https://github.com/github-actions "><code>@github-actions</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/671 ">actions/setup-python#671</a></li>
<li>Add warning for python 2.7 on release/v4 by <a href="https://github.com/dmitry-shibanov "><code>@dmitry-shibanov</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/673 ">actions/setup-python#673</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/siyuan0322 "><code>@siyuan0322</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/657 ">actions/setup-python#657</a></li>
<li><a href="https://github.com/nikolai-laevskii "><code>@nikolai-laevskii</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/668 ">actions/setup-python#668</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.6.1 ">https://github.com/actions/setup-python/compare/v4...v4.6.1 </a></p>
<h2>Add allow-prereleases input</h2>
<p>In scope of this release we added a new input (<code>allow-prereleases</code>) to allow <a href="https://redirect.github.com/actions/setup-python/pull/414 ">falling back to pre-release versions of Python when a matching GA version of Python is not available</a></p>
<pre lang="yaml"><code>steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.12
allow-prereleases: true
</code></pre>
<p>Besides, we added such changes as:</p>
<ul>
<li>Fix bug to trim new line for PyPy version: <a href="https://redirect.github.com/actions/setup-python/pull/610 ">actions/setup-python#610</a></li>
<li>Added pip dependency file to generate hash from it: <a href="https://redirect.github.com/actions/setup-python/pull/604 ">actions/setup-python#604</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="61a6322f88
"><code>61a6322</code></a> Fix typos found by codespell (<a href="https://redirect.github.com/actions/setup-python/issues/650 ">#650</a>)</li>
<li><a href="ea5b57fccc
"><code>ea5b57f</code></a> Bump semver from 7.3.8 to 7.5.2 (<a href="https://redirect.github.com/actions/setup-python/issues/692 ">#692</a>)</li>
<li><a href="014d32a830
"><code>014d32a</code></a> Bump tough-cookie and <code>@azure/ms-rest-js</code> (<a href="https://redirect.github.com/actions/setup-python/issues/697 ">#697</a>)</li>
<li><a href="c16c4b8d18
"><code>c16c4b8</code></a> Fix pipenv jobs (<a href="https://redirect.github.com/actions/setup-python/issues/699 ">#699</a>)</li>
<li><a href="0d5da6a89a
"><code>0d5da6a</code></a> Read python version from pyproject.toml (fix <a href="https://redirect.github.com/actions/setup-python/issues/542 ">#542</a>) (<a href="https://redirect.github.com/actions/setup-python/issues/669 ">#669</a>)</li>
<li><a href="3f824b7ca6
"><code>3f824b7</code></a> remove python 2.7 from the tests (<a href="https://redirect.github.com/actions/setup-python/issues/687 ">#687</a>)</li>
<li><a href="bd6b4b6205
"><code>bd6b4b6</code></a> Add warning for python 2.7 (<a href="https://redirect.github.com/actions/setup-python/issues/673 ">#673</a>)</li>
<li><a href="0cbcb9a3d7
"><code>0cbcb9a</code></a> Merge pull request <a href="https://redirect.github.com/actions/setup-python/issues/668 ">#668</a> from akv-platform/disallow-implicit-dependencies</li>
<li><a href="669664dac1
"><code>669664d</code></a> Merge branch 'tool-config-auto-update' into disallow-implicit-dependencies</li>
<li><a href="9cbf792a3c
"><code>9cbf792</code></a> Update configuration files</li>
<li>Additional commits viewable in <a href="d27e3f3d7c...61a6322f88
">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=4.5.0&new-version=4.7.0 )](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Closes #13766
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13766 from protocolbuffers:dependabot/github_actions/actions/setup-python-4.7.0 5e427982474c6dfb5304e50662f45d585acad73d
PiperOrigin-RevId: 561416587
1 year ago
Mike Kruskal
32eccf0b21
Delete obsolete code that searches the pool for "proto2.FeatureSet".
...
Feature resolution has been refactored in a way that made this dead code.
PiperOrigin-RevId: 561410946
1 year ago
Protobuf Team Bot
de59ed8541
Fix SetExtension to fuse the right arenas.
...
Also, make sure the operation has no side effects if the arenas can't be fused.
PiperOrigin-RevId: 561378595
1 year ago