Let's say I have a program that makes a class that...
# general
Let's say I have a program that makes a class that can be used as a context manager. And I want to run that like
Copy code
with MyClass():
   while True:
When I run this, I see
called, but if I Ctrl+C, I never see
called. This only happens with Pants. If I run my program as
python my_prog.py
, then I see
successfully called. Is there any way to recover this behavior? It makes sense to me why this is happening, but I'd really like to make sure I can gracefully shut down things.
Which Pants version is this? It should be fixed in 2.11.x (see https://github.com/pantsbuild/pants/issues/13230)
Where would I find a timeline for a stable release date?
I'm hesitant to bump that far up just to incorporate this fix
See https://www.pantsbuild.org/docs/release-strategy for the release strategy. We're about 2 weeks out from the first rc I think, although it's plausible we bump it a week so that we have time to get Pex lockfiles enabled in Pants 2.11 so that we can call the lockfile rewrite project done. Once an rc is out, it usually is 1-3 weeks to stabilize. Note though that we're willing to cherry-pick the PR into 2.10 if users ask for it. So if you could try out the fix using the latest 2.11 release and see that it fixes things, we can cherry-pick 🙂
Where would I ask for the backport? I would consider this a bug since it's not running the python scripts properly without the proper clean up.
I guess here 🙂