[Mlir-commits] [mlir] [MLIR:Python] Fix race on PyOperations. (PR #139721)
Maksim Levental
llvmlistbot at llvm.org
Tue May 13 11:36:17 PDT 2025
makslevental wrote:
> a) The nanobind authors agrees to add it as a nanobind API. We upgrade to that version of nanobind and life is good. This may force us to wait until the next release, even if approved.
I've had poor luck prior getting something across the private->public line in [nanobind before](https://github.com/wjakob/nanobind/pull/836). No grudge against that guy (his baby, his rules) but I wouldn't be surprised if he just says no :shrug: so let's strike this option.
c) send a PR adding `PyUnstable_TryIncRef` to `pythoncapi-compat`, which is a project that exists for this purpose, add it as an MLIR:Python build dependency, and then just write `PyUnstable_TryIncRef` in this code.
`pythoncapi-compat` is a good project but I think it's overkill for just this usecase (though maybe we have other lurking? don't remember).
> b) copy-paste, as this PR does now
Door #3 it is then!
https://github.com/llvm/llvm-project/pull/139721
More information about the Mlir-commits
mailing list