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 — Don't rely on __del__ by r-darwish · Pull Request #1606 · gitpython-developers/GitPython

Conversation

@r-darwish

@r-darwish r-darwish commented Jul 7, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
@r-darwish
Don't rely on __del__
8186159
Byron
Byron reviewed Jul 7, 2023
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, that's very valuable! Believe it or not, but when GitPython was written, del was still deterministic due to lack of GC. Good times.

Once a few questions are clarified, nothing should be in the way of merging this.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread git/index/util.py Resolved

Uh oh!

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

Comment thread git/index/base.py Outdated
index.entries # force it to read the file as we will delete the temp-file
del index_handler # release as soon as possible
with ExitStack() as stack:
if repo.git_dir:

@Byron Byron Jul 7, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why that was necessary - wouldn't git_dir always be set? Otherwise it wouldn't be usable, right?
If that check was unnecessary, I assume the ExitStack could be left out as well.

Sorry, something went wrong.

Uh oh!

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

All reactions

@r-darwish r-darwish Jul 7, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some refactoring here to remove the finally block

Sorry, something went wrong.

Uh oh!

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

All reactions
@r-darwish
fixes
a3859ee
@Byron Byron added this to the v3.1.32 - Bugfixes milestone Jul 7, 2023
@Byron
Byron merged commit c09a71e into gitpython-developers:main Jul 7, 2023
@Byron

Byron commented Jul 7, 2023

Copy link
Copy Markdown
Member

It looks like the ExitStack and context managers in general are the way around trying to rely in __del__. Thanks for all the improvements.

All reactions

Sorry, something went wrong.

Uh oh!

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

renovate Bot referenced this pull request in allenporter/flux-local Jul 12, 2023
@renovate
Update dependency GitPython to v3.1.32 (#274)
5fea2a9
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [GitPython](https://togithub.com/gitpython-developers/GitPython) |
`==3.1.31` -> `==3.1.32` |
[![age](https://badges.renovateapi.com/packages/pypi/GitPython/3.1.32/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/GitPython/3.1.32/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/GitPython/3.1.32/compatibility-slim/3.1.31)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/GitPython/3.1.32/confidence-slim/3.1.31)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>gitpython-developers/GitPython (GitPython)</summary>

###
[`v3.1.32`](https://togithub.com/gitpython-developers/GitPython/releases/tag/3.1.32):
- with another security update

[Compare
Source](https://togithub.com/gitpython-developers/GitPython/compare/3.1.31...3.1.32)

#### What's Changed

- Bump cygwin/cygwin-install-action from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/gitpython-developers/GitPython/pull/1572](https://togithub.com/gitpython-developers/GitPython/pull/1572)
- Fix up the commit trailers functionality by
[@&#8203;itsluketwist](https://togithub.com/itsluketwist) in
[https://github.com/gitpython-developers/GitPython/pull/1576](https://togithub.com/gitpython-developers/GitPython/pull/1576)
- Name top-level exceptions as private variables by
[@&#8203;Hawk777](https://togithub.com/Hawk777) in
[https://github.com/gitpython-developers/GitPython/pull/1590](https://togithub.com/gitpython-developers/GitPython/pull/1590)
- fix pypi long description by
[@&#8203;eUgEntOptIc44](https://togithub.com/eUgEntOptIc44) in
[https://github.com/gitpython-developers/GitPython/pull/1603](https://togithub.com/gitpython-developers/GitPython/pull/1603)
- Don't rely on **del** by
[@&#8203;r-darwish](https://togithub.com/r-darwish) in
[https://github.com/gitpython-developers/GitPython/pull/1606](https://togithub.com/gitpython-developers/GitPython/pull/1606)
- Block insecure non-multi options in clone/clone_from by
[@&#8203;Beuc](https://togithub.com/Beuc) in
[https://github.com/gitpython-developers/GitPython/pull/1609](https://togithub.com/gitpython-developers/GitPython/pull/1609)

#### New Contributors

- [@&#8203;Hawk777](https://togithub.com/Hawk777) made their first
contribution in
[https://github.com/gitpython-developers/GitPython/pull/1590](https://togithub.com/gitpython-developers/GitPython/pull/1590)
- [@&#8203;eUgEntOptIc44](https://togithub.com/eUgEntOptIc44) made their
first contribution in
[https://github.com/gitpython-developers/GitPython/pull/1603](https://togithub.com/gitpython-developers/GitPython/pull/1603)
- [@&#8203;r-darwish](https://togithub.com/r-darwish) made their first
contribution in
[https://github.com/gitpython-developers/GitPython/pull/1606](https://togithub.com/gitpython-developers/GitPython/pull/1606)
- [@&#8203;Beuc](https://togithub.com/Beuc) made their first
contribution in
[https://github.com/gitpython-developers/GitPython/pull/1609](https://togithub.com/gitpython-developers/GitPython/pull/1609)

**Full Changelog**:
gitpython-developers/GitPython@3.1.31...3.1.32

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
otc-zuul Bot pushed a commit to opentelekomcloud-infra/eyes_on_docs that referenced this pull request Aug 14, 2023
@dependabot
Bump gitpython from 3.1.31 to 3.1.32 (#22)
8412d52
Bump gitpython from 3.1.31 to 3.1.32

Bumps gitpython from 3.1.31 to 3.1.32.

Release notes
Sourced from gitpython's releases.

v3.1.32 - with another security update
What's Changed

Bump cygwin/cygwin-install-action from 3 to 4 by @​dependabot in gitpython-developers/GitPython#1572
Fix up the commit trailers functionality by @​itsluketwist in gitpython-developers/GitPython#1576
Name top-level exceptions as private variables by @​Hawk777 in gitpython-developers/GitPython#1590
fix pypi long description by @​eUgEntOptIc44 in gitpython-developers/GitPython#1603
Don't rely on del by @​r-darwish in gitpython-developers/GitPython#1606
Block insecure non-multi options in clone/clone_from by @​Beuc in gitpython-developers/GitPython#1609

New Contributors

@​Hawk777 made their first contribution in gitpython-developers/GitPython#1590
@​eUgEntOptIc44 made their first contribution in gitpython-developers/GitPython#1603
@​r-darwish made their first contribution in gitpython-developers/GitPython#1606
@​Beuc made their first contribution in gitpython-developers/GitPython#1609

Full Changelog: gitpython-developers/[email protected]



Commits

5d45ce2 prepare 3.1.32 release
ca965ec Merge pull request #1609 from Beuc/block-insecure-options-clone-non-multi
5c59e0d Block insecure non-multi options in clone/clone_from
c09a71e Merge pull request #1606 from r-darwish/no-del
a3859ee fixes
8186159 Don't rely on del
741edb5 Merge pull request #1603 from eUgEntOptIc44/eugenoptic44-fix-pypi-long-descri...
0c543cd Improve readability of README.md
9cd7ddb Improve the 'long_description' displayed on pypi
6fc11e6 update README to reflect the status quo on git command usage
Additional commits viewable in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.

Reviewed-by: Vladimir Vshivkov
@EliahKagan EliahKagan mentioned this pull request Dec 22, 2023
Suggested fixes by iCR, OpenRefactory, Inc. #1486
Closed
@renovate renovate Bot mentioned this pull request Mar 15, 2025
chore(deps): update dependency gitpython to v3.2.1 h3mmy/charts#16
Open
1 task
@mend-developer-platform-dev mend-developer-platform-dev Bot mentioned this pull request Apr 2, 2025
prefix_from_database Update dependency gitpython to v3.1.45 Nizar-MC-full/matchConf#39
Open
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Byron Byron Byron left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Milestone

v3.1.32 - Bugfixes

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@r-darwish @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 01402520 — 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.