GH-45129: [Python][C++] Fix usage of deprecated C++ functionality on pyarrow#45189
GH-45129: [Python][C++] Fix usage of deprecated C++ functionality on pyarrow#45189raulcd merged 4 commits intoapache:mainfrom
Conversation
|
|
|
@github-actions crossbow submit -g python |
|
Revision: c1deb19cdb624e1f5e8363fc73c6afe28529270f Submitted crossbow builds: ursacomputing/crossbow @ actions-d40040ac1a |
|
The cython2 failure is related: the following patch would work but I don't think this should be the fix, as I am pretty sure diff --git a/python/pyarrow/src/arrow/python/common.h b/python/pyarrow/src/arrow/python/common.h
index 4a7886695e..30acf0d6ed 100644
--- a/python/pyarrow/src/arrow/python/common.h
+++ b/python/pyarrow/src/arrow/python/common.h
@@ -260,7 +260,7 @@ class SmartPtrNoGIL : public SmartPtr<Ts...> {
template <typename V>
SmartPtrNoGIL& operator=(V&& v) {
auto release_guard = optional_gil_release();
- Base::operator=(std::forward<V>(v));
+ Base::operator=(std::move(v));
return *this;
} |
|
@github-actions crossbow submit test-conda-python-3.10-cython2 |
|
Revision: 07f7acdb3c41b8299ebe2903c39ab6c3c562faed Submitted crossbow builds: ursacomputing/crossbow @ actions-3db166d478
|
|
@github-actions crossbow submit -g python |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit -g python |
|
Revision: babbe9fa049f5fcc1144f45150cae737aa8425bf Submitted crossbow builds: ursacomputing/crossbow @ actions-f876b9ef9d |
|
@github-actions crossbow submit test-conda-python-3.10-cython2 |
|
Revision: f292cc101be901b98b0d9357db5b564efee76de7 Submitted crossbow builds: ursacomputing/crossbow @ actions-58dca82b3c
|
|
Ok, so the shared_ptr version works but not the unique_ptr one? In this case, we can keep using the shared_ptr approach. |
|
By the way, why do we want to support Cython 2? @jorisvandenbossche |
|
I would say we can drop the cython 2 support. |
I created an issue to track that as it is not the first time we say the same. I'll do and then I'll rebase this one. I'll ping to merge once CI is green again. |
…mentation of SmartPtrNoGIL operator
|
@github-actions crossbow submit -g python |
|
Revision: 0a1d214 Submitted crossbow builds: ursacomputing/crossbow @ actions-74244302df |
|
CI failures are unrelated, they are failing on main and I've opened individual issues to track them. @pitrou I've rebased after the required cython bump. This should be ready to review/merge now that there's no CI failure. |
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 984519d. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
We are using two C++ deprecated APIs:
What changes are included in this PR?
Update code to use non deprecated functions.
Are these changes tested?
Yes via CI with existing tests.
Are there any user-facing changes?
No