From cfcc18719de7fae310a1e674982894fba05ce0c1 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Tue, 15 Dec 2020 12:24:50 +0700 Subject: [PATCH 1/2] ci: Ignore Python 2 deprecation warning --- tools/ci/check_build_warnings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci/check_build_warnings.py b/tools/ci/check_build_warnings.py index 2e012fa9b4..bed1985996 100755 --- a/tools/ci/check_build_warnings.py +++ b/tools/ci/check_build_warnings.py @@ -30,7 +30,8 @@ IGNORE_WARNS = [ r"changes choice state", r"crosstool_version_check\.cmake", r"CryptographyDeprecationWarning", - r"Python 3 versions older than 3.6 are not supported." + r"Python 3 versions older than 3.6 are not supported.", + r"Support for Python 2 is deprecated and will be removed in future versions.", ] ] From df544dee307513a2a2ccbf5f113128fcf61076b9 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Tue, 15 Dec 2020 12:41:20 +0700 Subject: [PATCH 2/2] tools: Redirect some warnings to stderr --- components/app_update/otatool.py | 4 ++-- components/spiffs/spiffsgen.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/app_update/otatool.py b/components/app_update/otatool.py index 86c630f5af..7a087be16d 100755 --- a/components/app_update/otatool.py +++ b/components/app_update/otatool.py @@ -250,9 +250,9 @@ def _erase_ota_partition(target, ota_id): def main(): if sys.version_info[0] < 3: - print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.") + print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.", file=sys.stderr) elif sys.version_info[0] == 3 and sys.version_info[1] < 6: - print("WARNING: Python 3 versions older than 3.6 are not supported.") + print("WARNING: Python 3 versions older than 3.6 are not supported.", file=sys.stderr) global quiet parser = argparse.ArgumentParser("ESP-IDF OTA Partitions Tool") diff --git a/components/spiffs/spiffsgen.py b/components/spiffs/spiffsgen.py index 3314e93f0e..24c50a9b4d 100755 --- a/components/spiffs/spiffsgen.py +++ b/components/spiffs/spiffsgen.py @@ -453,9 +453,9 @@ class SpiffsFS(): def main(): if sys.version_info[0] < 3: - print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.") + print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.", file=sys.stderr) elif sys.version_info[0] == 3 and sys.version_info[1] < 6: - print("WARNING: Python 3 versions older than 3.6 are not supported.") + print("WARNING: Python 3 versions older than 3.6 are not supported.", file=sys.stderr) parser = argparse.ArgumentParser(description="SPIFFS Image Generator", formatter_class=argparse.ArgumentDefaultsHelpFormatter)