ensure context `__exit__` is called during shell completion by akhil-vempali · Pull Request #2767 · pallets/click
The necessary modifications will ensure that the context's __exit__ function is called during shell completion, addressing the issue of unclosed file options.
fixes #2644
davidism
changed the title
[FIX] fixes #2644 https://github.com/pallets/click/issues/2644
ensure context __exit__ is called during shell completion
@akhil-vempali if you have some time available, we could hopefully get this into 8.2.0. If you do, could you make sure to:
- Fix the now broken tests.
- Add a test to prevent this from regressing.
This was referenced
Nov 2, 2024@akhil-vempali thank you for your work. I continued in #2800 and merged it. I added you as a co-author as you already did great work identifying where the issue was and almost fixed it as well. There was a confusion of context objects that I rectified and I added a test case so we can prevent a regression.
github-actions
bot
locked as resolved and limited conversation to collaborators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters