kevinjqliu commented on code in PR #1578:
URL: https://github.com/apache/iceberg-python/pull/1578#discussion_r1929821411


##########
pyiceberg/io/__init__.py:
##########
@@ -316,7 +316,7 @@ def _import_file_io(io_impl: str, properties: Properties) 
-> Optional[FileIO]:
         class_ = getattr(module, class_name)
         return class_(properties)
     except ModuleNotFoundError:
-        logger.warning("Could not initialize FileIO: %s", io_impl)

Review Comment:
   nit: what about something like this
   
   
https://github.com/apache/iceberg-python/blob/1e011014cc4d66e12f8d77ce75f9609de9513913/pyiceberg/catalog/__init__.py#L287-L288



##########
tests/io/test_io.py:
##########
@@ -281,6 +282,11 @@ def test_import_file_io_does_not_exist() -> None:
     assert _import_file_io("pyiceberg.does.not.exist.FileIO", {}) is None
 
 
+def test_import_file_io_logs_exception(caplog: Any) -> None:
+    _import_file_io("pyiceberg.does.not.exist.FileIO", {})
+    assert "ModuleNotFoundError: No module named 'pyiceberg.does'" in 
caplog.text

Review Comment:
   does the error just return `pyiceberg.does` or the entire import, 
`pyiceberg.does.not.exist.FileIO`



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to