[
https://issues.apache.org/jira/browse/AIRFLOW-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902706#comment-16902706
]
ASF GitHub Bot commented on AIRFLOW-5138:
-----------------------------------------
jml commented on pull request #5756: [AIRFLOW-5138] Don't override user's
warning settings in airflow.configuration
URL: https://github.com/apache/airflow/pull/5756
### Jira
Partly addresses https://issues.apache.org/jira/browse/AIRFLOW-5138 by
allowing users to silence the spurious warnings.
It's very uncommon for Python libraries to override warning settings in this
way. By doing so, tools like pytest filterwarnings or even `python -W` won't
suppress the warnings, which means the warnings just become background noise,
rather than a meaningful message from one person to another.
### Tests
My PR doesn't need automated tests because it's reverting warnings behaviour
to the Python default, which is fine for practically everyone else.
### Commits
- [x] My commits all reference Jira issues in their subject lines, and I
have squashed multiple commits if they address the same issue. In addition, my
commits follow the guidelines from "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
None required. No behaviour changes.
### Code Quality
- [x] Passes `flake8` — your CI doesn't catch this?!
----------------------------------------------------------------
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:
[email protected]
> Spurious DeprecationWarnings issued for configuration
> -----------------------------------------------------
>
> Key: AIRFLOW-5138
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5138
> Project: Apache Airflow
> Issue Type: Bug
> Components: configuration
> Affects Versions: 1.10.3, 1.10.4
> Reporter: Jonathan Lange
> Priority: Minor
>
> If you have tests that import airflow, and run them with pytest, you'll see
> errors like this:
> {code}
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/configuration.py:599
>
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/configuration.py:599:
> DeprecationWarning: Specifying airflow_home in the config file is
> deprecated. As you have left it at the default value you should remove the
> setting from your airflow.cfg and suffer no change in behaviour.
> category=DeprecationWarning,
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:65
>
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:65:
> DeprecationWarning: The elasticsearch_host option in [elasticsearch] has
> been renamed to host - the old setting has been used, but please update your
> config.
> ELASTICSEARCH_HOST = conf.get('elasticsearch', 'HOST')
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:67
>
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:67:
> DeprecationWarning: The elasticsearch_log_id_template option in
> [elasticsearch] has been renamed to log_id_template - the old setting has
> been used, but please update your config.
> ELASTICSEARCH_LOG_ID_TEMPLATE = conf.get('elasticsearch',
> 'LOG_ID_TEMPLATE')
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:69
>
> /Users/jml/.pyenv/versions/3.7.4/envs/memflow/lib/python3.7/site-packages/airflow/config_templates/airflow_local_settings.py:69:
> DeprecationWarning: The elasticsearch_end_of_log_mark option in
> [elasticsearch] has been renamed to end_of_log_mark - the old setting has
> been used, but please update your config.
> ELASTICSEARCH_END_OF_LOG_MARK = conf.get('elasticsearch',
> 'END_OF_LOG_MARK')
> {code}
> These errors occur even if you don't have a config file present. They are
> very distracting, and I can't figure out what action I should take to get rid
> of them.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)