You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2020/03/10 22:22:00 UTC

[jira] [Resolved] (ARROW-7973) [Developer][C++] ResourceWarnings in run_cpplint.py

     [ https://issues.apache.org/jira/browse/ARROW-7973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney resolved ARROW-7973.
---------------------------------
    Resolution: Fixed

I fixed the warning in run_cpplint.py. There are other PYTHONDEVMODE warnings in cpplint.py that we would have to patch in that project

> [Developer][C++] ResourceWarnings in run_cpplint.py 
> ----------------------------------------------------
>
>                 Key: ARROW-7973
>                 URL: https://issues.apache.org/jira/browse/ARROW-7973
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Developer Tools
>            Reporter: Wes McKinney
>            Assignee: Wes McKinney
>            Priority: Major
>             Fix For: 0.17.0
>
>
> Seeing warnings like this locally
> {code}
> $ ninja lint
> [1/1] cd /home/wesm/code/arrow/cpp/preflight...ce_dir /home/wesm/code/arrow/cpp/src --quiet
> FAILED: CMakeFiles/lint 
> cd /home/wesm/code/arrow/cpp/preflight-build && /home/wesm/miniconda/envs/arrow-3.7/bin/python /home/wesm/code/arrow/cpp/build-support/run_cpplint.py --cpplint_binary /home/wesm/code/arrow/cpp/build-support/cpplint.py --exclude_globs /home/wesm/code/arrow/cpp/build-support/lint_exclusions.txt --source_dir /home/wesm/code/arrow/cpp/src --quiet
> /home/wesm/code/arrow/cpp/build-support/run_cpplint.py:77: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/wesm/code/arrow/cpp/build-support/lint_exclusions.txt' mode='r' encoding='UTF-8'>
>   for line in open(arguments.exclude_globs):
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> /home/wesm/code/arrow/cpp/build-support/cpplint.py:6240: ResourceWarning: unclosed file <_io.BufferedReader name='/home/wesm/code/arrow/cpp/src/arrow/compute/kernels/add.h'>
>   lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> /home/wesm/code/arrow/cpp/build-support/cpplint.py:6240: ResourceWarning: unclosed file <_io.BufferedReader name='/home/wesm/code/arrow/cpp/src/arrow/compute/kernels/util_internal.h'>
>   lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> {code}
> I was using {{PYTHONDEVMODE=1}} so this may be related



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