Skip to content

Conversation

skshetry
Copy link
Contributor

The index fd is not closed, which makes it fail on Windows with PermissionError:

E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_commit_in_root_repo_with_0\\.git\\index'

and sometimes with not much information when using APIs that interact with git binary:

fatal: Unable to write new index file

Also see iterative/scmrepo#27 and conda-forge/gitpython-feedstock#62.

This regression was introduced on #1391 (specifically on d79d20d, and released on 3.1.25).

@Byron
Copy link
Member

Byron commented Jan 10, 2022

Thanks a lot for the fix. I thought that using try:finally might be even safer and implemented that in e16a004, which is why this PR has to be closed without merging.

A new release will be created within a couple of minutes.

@Byron Byron closed this Jan 10, 2022
@skshetry skshetry deleted the close-fd branch January 10, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants