This is an automated email from the ASF dual-hosted git repository.

micafer pushed a commit to branch fix/local-range-streaming
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 270fc546bb10b7b8c49ca8518bf16aca9d43938d
Merge: 53a5c19f0 18b924886
Author: Miguel Caballer <[email protected]>
AuthorDate: Mon Nov 9 08:57:21 2026 +0100

    Merge trunk

 .github/workflows/codeql-analysis.yml              |   6 +-
 .github/workflows/integration-tests.yml            |   2 +-
 .github/workflows/main.yml                         |  25 +-
 .github/workflows/publish_dev_artifact.yml         |   2 +-
 .github/workflows/publish_pricing_to_s3.yml        |   2 +-
 .readthedocs.yml                                   |   5 +-
 CHANGES.rst                                        |  45 ++-
 docs/conf.py                                       |  12 -
 docs/development.rst                               |  10 +
 docs/dns/drivers/rcodezero.rst                     |   2 +-
 .../examples/compute/create_ec2_node_custom_ami.py |   2 +-
 integration/storage/test_azure_blobs.py            |  11 +-
 integration/storage/test_minio.py                  |   4 +-
 libcloud/backup/drivers/gce.py                     |   2 +-
 libcloud/compute/drivers/dimensiondata.py          |  16 +-
 libcloud/compute/drivers/ec2.py                    |  24 +-
 libcloud/compute/drivers/gce.py                    |  36 ++-
 libcloud/compute/drivers/nttcis.py                 |  15 +-
 libcloud/container/drivers/gke.py                  |   2 +-
 libcloud/dns/drivers/route53.py                    |  92 +++++-
 libcloud/storage/base.py                           |   2 +-
 libcloud/storage/drivers/local.py                  |  20 +-
 libcloud/test/compute/test_ec2.py                  |  28 ++
 libcloud/test/compute/test_gce.py                  |  43 +++
 libcloud/test/dns/test_route53.py                  | 182 ++++++++++++
 libcloud/test/storage/test_base.py                 |  18 ++
 libcloud/test/storage/test_local.py                |  65 +++-
 pyproject.toml                                     |  15 +-
 tox.ini                                            |   9 +
 uv.lock                                            | 330 +++++++++++++--------
 30 files changed, 804 insertions(+), 223 deletions(-)

diff --cc CHANGES.rst
index c897d85a3,1f52147c9..cc4230fd5
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@@ -76,11 -89,27 +89,32 @@@ Comput
  Storage
  ~~~~~~~
  
 +- [Local] Stream range downloads in bounded chunks without reading the entire
 +  source file or buffering the complete range before writing it to disk.
 +  (GITHUB-2191)
 +  [Neha Mahesh - @mneha05]
 +
+ - [Local Storage] Fix upload errors being suppressed when locking is disabled
+   with ``ex_use_locking=False``. The original exception now propagates instead
+   of the upload appearing to succeed.
+   (#2204)
+   [@JunaidAhamed-7777]
+ 
+ - [Local Storage] Release the thread lock if IPC lock acquisition fails,
+   allowing the same lock object to be reused after a timeout or error.
+   (#2203)
+ 
+ - [Local Storage] Prevent source objects from being deleted when
+   ``download_object`` is called with a destination that resolves
+   to the source file.
+   (#2201)
+   [Zhe Chen - @zhechen-cs]
+ 
+ - [Storage] Prevent path traversal when downloading objects to a directory by
+   using only the object name's basename as the local filename.
+   (#2206)
+   [Miguel Caballer - @micafer]
+ 
  - [Azure Blobs] Fix SAS signatures for percent-encoded object paths by using
    the decoded path in the canonicalized resource while preserving the encoded
    path in the returned URL.
diff --cc libcloud/test/storage/test_local.py
index 2121c1fb5,c0b7a64c8..1bd5db7a4
--- a/libcloud/test/storage/test_local.py
+++ b/libcloud/test/storage/test_local.py
@@@ -22,7 -22,7 +22,7 @@@ import platfor
  import tempfile
  import unittest
  import multiprocessing
- from unittest import mock
 -from unittest.mock import patch
++import mock
  
  from libcloud.utils.files import exhaust_iterator
  from libcloud.common.types import LibcloudError
@@@ -140,6 -140,22 +140,22 @@@ class LocalTests(unittest.TestCase)
          self.assertEqual(bool(success_1.value), True, "Check didn't pass")
          self.assertEqual(bool(success_2.value), True, "Second check didn't 
pass")
  
+     def test_lock_local_storage_releases_thread_lock_on_ipc_failure(self):
+         for error in (None, OSError("lock unavailable"), KeyboardInterrupt()):
+             with self.subTest(error=error):
+                 lock = LockLocalStorage(os.path.join(self.key, "lock-retry"))
+                 first_result = False if error is None else error
 -                with patch.object(lock.ipc_lock, "acquire", 
side_effect=[first_result, True]):
++                with mock.patch.object(lock.ipc_lock, "acquire", 
side_effect=[first_result, True]):
+                     expected_error = LibcloudError if error is None else 
type(error)
+                     with self.assertRaises(expected_error) as exc:
+                         lock.__enter__()
+                     if error is not None:
+                         self.assertIs(exc.exception, error)
+                     self.assertFalse(lock.thread_lock.locked())
+                     with lock:
+                         self.assertTrue(lock.thread_lock.locked())
+                     self.assertFalse(lock.thread_lock.locked())
+ 
      def test_list_containers_empty(self):
          containers = self.driver.list_containers()
          self.assertEqual(len(containers), 0)

Reply via email to