Skip to content

Commit

Permalink
Merge pull request #1304 from jlowin/warnings
Browse files Browse the repository at this point in the history
Show only Airflow's deprecation warnings
  • Loading branch information
jlowin committed Apr 5, 2016
2 parents 6581858 + 9c6dbf1 commit 58abca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
from collections import OrderedDict
from configparser import ConfigParser

# show DeprecationWarning and PendingDeprecationWarning
warnings.simplefilter('default', DeprecationWarning)
warnings.simplefilter('default', PendingDeprecationWarning)
# show Airflow's deprecation warnings
warnings.filterwarnings(
action='default', category=DeprecationWarning, module='airflow')
warnings.filterwarnings(
action='default', category=PendingDeprecationWarning, module='airflow')

class AirflowConfigException(Exception):
pass
Expand Down
2 changes: 1 addition & 1 deletion airflow/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ def __init__(
# TODO remove *args and **kwargs in Airflow 2.0
warnings.warn(
'Invalid arguments were passed to {c}. Support for '
'passing such arguments will be dropped in Airflow 2.0.'
'passing such arguments will be dropped in Airflow 2.0. '
'Invalid arguments were:'
'\n*args: {a}\n**kwargs: {k}'.format(
c=self.__class__.__name__, a=args, k=kwargs),
Expand Down

0 comments on commit 58abca2

Please sign in to comment.