You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/03 15:44:22 UTC

[GitHub] [airflow] ashb commented on a change in pull request #12786: Get airflow version from importlib.metadata rather than hard-coding

ashb commented on a change in pull request #12786:
URL: https://github.com/apache/airflow/pull/12786#discussion_r535348096



##########
File path: airflow/version.py
##########
@@ -17,4 +17,13 @@
 # under the License.
 #
 
-version = '2.0.0b3'
+__all__ = ['version']
+
+try:
+    from importlib import metadata
+except ImportError:
+    import importlib_metadata as metadata
+
+version = metadata.version('apache-airflow')
+
+del metadata

Review comment:
       (This line isn't strictly needed, it was just so that the only symbol in this module was `version`. For no god reason really)




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

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