Use system boto and oauth2client libraries instead of vendored copies.
Remove the Python path modifications that prioritize bundled dependencies.
The mock S3 service used by unit tests is installed separately.
Ensure the Boto configuration section exists before disabling retries
in perfdiag, since system boto may not initialize this section.
--- ../gslib/__init__.py	2026-10-18 13:17:35.991677811 +0300
+++ ../gslib/__init__.py	2026-10-18 13:18:00.700737729 +0300
@@ -93,34 +93,6 @@
 USER_AGENT = ''
 
 
-def _AddVendoredDepsToPythonPath():
-  """Fix our Python path so that it correctly finds our vendored libraries."""
-  vendored_path = os.path.join(GSLIB_DIR, 'vendored')
-  # Similar structure to the THIRD_PARTY_LIBS list in gsutil.py:
-  vendored_lib_dirs = [
-      ('boto', ''),
-      ('oauth2client', ''),
-  ]
-
-  # Prepend our vendored libraries to be in the front of the Python path so that
-  # they're found before any system installations that might be present.
-  for libdir, subdir in vendored_lib_dirs:
-    sys.path.insert(0, os.path.join(vendored_path, libdir, subdir))
-
-  # This is the location of mock_storage_location module. Not every directory
-  # in this path has an __init__.py file, so we couldn't just run
-  # `from boto.tests.integration.s3 import mock_storage_service`.
-  #
-  # We add this to the end, rather than prepending it, so that if other
-  # modules in this directory have the same name as something in our library,
-  # we find our version first.
-  sys.path.append(
-      os.path.join(vendored_path, 'boto', 'tests', 'integration', 's3'))
-
-
-_AddVendoredDepsToPythonPath()
-
-
 def _GetFileContents(filename):
   """Tries to find the given filename on disk or via pkgutil.get_data.
 
--- ../gslib/commands/perfdiag.py	2026-10-18 16:34:57.962197610 +0300
+++ ../gslib/commands?perfdiag.py	2026-10-18 16:35:47.014234964 +0300
@@ -2277,6 +2277,8 @@
 
     # We turn off retries in the underlying boto library because the
     # _RunOperation function handles errors manually so it can count them.
+    if not boto.config.has_section('Boto'):
+      boto.config.add_section('Boto')
     boto.config.set('Boto', 'num_retries', '0')
 
     self.logger.info(
