Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout Code Repository
uses: actions/checkout@v3

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/setup-python@v4
with:
python-version: "3.13"
python-version: "3.14"

# Run all pre-commit hooks on all the files.
# Getting only staged files can be tricky in case a new PR is opened
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -72,11 +72,6 @@ jobs:
conda list
# Ensure we have the right Python version
python --version
# Fix pip issues for Python 3.12+
if [[ "${{ matrix.python-version }}" == "3.12" ]] || [[ "${{ matrix.python-version }}" == "3.13" ]]; then
python -m ensurepip --upgrade || true
python -m pip install --upgrade --force-reinstall pip setuptools wheel
fi

- name: Install `zstash` Package
run: |
Expand Down Expand Up @@ -121,7 +116,7 @@ jobs:
environment-file: conda/dev.yml
channel-priority: flexible # Changed from strict to flexible
auto-update-conda: true
python-version: "3.13" # Use stable Python version for docs
python-version: "3.14" # Use stable Python version for docs

# sphinx-multiversion allows for version docs.
- name: Build Sphinx Docs
Expand Down
3 changes: 2 additions & 1 deletion conda/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ dependencies:
# Base
# =================
- pip
- python >=3.11,<3.14
- python >=3.11,<3.15
- setuptools
- sqlite
- six >=1.16.0
- globus-sdk >=3.15.0,<4.0
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exclude =
venv

[mypy]
python_version = 3.13
python_version = 3.14
check_untyped_defs = True
ignore_missing_imports = True
warn_unused_ignores = True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
author_email="forsyth2@llnl.gov, golaz1@llnl.gov, shaheen2@llnl.gov",
description="Long term HPSS archiving software for E3SM",
packages=find_packages(include=["zstash", "zstash.*"]),
python_requires=">=3.11,<3.14",
python_requires=">=3.11,<3.15",
entry_points={"console_scripts": ["zstash=zstash.main:main"]},
)
7 changes: 6 additions & 1 deletion zstash/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,12 @@ def extractFiles( # noqa: C901
logger.debug("Valid md5: {} {}".format(md5, fname))

elif extract_this_file:
tar.extract(tarinfo)
if sys.version_info >= (3, 12):
tar.extract(
tarinfo, filter="tar"
) # "data" is too restrictive, "fully_trusted" is too permissive.
else:
tar.extract(tarinfo)
# Note: tar.extract() will not restore time stamps of symbolic
# links. Could not find a Python-way to restore it either, so
# relying here on 'touch'. This is not the prettiest solution.
Expand Down
7 changes: 7 additions & 0 deletions zstash/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import absolute_import, print_function

import argparse
import multiprocessing
import os
import os.path
import sys
Expand All @@ -27,6 +28,12 @@ def handler(signal_received, frame):
# -----------------------------------------------------------------------------
def main():

# Force the use of 'fork' for multiprocessing to ensure consistent behavior
# across Python versions (Python 3.14+ changed the default to 'spawn').
# 'fork' is only available on POSIX systems (Linux, macOS).
if sys.platform != "win32":
multiprocessing.set_start_method("fork", force=True)

# Run the handler() function when SIGINT is received
signal(SIGINT, handler)

Expand Down
Loading