Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git merge smart_holder #30039

Merged
merged 5 commits into from
May 16, 2023
Merged

git merge smart_holder #30039

merged 5 commits into from
May 16, 2023

Conversation

rwgk
Copy link
Contributor

@rwgk rwgk commented May 16, 2023

Description

Helper/scratch PR for testing.

Suggested changelog entry:

tjstum and others added 5 commits May 9, 2023 07:04
`PyUnicode_DecodeLatin1` requires you to pass in the `error`
parameter. The code as it is in the docs didn't compile.

There is a reference leak in the example
code. `PyUnicode_DecodeLatin1` returns a new reference. Calling
`py::str(PyObject*)` calls `PyObject_Str`, which also returns a new
reference. That reference is managed by the `py::str`
constructor (which correctly steals the reference, using the
`stolen_t` constructor), but the original reference returned by
`PyUnicode_DecodeLatin1` is never decref'd: it never makes it into an
`object`, and it's never manually decremented.

This fixes both of those issues. The code compiles, and I viewed the
sphinx docs locally.
* set ci.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* set configure.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* set format.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* set pip.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* set upstream.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* set labeler.yml minimal permissions

Signed-off-by: Joyce <joycebrum@google.com>

* Update ci.yml to read all

Signed-off-by: Joyce <joycebrum@google.com>

* test labeler.yml

Signed-off-by: Joyce <joycebrum@google.com>

* restore the if at labeler.yml

Signed-off-by: Joyce <joycebrum@google.com>

---------

Signed-off-by: Joyce <joycebrum@google.com>
@google-cla
Copy link

google-cla bot commented May 16, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rwgk
Copy link
Contributor Author

rwgk commented May 16, 2023

This suggestion was also applied here:

pybind/pybind11#4665 (comment)

Settings -> Actions permissions -> Workflow permissions:

Checked "Read repository contents and packages permissions"

@rwgk
Copy link
Contributor Author

rwgk commented May 16, 2023

Ignoring 1 frequent flake (test_iostream):

CI / 🐍 3.7 • MSVC 2019 • x86 -DCMAKE_CXX_STANDARD=14 (pull_request) Failing after 9m

@rwgk rwgk marked this pull request as ready for review May 16, 2023 16:42
@rwgk rwgk merged commit dd4d10f into google:main May 16, 2023
@rwgk rwgk deleted the pywrapcc_merge_sh branch May 16, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants