GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Retrofit `repo` class as context-man to cleanup global mman on repo-delete by ankostis · Pull Request #555 · gitpython-developers/GitPython

Conversation

@ankostis

@ankostis ankostis commented Dec 8, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:

  • Small pythonism on Fixes to support Python 2.6 again. #541, improves docstring of cmd._call_process().
  • Export gitpython.util.rmtree() for deleting repos in Windows where blobs are readonly.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Byron reacted with hooray emoji
All reactions
  • 🎉 1 reaction
ankostis added 4 commits December 8, 2016 14:29
@ankostis
fix(leaks): repo context-man to cleanup global mman on repo-delete
f1a82e4
Improve API for problems like gitpython-developers#553.
@ankostis
fix(leaks, TCs): attempt to cleanup mman before deleting tmp-dirs
bdb4c7c
@ankostis
feat(util): export rmtree() to facilitate del of tmp-repos on Windows
66306f1
Usecase described in gitpython-developers#553
@ankostis
style(cmd): pythonize cmd-args filtering for PY26, improve docstring
f858c44
Apply codereview comments of gitpython-developers#541.
@Byron Byron added the in progress label Dec 8, 2016
This was referenced Dec 8, 2016
GitPython repo.index.commit() spawns persistent git.exe instance, holds handles to repo #553
Closed
Fixes to support Python 2.6 again. #541
Merged
@codecov-io

codecov-io commented Dec 8, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Current coverage is 94.50% (diff: 92.00%)

No coverage report found for master at 0691441.

Powered by Codecov. Last update 0691441...f858c44

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Byron

Byron commented Dec 8, 2016

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Byron Byron modified the milestones: v2.1.1 - Bugfixes, v2.1.2 - Bugfixes Dec 8, 2016
@Byron

Byron commented Dec 8, 2016

Copy link
Copy Markdown
Member

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

nvie reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ankostis

ankostis commented Dec 8, 2016

Copy link
Copy Markdown
Contributor Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Byron

Byron commented Dec 9, 2016

Copy link
Copy Markdown
Member

Even though the implementation seems to be in place, it would certainly be nice to include an example in the test_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 :).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ankostis

ankostis commented Feb 5, 2017

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Byron
Byron merged commit 0181a40 into gitpython-developers:master Feb 25, 2017
@Byron Byron removed the in progress label Feb 25, 2017
@Byron

Byron commented Feb 25, 2017

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ankostis
ankostis deleted the cntxtmman branch June 18, 2018 15:45
EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request Dec 12, 2023
@EliahKagan
Extract all "import gc" to module level
d70ba69
The gc module was already imported at module scope in
git/repo/base.py, since f1a82e4 (gitpython-developers#555). Importing the top-level
git 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 at
module scope. Having them local decreased readability, in part
because of how black inserts a black line between them and
gc.collect() calls they are imported to allow.

An alternative to this change would be to remove the preexisting
top-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 that
would affect performance and, if so, whether the effect would be
good or bad, since the small delay of the import might potentially
be less desirable to an applicaion if it occurs while the work of
the 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 this
does not appear to have been the intent behind making the imports
local. More importantly, a local import should not be expected to
succeed, or the imported module usable, in such a situation.
This was referenced Dec 12, 2023
Extract all "import gc" to module level #1765
Merged
Replace xfail with gc.collect in TestSubmodule.test_rename #1767
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

v2.1.3 - Bugfixes

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ankostis @codecov-io @Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.