airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay Krishna Ramesh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-916) Fix ConfigParser deprecation warning
Date Wed, 01 Mar 2017 18:22:45 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890739#comment-15890739
] 

Vijay Krishna Ramesh commented on AIRFLOW-916:
----------------------------------------------

this breaks things on python 2.7.10 for me:

{code}
Traceback (most recent call last):
  File "/Users/vijay/.pyenv/versions/2.7.10/lib/python2.7/site-packages/nose/loader.py", line
418, in loadTestsFromName
    addr.filename, addr.module)
  File "/Users/vijay/.pyenv/versions/2.7.10/lib/python2.7/site-packages/nose/importer.py",
line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/Users/vijay/.pyenv/versions/2.7.10/lib/python2.7/site-packages/nose/importer.py",
line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users/vijay/oss/incubator-airflow/tests/__init__.py", line 18, in <module>
    from .configuration import *
  File "/Users/vijay/oss/incubator-airflow/tests/configuration.py", line 19, in <module>
    from airflow import configuration
  File "/Users/vijay/oss/incubator-airflow/airflow/__init__.py", line 29, in <module>
    from airflow import configuration as conf
  File "/Users/vijay/oss/incubator-airflow/airflow/configuration.py", line 792, in <module>
    conf = AirflowConfigParser()
  File "/Users/vijay/oss/incubator-airflow/airflow/configuration.py", line 532, in __init__
    self.read_string(parameterized_config(DEFAULT_CONFIG))
  File "/Users/vijay/oss/incubator-airflow/airflow/configuration.py", line 549, in read_string
    self.read_file(StringIO.StringIO(string))
AttributeError: AirflowConfigParser instance has no attribute 'read_file'
{code}

> Fix ConfigParser deprecation warning 
> -------------------------------------
>
>                 Key: AIRFLOW-916
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-916
>             Project: Apache Airflow
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Jeremiah Lowin
>            Assignee: Jeremiah Lowin
>            Priority: Trivial
>             Fix For: 1.9.0
>
>
> ConfigParser.readfp() is deprecated in favor of ConfigParser.read_file(), according to
warning messages



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message