Skip to content

enable config parsers to be used as context managers #388

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

Merged
merged 1 commit into from
Feb 20, 2016
Merged

enable config parsers to be used as context managers #388

merged 1 commit into from
Feb 20, 2016

Conversation

boidolr
Copy link
Contributor

@boidolr boidolr commented Feb 20, 2016

If used as context managers, the parsers will automatically release their file locks. This was mentioned in #333 and seems like a good thing to have, as you can't forget to call release that way.
Another nice thing might be to use __enter__ to re-acquire locks if necessary, so that the readers can be used in multiple contexts.

if used as context managers, the parsers will automatically release their file locks.
Byron added a commit that referenced this pull request Feb 20, 2016
feat(config-parsers): enable config parsers to be used as context managers
@Byron Byron merged commit fcca77a into gitpython-developers:master Feb 20, 2016
@Byron
Copy link
Member

Byron commented Feb 20, 2016

Awesome, many thanks !

@Byron Byron added this to the v1.0.3 - Fixes milestone Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants