[
https://issues.apache.org/jira/browse/AIRFLOW-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16525550#comment-16525550
]
ASF subversion and git services commented on AIRFLOW-2668:
----------------------------------------------------------
Commit fa6c35743a5129057d870752554b0827dd7d462f in incubator-airflow's branch
refs/heads/master from [~ashb]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=fa6c357 ]
[AIRFLOW-2668] Handle missing optional cryptography dependency
cryptography is a recommended, but optional
dependency. It was
mistakenly made a hard dependency by a refactor.
This restores that
behaviour (though without tests, as it's hard to
test that in a
unittest)
In testing this I found that running `airflow
initdb` would end up
printing the "crypto is missing" message 15 times,
making it hard to see
what was actually going on. So I have re-worked
`get_fernet()` to only
compute (and warn) once. This also makes the
consuming code easier as in
the case of the dep not being installed we still
have a class that
presents the same interface as Fernet.
Closes #3550 from ashb/AIRFLOW-2668-optional-
cryptography
> Missing cryptogrpahy dependency on airflow initdb call
> ------------------------------------------------------
>
> Key: AIRFLOW-2668
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2668
> Project: Apache Airflow
> Issue Type: Bug
> Components: dependencies
> Affects Versions: 1.10.0
> Reporter: Nicholas Pezolano
> Priority: Minor
>
> The cryptography packages looks to be required now for `airflow initdb` calls
> on a fresh install from master as of commit
> 702a57ec5a96d159105c4f5ca76ddd2229eb2f44.
> $ airflow initdb
> Traceback (most recent call last):
> File "/home/n/git/airflow_testing/env/bin/airflow", line 6, in <module>
> exec(compile(open(__file__).read(), __file__, 'exec'))
> File "/home/n/git/incubator-airflow/airflow/bin/airflow", line 21, in
> <module>
> from airflow import configuration
> File "/home/n/git/incubator-airflow/airflow/__init__.py", line 37, in
> <module>
> from airflow.models import DAG
> File "/home/n/git/incubator-airflow/airflow/models.py", line 31, in <module>
> import cryptography
> ImportError: No module named cryptography
>
> Steps to reproduce:
> {code}
> git clone https://github.com/apache/incubator-airflow
> virtualenv env
> . env/bin/activate
> pip install -e .[s3]
> airflow initdb
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)