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

Replace use of mktemp#56

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 1 commit intogitpython-developers:masterfromEliahKagan:no-mktemp
Dec 13, 2023

Conversation

EliahKagan
Copy link
Member

@EliahKaganEliahKagan commentedDec 13, 2023
edited
Loading

Fixes#41

This usesNamedTemporaryFile withdelete=False to replace the one use of the deprecatedmktemp function in smmap (reported in#41).

This avoids the race condition inherent tomktemp, as the file is named and created together in a way that is effectively atomic.

BecauseNamedTemporaryFile is not being used to automatically delete the file, it use and cleanup are unaffected by the change.

(This PR is conceptually related togitpython-developers/GitPython#1770.)

This uses NamedTemporaryFile with delete=False to replace the oneuse of the deprecated mktemp function in smmap (reported ingitpython-developers#41).This avoids the race condition inherent to mktemp, as the file isnamed and created together in a way that is effectively atomic.Because NamedTemporaryFile is not being used to automaticallydelete the file, it use and cleanup are unaffected by the change.
Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

EliahKagan reacted with thumbs up emoji
@ByronByron merged commit04dd210 intogitpython-developers:masterDec 13, 2023
@EliahKaganEliahKagan deleted the no-mktemp branchDecember 13, 2023 10:15
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ByronByronByron approved these changes

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Don't use mktemp
2 participants
@EliahKagan@Byron

[8]ページ先頭

©2009-2025 Movatter.jp