ndrluis opened a new issue, #497:
URL: https://github.com/apache/iceberg-python/issues/497

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   When we import any functions that reside in `__init__.py`, it triggers the 
execution of the code instead of merely importing it. We must relocate the 
functions to a different file and manage the imports in `__init__.py` using the 
`__all__` variable. This approach enables both star imports and specific 
imports without running the code upon import, thereby providing isolation 
between the internal and public API.
   
   Examples:
   
   [AWS SDK for 
Pandas](https://github.com/aws/aws-sdk-pandas/blob/main/awswrangler/catalog/__init__.py)
   [Pandas 
Arrays](https://github.com/pandas-dev/pandas/blob/main/pandas/arrays/__init__.py)
   [Scikit-Learn 
Datasets](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/datasets/__init__.py)
   
   More info:
   
   [Python.org: 
Packages](https://docs.python.org/3/tutorial/modules.html#packages)
   [Python.org: Importing from a 
Package](https://docs.python.org/3/tutorial/modules.html#importing-from-a-package)"
   
   This is something that is causing me problems with the CLI I'm building as 
an internal tool. Can I be responsible for fixing this behavior?


-- 
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.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