FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

enable config parsers to be used as context managers by boidolr · Pull Request #388 · gitpython-developers/GitPython · GitHub

Repository navigation

enable config parsers to be used as context managers - #388

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

Byron merged 1 commit into
gitpython-developers:masterfrom
boidolr:config_as_context_manager

Conversation

boidolr commented Feb 20, 2016

Copy link
Copy Markdown
Contributor

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 merged commit fcca77a into gitpython-developers:master Feb 20, 2016

Byron commented Feb 20, 2016

Copy link
Copy Markdown
Member

Awesome, many thanks !

Byron added this to the v1.0.3 - Fixes milestone Feb 20, 2016
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
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


Back | FazBrowse Home | New Git URL