Skip to content
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

ensure context __exit__ is called during shell completion #2767

Closed
wants to merge 2 commits into from

Conversation

akhil-vempali
Copy link
Contributor

@akhil-vempali akhil-vempali commented Aug 21, 2024

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 davidism changed the title [FIX] fixes #2644 https://github.com/pallets/click/issues/2644 ensure context __exit__ is called during shell completion Aug 21, 2024
@AndreasBackx AndreasBackx mentioned this pull request Oct 26, 2024
7 tasks
@AndreasBackx AndreasBackx added this to the 8.1.8 milestone Oct 26, 2024
@AndreasBackx
Copy link
Collaborator

@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:

  1. Fix the now broken tests.
  2. Add a test to prevent this from regressing.

@AndreasBackx
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Click doesn't close file options during shell completion
2 participants