-
Notifications
You must be signed in to change notification settings - Fork 10
pytypes: Resurrect via leak instead of un-finalize in Python 3.8 #39
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
pytypes: Resurrect via leak instead of un-finalize in Python 3.8 #39
Conversation
3b721c7
to
9353788
Compare
9353788
to
44cb156
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+@jwnimmer-tri for review, please.
\cc @jamiesnape
Reviewable status: 0 of 5 files reviewed, all discussions resolved (waiting on @jwnimmer-tri)
Hmm. Who was the original reviewer for the |
Hm... lemme check. |
@m-chaturvedi was on PR #2. Jeremy, are you up for reviewing these changes? (they're relatively limited in scope, and is at least a fix for now.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have absolutely now idea how unique_ptr & shared_ptr & GC works in pybind11. At best you'll get a rubber stamp from me, but at this point with macOS on fire perhaps that's the best path forward anyway. It would help if someone who knew how GC worked reviewed the pytypes.h fix post-merge.
sign my life away, as our friend says.
Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @EricCousineau-TRI)
a discussion (no related file):
nit It seems bad that we don't have bionic CI, since we only support bionic in Drake? Open a tracking issue?
include/pybind11/pytypes.h, line 1485 at r1 (raw file):
_PyGC_SET_FINALIZED(patient_.ptr(), 0); } #endif // PY_VERSION_HEX >= 0x03080000
nit Technically, this endif is still closing the 3.0.0 check, not the 3.8.0 one, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @EricCousineau-TRI and @jwnimmer-tri)
a discussion (no related file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
nit It seems bad that we don't have bionic CI, since we only support bionic in Drake? Open a tracking issue?
You can assign it to me. At this stage of the fork, we can probably nuke a lot of the testing that we do not care about anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jamiesnape and @jwnimmer-tri)
a discussion (no related file):
Previously, jamiesnape (Jamie Snape) wrote…
You can assign it to me. At this stage of the fork, we can probably nuke a lot of the testing that we do not care about anyway.
I don't really want to nuke any of the testing from upstream that doesn't prove to be an issue. It's nice to have a (low cost) closer connection to upstream so that merges can focus on the main meat of the updates, and just take whatever CI changes.
I also don't see a huge value gain in testing Bionic in just this fork without submitting an upstream patch.
If we do an upstream patch, then I'm all for it. Also, I have not yet seen any drawbacks from not testing Bionic locally, as the Drake testing itself solves that issue.
(CI patches tend to have a slightly higher response rate.)
That being said, once there's a non-trivial cost (e.g. Py2.7 testing breaks, we see a concrete issue in not having Bionic), then sure, I'm all for ditching.
include/pybind11/pytypes.h, line 1485 at r1 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
nit Technically, this endif is still closing the 3.0.0 check, not the 3.8.0 one, I think?
Er, I dunno how we decorate #if #elif #endif
... Will check GSG to see if there is explicit guidance, or see what other examples there are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woot, thanks!
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jamiesnape and @jwnimmer-tri)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jamiesnape and @jwnimmer-tri)
a discussion (no related file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
I don't really want to nuke any of the testing from upstream that doesn't prove to be an issue. It's nice to have a (low cost) closer connection to upstream so that merges can focus on the main meat of the updates, and just take whatever CI changes.
I also don't see a huge value gain in testing Bionic in just this fork without submitting an upstream patch.
If we do an upstream patch, then I'm all for it. Also, I have not yet seen any drawbacks from not testing Bionic locally, as the Drake testing itself solves that issue.
(CI patches tend to have a slightly higher response rate.)That being said, once there's a non-trivial cost (e.g. Py2.7 testing breaks, we see a concrete issue in not having Bionic), then sure, I'm all for ditching.
(Will still make Drake issue, though!)
include/pybind11/pytypes.h, line 1485 at r1 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
Er, I dunno how we decorate
#if #elif #endif
... Will check GSG to see if there is explicit guidance, or see what other examples there are.
OK There is no explicit guidance in our fork of GSG, upstream GSG, nor implicit guidance in the pybind11 upstream code or Drake source code for how to decorate #if #elif #endif
. For now, will leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
a discussion (no related file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
(Will still make Drake issue, though!)
OK Filed issue: RobotLocomotion/drake#13034
CI check is not indicated as complete due to duplicate Travis CI trigger: However, both of those links are to the same build, and it passed: Merging. |
See: RobotLocomotion/drake#13026
Relates to the Drake 3.7 -> 3.8 transition from RobotLocomotion/drake#13097.
Requires:
This change is