X Tutup
Skip to content

enable config parsers to be used as context managers#388

Merged
Byron merged 1 commit intogitpython-developers:masterfrom
boidolr:config_as_context_manager
Feb 20, 2016
Merged

enable config parsers to be used as context managers#388
Byron merged 1 commit intogitpython-developers:masterfrom
boidolr:config_as_context_manager

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

X Tutup