From b7991140f8e2fe01430b8477cec85af2fb54b5d48a94b9a2048b11c9f314fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Dec 2024 12:06:02 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-pyperclip revision 3483bb9350596a3160b7e518f6bb0c3a --- pyperclip-1.8.2.tar.gz | 3 --- pyperclip-1.9.0.tar.gz | 3 +++ python-pyperclip.changes | 16 ++++++++++++++++ python-pyperclip.spec | 9 +++++---- tests.patch | 30 ++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 7 deletions(-) delete mode 100644 pyperclip-1.8.2.tar.gz create mode 100644 pyperclip-1.9.0.tar.gz create mode 100644 tests.patch diff --git a/pyperclip-1.8.2.tar.gz b/pyperclip-1.8.2.tar.gz deleted file mode 100644 index 05d74b1..0000000 --- a/pyperclip-1.8.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 -size 20920 diff --git a/pyperclip-1.9.0.tar.gz b/pyperclip-1.9.0.tar.gz new file mode 100644 index 0000000..497edc2 --- /dev/null +++ b/pyperclip-1.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310 +size 20961 diff --git a/python-pyperclip.changes b/python-pyperclip.changes index 45d8db6..6732255 100644 --- a/python-pyperclip.changes +++ b/python-pyperclip.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Oct 14 15:27:29 UTC 2024 - Markéta Machová + +- Update to 1.9.0 + * Automatically cast the copy() argument to a string for all data types. + * _py3_executable_exists and _py2_executable_exists had swapped names; fixed. + * Pyperclip now "stringifies" all data types by passing it to str() (or + globals()['__builtins__'].unicode on Python 2), so passing [1, 2, 3] would + put '[1, 2, 3]' on the clipboard. + * shutil.which() replaces the custom code (except in 2.7 and below which doesn't + have shutil.which()). + * Remove waitForPaste() and waitForNewPaste() functions, these aren't something + the core library should have. + * Reordered so that xclip is chosen before xsel since xclip is more popular. +- Add tests.patch to fix tests + ------------------------------------------------------------------- Fri Apr 21 12:31:07 UTC 2023 - Dirk Müller diff --git a/python-pyperclip.spec b/python-pyperclip.spec index 06fe16e..ed61c80 100644 --- a/python-pyperclip.spec +++ b/python-pyperclip.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyperclip # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,15 +16,16 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?sle15_python_module_pythons} Name: python-pyperclip -Version: 1.8.2 +Version: 1.9.0 Release: 0 Summary: A clipboard module for Python License: BSD-3-Clause URL: https://github.com/asweigart/pyperclip Source0: https://files.pythonhosted.org/packages/source/p/pyperclip/pyperclip-%{version}.tar.gz +# PATCH-FIX-UPSTREAM tests are broken with 1.9.0 release https://github.com/asweigart/pyperclip/issues/263 +Patch: tests.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -41,7 +42,7 @@ BuildRequires: %{python_module pytest} A clipboard module for Python. It only handles plain text. %prep -%setup -q -n pyperclip-%{version} +%autosetup -p1 -n pyperclip-%{version} %build %python_build diff --git a/tests.patch b/tests.patch new file mode 100644 index 0000000..7c78e42 --- /dev/null +++ b/tests.patch @@ -0,0 +1,30 @@ +Index: pyperclip-1.9.0/tests/test_pyperclip.py +=================================================================== +--- pyperclip-1.9.0.orig/tests/test_pyperclip.py ++++ pyperclip-1.9.0/tests/test_pyperclip.py +@@ -8,7 +8,7 @@ import platform + #import sys + #sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + +-from pyperclip import _executable_exists, HAS_DISPLAY ++from pyperclip import _executable_exists + from pyperclip import (init_osx_pbcopy_clipboard, init_osx_pyobjc_clipboard, + init_dev_clipboard_clipboard, + init_qt_clipboard, +@@ -134,16 +134,6 @@ class TestOSX(_TestClipboard): + clipboard = init_osx_pyobjc_clipboard() + + +-class TestQt(_TestClipboard): +- if HAS_DISPLAY: +- try: +- import PyQt5.QtWidgets +- except ImportError: +- pass +- else: +- clipboard = init_qt_clipboard() +- +- + class TestXClip(_TestClipboard): + if _executable_exists("xclip"): + clipboard = init_xclip_clipboard()