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

BUG: Fix small issues found with pytest-leaks #18671

Merged

Conversation

seberg
Copy link
Member

@seberg seberg commented Mar 23, 2021

Backport of gh-18670 (with two small differences)

None of these are particularly worrying as they either usually only
leak reference (and not memory) or appear in rare or almost impossible
error-paths, or are limited to the tests.

Unfortunately, this PR will not apply to 1.20.x, due to small changes
in the overrides.

None of these are particularly worrying as they either usually only
leak reference (and not memory) or appear in rare or almost impossible
error-paths, or are limited to the tests.

Unfortunately, this PR will not apply to 1.20.x, due to small changes
in the overrides.

Backport of numpygh-18670 (with two small differences)
@seberg seberg added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 23, 2021
"The `like` argument must be an array-like that "
"implements the `__array_function__` protocol.");
}
Py_DECREF(tmp_has_override);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the larger difference. The code path looks different on main. This is much like the diff just above.

@@ -2100,6 +2100,7 @@ array_fromstring(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *keywds
array_function_result = array_implement_c_array_function_creation(
"fromstring", args, keywds);
if (array_function_result != Py_NotImplemented) {
Py_XDECREF(descr);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had already fixed that in the larger argument parsing, so this was also not part of the initial PR.

@charris charris added this to the 1.20.2 release milestone Mar 23, 2021
@charris charris merged commit e687165 into numpy:maintenance/1.20.x Mar 24, 2021
@charris
Copy link
Member

charris commented Mar 24, 2021

Thanks Sebastian.

@seberg seberg deleted the backport-small-pytest-leaks-fixes branch March 24, 2021 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants