Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Retrofitrepo class as context-man to cleanup global mman on repo-delete#555

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 4 commits intogitpython-developers:masterfromankostis:cntxtmman
Feb 25, 2017

Conversation

ankostis
Copy link
Contributor

@ankostisankostis commentedDec 8, 2016
edited
Loading

Some changes for this release:
See#553 for difficulties when working on Windows, where open file-handles actually "lock" the underlying files, and repos cannot be deleted.

More changes:

Byron reacted with hooray emoji
@codecov-io
Copy link

codecov-io commentedDec 8, 2016
edited
Loading

Current coverage is 94.50% (diff: 92.00%)

No coverage report found formaster at0691441.

Powered byCodecov. Last update0691441...f858c44

@Byron
Copy link
Member

@ankostis Do you think I should wait till tomorrow until I cut the release to be able to include this one? Or would you prefer to just have this released separately at a later time?

@ByronByron modified the milestones:v2.1.1 - Bugfixes,v2.1.2 - BugfixesDec 8, 2016
@Byron
Copy link
Member

@nvie I just created a new release.
@ankostis I will follow this PR and make a release when needed. Thanks to theMakefile, that became easy and convenient (interestingly, I wasn't aware it existed anymore :)).

nvie reacted with thumbs up emoji

@ankostis
Copy link
ContributorAuthor

Sorry@Byron , I've just seen your message.

I'm not exactly sure what happened and you could not include my PR in 2.1.1.
I believe it ready to be merged.
is this right, or this PR relies on features from a different GitDB/smmap?

@Byron
Copy link
Member

Even though the implementation seems to be in place, it would certainly be nice to include an example in thetest_docs.py to show people how to use it. I for one wouldn't know myself actually, just because my experience with context managers is very limited.
Do you think you could add an example? I could then include it in the tutorial and write some prose around it :).

@ankostis
Copy link
ContributorAuthor

Apologies for not having the time,
but I really believe this little PR wroth to have it.

Too overloaded to fix the TCs in the next weeks :-(

@ByronByron merged commit0181a40 intogitpython-developers:masterFeb 25, 2017
@Byron
Copy link
Member

I think so too :)! Sorry for the incredible delays.

@ankostisankostis deleted the cntxtmman branchJune 18, 2018 15:45
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull requestDec 12, 2023
The gc module was already imported at module scope ingit/repo/base.py, sincef1a82e4 (gitpython-developers#555). Importing the top-levelgit module or any submodule of it runs that import statement.Because the gc module is already imported, reimporting it is fast.Imports that there is no specific reason to do locally should be atmodule scope. Having them local decreased readability, in partbecause of how black inserts a black line between them andgc.collect() calls they are imported to allow.An alternative to this change would be to remove the preexistingtop-level "import gc" (there is also another one in the test suite)and replace it with a local import as well. I am unsure if thatwould affect performance and, if so, whether the effect would begood or bad, since the small delay of the import might potentiallybe less desirable to an applicaion if it occurs while the work ofthe application is already in progress.If a gc.collect() call runs as a consequence of a finally block or__del__ method being called during interpreter shutdown, then in(very) rare cases the variable may have been set to None. But thisdoes not appear to have been the intent behind making the importslocal. More importantly, a local import should not be expected tosucceed, or the imported module usable, in such a situation.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
@ankostis@codecov-io@Byron

[8]ページ先頭

©2009-2025 Movatter.jp