From 186c1ae12be1bb76087dd4fa53a1ac0979c8aa9f Mon Sep 17 00:00:00 2001 From: Patrick Hagemeister Date: Thu, 27 Jul 2023 06:24:20 +0000 Subject: [PATCH 1/2] Creating a lock now uses python built-in "open()" method to work around docker virtiofs issue --- git/util.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git/util.py b/git/util.py index 0ef8bdeb7..a3748f0fe 100644 --- a/git/util.py +++ b/git/util.py @@ -935,11 +935,7 @@ def _obtain_lock_or_raise(self) -> None: ) try: - flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL - if is_win: - flags |= os.O_SHORT_LIVED - fd = os.open(lock_file, flags, 0) - os.close(fd) + open(lock_file, mode='w', closefd=True) except OSError as e: raise IOError(str(e)) from e From 70924c4265c2d3629d978dd7bfc9ab1678d91e7d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 1 Sep 2023 08:11:22 +0200 Subject: [PATCH 2/2] Skip now permanently failing test with note on how to fix it --- test/test_repo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_repo.py b/test/test_repo.py index 5c66aeeb1..08ed13a00 100644 --- a/test/test_repo.py +++ b/test/test_repo.py @@ -13,7 +13,7 @@ import pickle import sys import tempfile -from unittest import mock, skipIf, SkipTest +from unittest import mock, skipIf, SkipTest, skip import pytest @@ -251,6 +251,7 @@ def test_clone_from_with_path_contains_unicode(self): self.fail("Raised UnicodeEncodeError") @with_rw_directory + @skip("the referenced repository was removed, and one needs to setup a new password controlled repo under the orgs control") def test_leaking_password_in_clone_logs(self, rw_dir): password = "fakepassword1234" try: