public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-b2sdk] rawhide: update to version 2.13.5
@ 2026-11-27 17:50 Simon de Vlieger
0 siblings, 0 replies; only message in thread
From: Simon de Vlieger @ 2026-11-27 17:50 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-b2sdk
Branch : rawhide
Commit : a7cea9256e278535b8d90228b9404847ec3843c6
Author : Simon de Vlieger <cmdr@supakeen.com>
Date : 2026-11-27T18:50:21+01:00
Stats : +28/-116 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-b2sdk/c/a7cea9256e278535b8d90228b9404847ec3843c6?branch=rawhide
Log:
update to version 2.13.5
Dropped one patch, applied another to make tests pass.
Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
---
diff --git a/0001-Fix-test_dir_without_exec_permission-on-Python-3.14.patch b/0001-Fix-test_dir_without_exec_permission-on-Python-3.14.patch
deleted file mode 100644
index 9035d33..0000000
--- a/0001-Fix-test_dir_without_exec_permission-on-Python-3.14.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 87f00a7eb59047d1cfda3505a76a9c627d3ad65a Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@debian.org>
-Date: Fri, 9 Jan 2026 01:04:42 +0000
-Subject: [PATCH] Fix test_dir_without_exec_permission on Python 3.14
-
-One unit test fails on Python 3.14 as follows:
-
-```
-_____________ TestFolderTraversal.test_dir_without_exec_permission _____________
-
-self = <test.unit.scan.test_folder_traversal.TestFolderTraversal object at 0x7f5530606350>
-tmp_path = PosixPath('/tmp/pytest-of-sbuild/pytest-0/test_dir_without_exec_permissi0')
-fs_perm_tool = <test.unit.conftest.UnixPermTool object at 0x7f55301ca510>
-
- @pytest.mark.skipif(
- platform.system() == 'Windows',
- reason='Unix-only filesystem permissions are tested',
- )
- def test_dir_without_exec_permission(self, tmp_path, fs_perm_tool):
- """Test that a excluded directory/file without permissions emits warnings."""
- no_perm_dir = tmp_path / 'no_perm_dir'
- no_perm_dir.mkdir()
- (no_perm_dir / 'file.txt').touch()
- (no_perm_dir / 'file2.txt').touch()
- # chmod -x no_perm_dir
- no_perm_dir.chmod(0o600)
-
- scan_policy = ScanPoliciesManager()
- reporter = ProgressReport(sys.stdout, False)
-
- folder = LocalFolder(str(tmp_path))
- local_paths = folder.all_files(reporter=reporter, policies_manager=scan_policy)
- absolute_paths = [path.absolute_path for path in local_paths]
- assert not absolute_paths
-
- # Check that no access warnings are issued for the excluded directory/file
-> assert set(reporter.warnings) == {
- f'WARNING: {tmp_path/"no_perm_dir/file.txt"} could not be accessed (no permissions to read?)',
- f'WARNING: {tmp_path/"no_perm_dir/file2.txt"} could not be accessed (no permissions to read?)',
- }
-E AssertionError: assert {'WARNING: /t...en symlink?)'} == {'WARNING: /t...ns to read?)'}
-E
-E Extra items in the left set:
-E 'WARNING: /tmp/pytest-of-sbuild/pytest-0/test_dir_without_exec_permissi0/no_perm_dir/file2.txt could not be accessed (broken symlink?)'
-E 'WARNING: /tmp/pytest-of-sbuild/pytest-0/test_dir_without_exec_permissi0/no_perm_dir/file.txt could not be accessed (broken symlink?)'
-E Extra items in the right set:
-E 'WARNING: /tmp/pytest-of-sbuild/pytest-0/test_dir_without_exec_permissi0/no_perm_dir/file.txt could not be accessed (no permissions to read?)'
-E 'WARNING: /tmp/pytest-of-sbuild/pytest-0/test_dir_without_exec_permissi0/no_perm_dir/file2.txt could not be accessed (no permissions to read?)'
-E Use -v to get more diff
-
-test/unit/scan/test_folder_traversal.py:721: AssertionError
-```
-
-This is due to https://github.com/python/cpython/pull/118243. I'm not
-sure how important it is to preserve the exact same warning message
-here, but the conservative approach is to do so;
-https://docs.python.org/3/library/pathlib.html advises using `Path.stat`
-to distinguish these cases.
-
-(cherry picked from commit be3497b996d8a6b9e5202f8c9c70afccfb8221af)
----
- b2sdk/_internal/scan/folder.py | 8 +++++++-
- changelog.d/+py314-test.fixed.md | 1 +
- 2 files changed, 8 insertions(+), 1 deletion(-)
- create mode 100644 changelog.d/+py314-test.fixed.md
-
-diff --git a/b2sdk/_internal/scan/folder.py b/b2sdk/_internal/scan/folder.py
-index 38dda43f..54b3ca2f 100644
---- a/b2sdk/_internal/scan/folder.py
-+++ b/b2sdk/_internal/scan/folder.py
-@@ -13,6 +13,7 @@ import logging
- import os
- import platform
- import re
-+import stat
- import sys
- from abc import ABCMeta, abstractmethod
- from pathlib import Path
-@@ -274,14 +275,19 @@ class LocalFolder(AbstractFolder):
- reporter.invalid_name(str(local_path), str(e))
- continue
-
-+ # Deliberately don't use Path.is_dir here: for directories
-+ # without search permission, Python 3.13 raises PermissionError
-+ # while Python 3.14 returns False.
- try:
-- is_dir = local_path.is_dir()
-+ is_dir = stat.S_ISDIR(local_path.stat().st_mode)
- except PermissionError: # `chmod -x dir` can trigger this
- if reporter is not None and not policies_manager.should_exclude_local_directory(
- str(relative_file_path)
- ):
- reporter.local_permission_error(str(local_path))
- continue
-+ except (OSError, ValueError):
-+ is_dir = False
-
- if is_dir:
- if policies_manager.should_exclude_local_directory(str(relative_file_path)):
-diff --git a/changelog.d/+py314-test.fixed.md b/changelog.d/+py314-test.fixed.md
-new file mode 100644
-index 00000000..ab9421bd
---- /dev/null
-+++ b/changelog.d/+py314-test.fixed.md
-@@ -0,0 +1 @@
-+Fix `TestFolderTraversal.test_dir_without_exec_permission` on Python 3.14.
---
-2.53.0
-
diff --git a/0001-Preserve-PYTHONPATH-in-sdkharness-tests.patch b/0001-Preserve-PYTHONPATH-in-sdkharness-tests.patch
new file mode 100644
index 0000000..fced441
--- /dev/null
+++ b/0001-Preserve-PYTHONPATH-in-sdkharness-tests.patch
@@ -0,0 +1,17 @@
+From: Fedora Python maintainers
+Subject: [PATCH] Preserve PYTHONPATH in sdkharness test subprocesses
+
+RPM tests expose the installed SDK and its distribution metadata through
+PYTHONPATH. Keep that path available in child processes, after the source
+tree and any deliberately broken SDK used by the import-error tests.
+
+--- a/test/unit/test_sdkharness_fail_not_skip.py
++++ b/test/unit/test_sdkharness_fail_not_skip.py
+@@ -49,6 +49,7 @@ def run_leaf(leaf, simulator_url, extra_path=None):
+ if not name.startswith(('B2_', 'CONFORMANCE_', 'RESILIENCE_', 'SDKHARNESS_'))
+ }
+ python_path = [str(ROOT)]
++ python_path.extend(filter(None, env.get('PYTHONPATH', '').split(os.pathsep)))
+ if extra_path:
+ python_path.insert(0, str(extra_path))
+ env.update(
diff --git a/python-b2sdk.spec b/python-b2sdk.spec
index 787e958..0c426d2 100644
--- a/python-b2sdk.spec
+++ b/python-b2sdk.spec
@@ -1,8 +1,8 @@
%bcond tests %{defined fedora}
Name: python-b2sdk
-Version: 2.10.2
-Release: 3%{?dist}
+Version: 2.13.5
+Release: 1%{?dist}
Summary: Backblaze B2 SDK
License: MIT
@@ -12,8 +12,7 @@ BuildArch: noarch
# PyPI tarball is missing tests
Source: %{url}/archive/v%{version}/b2sdk-%{version}.tar.gz
-# https://github.com/Backblaze/b2-sdk-python/pull/560
-Patch: 0001-Fix-test_dir_without_exec_permission-on-Python-3.14.patch
+Patch: 0001-Preserve-PYTHONPATH-in-sdkharness-tests.patch
%global _description %{expand:
Python library and a few handy utilities for easy access to all of the
@@ -42,15 +41,17 @@ BuildRequires: python3-responses
%prep
%autosetup -p 1 -n b2-sdk-python-%{version}
+# Fedora's certifi uses the system CA bundle regardless of its version.
+sed -i 's/"certifi>=2026.10.19"/"certifi"/' pyproject.toml
%generate_buildrequires
-export PDM_BUILD_SCM_VERSION=%{version}
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_buildrequires
%build
-export PDM_BUILD_SCM_VERSION=%{version}
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel
@@ -73,6 +74,9 @@ export PDM_BUILD_SCM_VERSION=%{version}
%changelog
+* Fri Nov 27 2026 Simon de Vlieger <cmdr@supakeen.com> - 2.13.5-1
+- Update to version 2.13.5 rhbz#2441809
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
diff --git a/sources b/sources
index b4632fc..2b1bbb7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (b2sdk-2.10.2.tar.gz) = 633715c57bc61d1fa55bf86ab9ad838099f8670aab0b76a82c979ed79d2feac106daf8a067123733ff74c08f77d1cf35377057c18c29c0705d5f902b759a7b69
+SHA512 (b2sdk-2.13.5.tar.gz) = daff3937924c294905db0cbb3b5fc467e05568d2bd251cbbaf159f0b7f6e8d094964f17b96655e95880b47e9e90ca2619f0d1599de32a596c3e88b8ecb76436e
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-27 17:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 17:50 [rpms/python-b2sdk] rawhide: update to version 2.13.5 Simon de Vlieger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox