From df509c6263b9f0257b6b89b5cf9e95af6ff2b58dd8d57efcdbe9564731e7a297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 6 May 2019 09:43:03 +0000 Subject: [PATCH] Accepting request 701029 from home:pgajdos - version update to 0.4.0 - Fixed a bug which caused test failures due to generated paths on *nix based operating systems which were too long. `#65 `_ - Fixed a bug which caused spinner output to sometimes attempt to double encode on python 2, resulting in failed output encoding. `#69 `_ - Fixed an issue where paths could sometimes fail to be fs-encoded properly when using backported ``NamedTemporaryFile`` instances. `#74 `_ - Fixed a bug in ``vistir.misc.locale_encoding`` which caused invocation of a non-existent method called ``getlocaleencoding`` which forced all systems to use default encoding of ``ascii``. `#78 `_ - deleted patches - merged_pr_68-colorama-pin.patch (upstreamed) - merged_pr_75-backport-pins.patch (upstreamed) - no-ffi.patch (upstreamed) - py27-missing-exception.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/701029 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vistir?expand=0&rev=7 --- merged_pr_68-colorama-pin.patch | 23 --------- merged_pr_75-backport-pins.patch | 82 -------------------------------- no-ffi.patch | 40 ---------------- py27-missing-exception.patch | 23 --------- python-vistir.changes | 23 +++++++++ python-vistir.spec | 9 +--- vistir-0.3.1.tar.gz | 3 -- vistir-0.4.0.tar.gz | 3 ++ 8 files changed, 28 insertions(+), 178 deletions(-) delete mode 100644 merged_pr_68-colorama-pin.patch delete mode 100644 merged_pr_75-backport-pins.patch delete mode 100644 no-ffi.patch delete mode 100644 py27-missing-exception.patch delete mode 100644 vistir-0.3.1.tar.gz create mode 100644 vistir-0.4.0.tar.gz diff --git a/merged_pr_68-colorama-pin.patch b/merged_pr_68-colorama-pin.patch deleted file mode 100644 index a452be5..0000000 --- a/merged_pr_68-colorama-pin.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a50e4effe9a4a729c46fef8d1e16c7909b75a132 Mon Sep 17 00:00:00 2001 -From: John Vandenberg -Date: Sun, 10 Mar 2019 11:01:21 +0700 -Subject: [PATCH] Set colorama minimum version 0.3.4 - -Fixes https://github.com/sarugaku/vistir/issues/67 ---- - setup.cfg | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.cfg b/setup.cfg -index 594ed5c..a19cb5e 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -37,7 +37,7 @@ setup_requires = - parver - wheel - install_requires = -- colorama -+ colorama>=0.3.4 - backports.functools_lru_cache;python_version<="3.4" - backports.shutil_get_terminal_size;python_version<"3.3" - backports.weakref;python_version<"3.3" diff --git a/merged_pr_75-backport-pins.patch b/merged_pr_75-backport-pins.patch deleted file mode 100644 index 500a4b7..0000000 --- a/merged_pr_75-backport-pins.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 72e90d9aad81f66626f0913b7cb0a0ddd44483ae Mon Sep 17 00:00:00 2001 -From: John Vandenberg -Date: Sun, 10 Mar 2019 01:07:52 +0700 -Subject: [PATCH] compat: Remove backports from Python 3.4 - -Remove complex version markers and runtime version checking -for unsupported versions between Python 2.7 and Python 3.4+. -The logic was wrong, requiring backports.functools_lru_cache -on Python 3.4 when the stdlib function was acceptable. - -Fixes https://github.com/sarugaku/vistir/issues/63 ---- - setup.cfg | 6 +++--- - src/vistir/compat.py | 28 +++++++++++----------------- - 2 files changed, 14 insertions(+), 20 deletions(-) - -diff --git a/setup.cfg b/setup.cfg -index 636788d..c3f39b0 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -38,9 +38,9 @@ setup_requires = - wheel - install_requires = - colorama>=0.3.4 -- backports.functools_lru_cache;python_version<="3.4" -- backports.shutil_get_terminal_size;python_version<"3.3" -- backports.weakref;python_version<"3.3" -+ backports.functools_lru_cache;python_version=="2.7" -+ backports.shutil_get_terminal_size;python_version=="2.7" -+ backports.weakref;python_version=="2.7" - pathlib2;python_version<"3.5" - requests - six -diff --git a/src/vistir/compat.py b/src/vistir/compat.py -index b99f420..a1789e6 100644 ---- a/src/vistir/compat.py -+++ b/src/vistir/compat.py -@@ -42,33 +42,27 @@ - - if sys.version_info >= (3, 5): - from pathlib import Path -- from functools import lru_cache - else: - from pathlib2 import Path -- from backports.functools_lru_cache import lru_cache -- - --if sys.version_info < (3, 3): -- from backports.shutil_get_terminal_size import get_terminal_size -- -- NamedTemporaryFile = _NamedTemporaryFile --else: -+if six.PY3: -+ # Only Python 3.4+ is supported -+ from functools import lru_cache, partialmethod - from tempfile import NamedTemporaryFile - from shutil import get_terminal_size -- --try: - from weakref import finalize --except ImportError: -- from backports.weakref import finalize # type: ignore -- --try: -- from functools import partialmethod --except Exception: -+else: -+ # Only Python 2.7 is supported -+ from backports.functools_lru_cache import lru_cache - from .backports.functools import partialmethod # type: ignore -+ from backports.shutil_get_terminal_size import get_terminal_size -+ NamedTemporaryFile = _NamedTemporaryFile -+ from backports.weakref import finalize # type: ignore - - try: -+ # Introduced Python 3.5 - from json import JSONDecodeError --except ImportError: # Old Pythons. -+except ImportError: - JSONDecodeError = ValueError # type: ignore - - if six.PY2: diff --git a/no-ffi.patch b/no-ffi.patch deleted file mode 100644 index 07b389a..0000000 --- a/no-ffi.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7eb17a32c70fb0e2f2ea1754303df1f4bd46c2d1 Mon Sep 17 00:00:00 2001 -From: John Vandenberg -Date: Thu, 7 Mar 2019 18:35:48 +0700 -Subject: [PATCH] cursor.py: Remove unnecessary loading of libffi - ---- - src/vistir/cursor.py | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/src/vistir/cursor.py b/src/vistir/cursor.py -index 22d643e..0c1b4c2 100644 ---- a/src/vistir/cursor.py -+++ b/src/vistir/cursor.py -@@ -1,19 +1,21 @@ - # -*- coding=utf-8 -*- - from __future__ import absolute_import, print_function - --import ctypes - import os - import sys - - __all__ = ["hide_cursor", "show_cursor"] - - --class CONSOLE_CURSOR_INFO(ctypes.Structure): -- _fields_ = [("dwSize", ctypes.c_int), ("bVisible", ctypes.c_int)] -+if os.name == 'nt': -+ import ctypes - -+ class CONSOLE_CURSOR_INFO(ctypes.Structure): -+ _fields_ = [("dwSize", ctypes.c_int), ("bVisible", ctypes.c_int)] - --WIN_STDERR_HANDLE_ID = ctypes.c_ulong(-12) --WIN_STDOUT_HANDLE_ID = ctypes.c_ulong(-11) -+ -+ WIN_STDERR_HANDLE_ID = ctypes.c_ulong(-12) -+ WIN_STDOUT_HANDLE_ID = ctypes.c_ulong(-11) - - - def get_stream_handle(stream=sys.stdout): diff --git a/py27-missing-exception.patch b/py27-missing-exception.patch deleted file mode 100644 index 3abaa58..0000000 --- a/py27-missing-exception.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 02d68f380275e149d02442274b878172da4741ce Mon Sep 17 00:00:00 2001 -From: John Vandenberg -Date: Fri, 8 Mar 2019 21:54:00 +0700 -Subject: [PATCH] rmtree: import FileNotFoundError from compat - -FileNotFoundError does not exist on Python 2. ---- - src/vistir/path.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vistir/path.py b/src/vistir/path.py -index d551aac..adddd01 100644 ---- a/src/vistir/path.py -+++ b/src/vistir/path.py -@@ -331,7 +331,7 @@ def rmtree(directory, ignore_errors=False, onerror=None): - - Setting `ignore_errors=True` may cause this to silently fail to delete the path - """ -- -+ from .compat import FileNotFoundError - directory = fs_encode(directory) - if onerror is None: - onerror = handle_remove_readonly diff --git a/python-vistir.changes b/python-vistir.changes index 844f707..e25697d 100644 --- a/python-vistir.changes +++ b/python-vistir.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon May 6 09:37:57 UTC 2019 - pgajdos@suse.com + +- version update to 0.4.0 +- Fixed a bug which caused test failures due to generated paths on + *nix based operating systems which were too long. + `#65 `_ +- Fixed a bug which caused spinner output to sometimes attempt to + double encode on python 2, resulting in failed output encoding. + `#69 `_ +- Fixed an issue where paths could sometimes fail to be fs-encoded + properly when using backported ``NamedTemporaryFile`` instances. + `#74 `_ +- Fixed a bug in ``vistir.misc.locale_encoding`` which caused + invocation of a non-existent method called ``getlocaleencoding`` + which forced all systems to use default encoding of ``ascii``. + `#78 `_ +- deleted patches + - merged_pr_68-colorama-pin.patch (upstreamed) + - merged_pr_75-backport-pins.patch (upstreamed) + - no-ffi.patch (upstreamed) + - py27-missing-exception.patch (upstreamed) + ------------------------------------------------------------------- Tue Apr 2 15:51:35 UTC 2019 - John Vandenberg diff --git a/python-vistir.spec b/python-vistir.spec index 62990f6..797aec9 100644 --- a/python-vistir.spec +++ b/python-vistir.spec @@ -18,17 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-vistir -Version: 0.3.1 +Version: 0.4.0 Release: 0 Summary: Utilities for filesystems, paths, projects, subprocesses, and more 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 -Patch0: https://patch-diff.githubusercontent.com/raw/sarugaku/vistir/pull/61.patch#/no-ffi.patch -Patch1: https://patch-diff.githubusercontent.com/raw/sarugaku/vistir/pull/62.patch#/py27-missing-exception.patch -Patch2: https://patch-diff.githubusercontent.com/raw/sarugaku/vistir/pull/68.patch#/merged_pr_68-colorama-pin.patch -Patch3: https://patch-diff.githubusercontent.com/raw/sarugaku/vistir/pull/75.patch#/merged_pr_75-backport-pins.patch BuildRequires: %{python_module setuptools >= 38.2.5} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -65,9 +61,8 @@ subprocesses, and more. %prep %setup -q -n vistir-%{version} -%autopatch -p1 -sed -i '/invoke/d;/parver/d;/wheel$/d' setup.cfg +sed -i '/invoke/d;/parver/d;/wheel$/d;/addopts/d' setup.cfg rm -r tasks %build diff --git a/vistir-0.3.1.tar.gz b/vistir-0.3.1.tar.gz deleted file mode 100644 index bf394ed..0000000 --- a/vistir-0.3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:283e777366cc0be27fe604194ec5381b40f6beb196e74eb4145cf56bae1ad0e3 -size 72674 diff --git a/vistir-0.4.0.tar.gz b/vistir-0.4.0.tar.gz new file mode 100644 index 0000000..5a44d62 --- /dev/null +++ b/vistir-0.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3b13c5570636e8d44daad9b4212e2939e464c77bb67b2144e05c130e561c27c +size 83608