From 4f10f50e9e3d49163919038df611c1c8c88446ba Mon Sep 17 00:00:00 2001 From: Matthew Hocking Date: Thu, 4 Dec 2025 09:26:25 -0500 Subject: [PATCH 1/5] Swapped from depracated fallback file basename to UUID --- modules/python/nitf/samples/nitf_extract.py | 4 ++-- modules/python/nitf/samples/test_image.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/python/nitf/samples/nitf_extract.py b/modules/python/nitf/samples/nitf_extract.py index e25e3c1a6..184b91bc5 100755 --- a/modules/python/nitf/samples/nitf_extract.py +++ b/modules/python/nitf/samples/nitf_extract.py @@ -25,7 +25,7 @@ """ from nitf import * -import os, sys, logging, glob +import os, sys, logging, glob, uuid logging.basicConfig(level=logging.INFO, stream=sys.stdout, format='%(asctime)s %(levelname)s %(message)s') @@ -40,7 +40,7 @@ def extract_image(subheader, index, imageReader, outDir=None, baseName=None): bandData = imageReader.read(window) if not outDir: outDir = os.getcwd() - if not baseName: baseName = os.path.basename(os.tempnam()) + if not baseName: baseName = os.path.basename(uuid.uuid4().hex) outNames = [] for band, data in enumerate(bandData): diff --git a/modules/python/nitf/samples/test_image.py b/modules/python/nitf/samples/test_image.py index da3783b6e..7baba84b5 100755 --- a/modules/python/nitf/samples/test_image.py +++ b/modules/python/nitf/samples/test_image.py @@ -25,7 +25,7 @@ """ from nitf import * -import os, sys, logging, glob +import os, sys, logging, glob, uuid from PIL import Image logging.basicConfig(level=logging.INFO, stream=sys.stdout, @@ -41,7 +41,7 @@ def dump_image(subheader, index, imageReader, outDir=None, baseName=None): bandData = imageReader.read(window) if not outDir: outDir = os.getcwd() - if not baseName: baseName = os.path.basename(os.tempnam()) + if not baseName: baseName = os.path.basename(uuid.uuid4().hex) outNames = [] for band, data in enumerate(bandData): From 2c6fcd5f46f44fc6f705ff5601e5b326d5d3d84c Mon Sep 17 00:00:00 2001 From: Matthew Hocking Date: Thu, 11 Dec 2025 16:41:09 -0500 Subject: [PATCH 2/5] Update python version to 3.9 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 286f66990..48357edd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python with: - python-version: '3.7' + python-version: '3.9' - name: configure run: | mkdir out From 8a972fe79868e761669f7656b8e22ccecf564e9f Mon Sep 17 00:00:00 2001 From: Matthew Hocking Date: Thu, 11 Dec 2025 16:42:58 -0500 Subject: [PATCH 3/5] Fix version so only ubuntu is on 3.9 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48357edd8..1debec489 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python with: - python-version: '3.9' + python-version: '3.7' - name: configure run: | mkdir out @@ -94,12 +94,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python with: - python-version: '3.7' + python-version: '3.9' - name: configure run: | mkdir target-Release cd target-Release - cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.7 .. + cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.9 .. - name: make run: | cd target-Release From faa22ec75e03c9aa4d25a7135fd6e02a7cb5e81e Mon Sep 17 00:00:00 2001 From: Matthew Hocking Date: Thu, 11 Dec 2025 16:47:39 -0500 Subject: [PATCH 4/5] Move frequent check to 3.9 --- .github/workflows/frequent_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/frequent_check.yml b/.github/workflows/frequent_check.yml index 698981d4b..864787395 100644 --- a/.github/workflows/frequent_check.yml +++ b/.github/workflows/frequent_check.yml @@ -91,12 +91,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python with: - python-version: '3.7' + python-version: '3.9' - name: configure run: | mkdir target-Release cd target-Release - cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.7 + cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.9 - name: make run: | cd target-Release From 7be68406742d1e3b3291453280813090f1718422 Mon Sep 17 00:00:00 2001 From: Matthew Hocking Date: Mon, 15 Dec 2025 15:20:44 -0500 Subject: [PATCH 5/5] New compile args --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bd74b735..6cf6bd1b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,10 @@ if (${CMAKE_PROJECT_NAME} STREQUAL nitro) elseif (UNIX) add_compile_options(-Werror) # warnings as errors + if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0) + add_compile_options(-Wno-error=c++20-compat -Wno-error=format-truncation) + endif() + if (ENABLE_ASAN) # https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html add_compile_options(-fsanitize=address)