You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2021/09/10 07:15:00 UTC

[jira] [Created] (FLINK-24243) Clean up the code and avoid warning messages introduced by deprecated API

Dian Fu created FLINK-24243:
-------------------------------

             Summary: Clean up the code and avoid warning messages introduced by deprecated API
                 Key: FLINK-24243
                 URL: https://issues.apache.org/jira/browse/FLINK-24243
             Project: Flink
          Issue Type: Improvement
          Components: API / Python
            Reporter: Dian Fu
            Assignee: Dian Fu


Currently, there are quite a few warning messages when executing PyFlink jobs, e.g.
{code}
Process finished with exit code 0
/usr/local/Cellar/python@3.7/3.7.10_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py:883: ResourceWarning: subprocess 75115 is still running
  ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/Users/dianfu/code/src/apache/flink/flink-python/pyflink/table/udf.py:326: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  if not isinstance(input_types, collections.Iterable) \
/Users/dianfu/code/src/apache/flink/flink-python/pyflink/table/table_environment.py:537: DeprecationWarning: Deprecated in 1.10. Use create_table instead.
  warnings.warn("Deprecated in 1.10. Use create_table instead.", DeprecationWarning)
/Users/dianfu/venv/examples-37/lib/python3.7/site-packages/future/standard_library/__init__.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
2021-09-10 15:03:47,335 - apache_beam.typehints.native_type_compatibility - INFO - Using Any for unsupported type: typing.Sequence[~T]
/Users/dianfu/code/src/apache/flink/flink-python/pyflink/fn_execution/state_impl.py:677: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  class RemovableConcatIterator(collections.Iterator):
/Users/dianfu/code/src/apache/flink/flink-python/pyflink/fn_execution/utils/operation_utils.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import Generator
{code}

We should clean up the code and avoid warning messages introduced by deprecated API by using latest API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)