potiuk commented on a change in pull request #17757: URL: https://github.com/apache/airflow/pull/17757#discussion_r694319259
########## File path: docs/apache-airflow/modules_management.rst ########## @@ -68,99 +81,192 @@ In the next section, you will learn how to create your own simple installable package and how to specify additional directories to be added to ``sys.path`` using the environment variable :envvar:`PYTHONPATH`. +If you want to import some packages from a directory that is added to ``PYTHONPATH`` you should import +it following the full Python path of the files. All directories where you put your files have to also +have an empty ``__init__.py`` file which turns it into Python package. Take as an example such structure Review comment: > Python 3 doesn't need __init__.py's, right, That's not entirely correct... I also got that impression for some time, but (at least I see it), it's a bit of a misunderstanding. bB Python 3 **can** turn regular folders into implicit packages with their own namespaces, But a number of tools discovering python code (airflow DAG loading including) does not deal with implicit namespaces and still requirea an `__init__.py` files in the folders). Maybe I am wrong about it ? @ashb ? But that's the impression I have. I did separate it out, but I would love to have a good statement about it. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org