Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scylla_repository.py: attend to python 3.12 related warnings #627

Merged
merged 1 commit into from
Dec 4, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:

- name: Test with pytest (python 3.9)
run: |
nix develop --command python3.9 -m pytest ./tests -x
nix develop --command python3.9 -m pytest ./tests -x -W ignore

- name: Test with pytest (python 3.11)
run: |
nix develop --command python3.11 -m pytest ./tests -x
nix develop --command python3.11 -m pytest ./tests -x -W ignore

- name: Copy logs/results
if: contains(github.event.pull_request.labels.*.name, 'PR-upload-log')
Expand Down
6 changes: 5 additions & 1 deletion ccmlib/scylla_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ def download_version(version, url=None, verbose=False, target_dir=None, unified=
if verbose:
print(f"Extracting {target} ({url}, {target_dir}) as version {version} ...")
tar = tarfile.open(target)
tar.extractall(path=target_dir)
if sys.version_info >= (3, 12):
kwargs = {'path': target_dir, 'filter': 'data'}
else:
kwargs = {'path': target_dir}
tar.extractall(**kwargs)
tar.close()

# if relocatable package format >= 2, need to extract files under subdir
Expand Down
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ markers =
reloc: Run tests with relocatable packages
cassandra: Run tests with cassandra binaries
repo_tests: Run test for testing get versions

filterwarnings =
error
ignore::ResourceWarning
Loading