forked from pool/python-vistir
Accepting request 760587 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/760587 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-vistir?expand=0&rev=7
This commit is contained in:
24
fix-test_Account-for-encoded-length.patch
Normal file
24
fix-test_Account-for-encoded-length.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 074b8a9370ae73d4c2b29d86cef84a77ff428b16 Mon Sep 17 00:00:00 2001
|
||||
From: StefanBruens <stefan.bruens@rwth-aachen.de>
|
||||
Date: Thu, 2 Jan 2020 23:48:58 +0100
|
||||
Subject: [PATCH] Account for encoded length when limiting path components
|
||||
|
||||
A single UTF-8 character may be encoded to several bytes. For Linux,
|
||||
the typical maximum component length is 255 bytes.
|
||||
---
|
||||
tests/test_path.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/test_path.py b/tests/test_path.py
|
||||
index 1f979de..32ae8c4 100644
|
||||
--- a/tests/test_path.py
|
||||
+++ b/tests/test_path.py
|
||||
@@ -68,6 +68,8 @@ def test_mkdir_p(base_dir, subdir):
|
||||
assume(not (os.path.relpath(subdir, start=base_dir) == "."))
|
||||
assume(os.path.abspath(base_dir) != os.path.abspath(os.path.join(base_dir, subdir)))
|
||||
assume(len(base_dir) < 255 and len(subdir) < 255)
|
||||
+ assume(len(vistir.compat.fs_encode(subdir)) < 255)
|
||||
+ assume(len(vistir.compat.fs_encode(base_dir)) < 255)
|
||||
with vistir.compat.TemporaryDirectory() as temp_dir:
|
||||
target = os.path.join(temp_dir.name, base_dir, subdir)
|
||||
assume(
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 2 22:53:33 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix test case failing due to too long generated name:
|
||||
* Add fix-test_Account-for-encoded-length.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 09:37:38 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-vistir
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -25,6 +25,8 @@ License: ISC
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/sarugaku/vistir
|
||||
Source: https://github.com/sarugaku/vistir/archive/%{version}.tar.gz#/vistir-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/sarugaku/vistir/issues/65
|
||||
Patch0: fix-test_Account-for-encoded-length.patch
|
||||
BuildRequires: %{python_module setuptools >= 40.8.0}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -60,6 +62,7 @@ subprocesses, and more.
|
||||
|
||||
%prep
|
||||
%setup -q -n vistir-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
sed -i '/invoke/d;/parver/d;/wheel$/d;/addopts/d' setup.cfg
|
||||
rm -r tasks
|
||||
|
||||
Reference in New Issue
Block a user