jayceslesar commented on code in PR #3721:
URL: https://github.com/apache/iceberg-python/pull/3721#discussion_r3690349124


##########
pyiceberg/io/__init__.py:
##########
@@ -41,6 +42,17 @@
 
 logger = logging.getLogger(__name__)
 
+
+def _is_windows_drive_letter(scheme: str) -> bool:
+    r"""Check if a parsed URL scheme is actually a Windows drive letter.
+
+    On Windows, Python's urlparse treats paths like 'C:\\Users\\...' as having
+    scheme='c'. This detects that case so callers can route to the local 
filesystem.
+    Only returns True on Windows — no behavior change on other platforms.
+    """
+    return sys.platform == "win32" and len(scheme) == 1 and scheme.isalpha()

Review Comment:
   is it possible to replace 
   `sys.platform == "win32" and len(scheme) == 1 and scheme.isalpha()`
   
   with something around `os.path.splitdrive`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to