Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7973

[Developer][C++] ResourceWarnings in run_cpplint.py

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • C++, Developer Tools
    • None

    Description

      Seeing warnings like this locally

      $ 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
      

      I was using PYTHONDEVMODE=1 so this may be related

      Attachments

        Activity

          People

            wesm Wes McKinney
            wesm Wes McKinney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: