Hello community,
here is the log from the commit of package python-pyperclip for openSUSE:Factory checked in at 2020-05-01 11:06:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyperclip (Old)
and /work/SRC/openSUSE:Factory/.python-pyperclip.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyperclip"
Fri May 1 11:06:31 2020 rev:8 rq:798861 version:1.8.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyperclip/python-pyperclip.changes 2020-03-27 00:20:20.268106068 +0100
+++ /work/SRC/openSUSE:Factory/.python-pyperclip.new.2738/python-pyperclip.changes 2020-05-01 11:06:39.170973156 +0200
@@ -1,0 +2,6 @@
+Wed Apr 29 10:32:41 UTC 2020 - Dirk Mueller
+
+- update to 1.8.0
+ + no changes available
+
+-------------------------------------------------------------------
Old:
----
pyperclip-1.7.0.tar.gz
New:
----
pyperclip-1.8.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyperclip.spec ++++++
--- /var/tmp/diff_new_pack.U5v2SN/_old 2020-05-01 11:06:40.998977132 +0200
+++ /var/tmp/diff_new_pack.U5v2SN/_new 2020-05-01 11:06:41.002977140 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyperclip
-Version: 1.7.0
+Version: 1.8.0
Release: 0
Summary: A clipboard module for Python
License: BSD-3-Clause
++++++ pyperclip-1.7.0.tar.gz -> pyperclip-1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/PKG-INFO new/pyperclip-1.8.0/PKG-INFO
--- old/pyperclip-1.7.0/PKG-INFO 2018-09-25 01:12:07.000000000 +0200
+++ new/pyperclip-1.8.0/PKG-INFO 2020-03-29 01:45:16.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pyperclip
-Version: 1.7.0
+Version: 1.8.0
Summary: A cross-platform clipboard module for Python. (Only handles plain text for now.)
Home-page: https://github.com/asweigart/pyperclip
Author: Al Sweigart
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/docs/index.rst new/pyperclip-1.8.0/docs/index.rst
--- old/pyperclip-1.7.0/docs/index.rst 2015-12-14 05:01:22.000000000 +0100
+++ new/pyperclip-1.8.0/docs/index.rst 2020-03-29 01:08:12.000000000 +0100
@@ -3,22 +3,54 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
+.. default-role:: code
+
Welcome to Pyperclip's documentation!
=====================================
-Contents:
+Pyperclip provides a cross-platform Python module for copying and pasting text to the clipboard.
+
+To copy text to the clipboard, pass a string to ``pyperclip.copy()``. To paste the text from the clipboard, call ``pyperclip.paste()`` and the text will be returned as a string value.
+
+.. code:: python
+
+ >>> import pyperclip
+ >>> pyperclip.copy('Hello, world!')
+ >>> pyperclip.paste()
+ 'Hello, world!'
+
+Pyperclip also has a `pyperclip.waitForPaste()` function, which blocks and doesn't return until a non-empty text string is on the clipboard. It then returns this string. The `pyperclip.waitForNewPaste()` blocks until the text on the clipboard has changed:
+
+.. code:: python
+
+ >>> import pyperclip
+ >>> pyperclip.waitForPaste() # Doesn't return until non-empty text is on the clipboard.
+ 'Hello, world!'
+
+ >>> pyperclip.copy('original text')
+ >>> pyperclip.waitForNewPaste() # Doesn't return until the clipboard has something other than "original text".
+ 'Hello, world!'
+
+These functions also have a `timeout` argument to specify a number of seconds to check. If the timeout elapses without returning, the functions raise a `PyperclipTimeoutException` exception:
-.. toctree::
- :maxdepth: 2
+ >>> import pyperclip
+ >>> pyperclip.waitForNewPaste(5)
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ File "c:\github\pyperclip\src\pyperclip\__init__.py", line 689, in waitForNewPaste
+ raise PyperclipTimeoutException('waitForNewPaste() timed out after ' + str(timeout) + ' seconds.')
+ pyperclip.PyperclipTimeoutException: waitForNewPaste() timed out after 5 seconds.
- introduction.rst
+Not Implemented Error
+=====================
+You may get an error message that says: "Pyperclip could not find a copy/paste mechanism for your system. Please see https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented... for how to fix this."
-Indices and tables
-==================
+In order to work equally well on Windows, Mac, and Linux, Pyperclip uses various mechanisms to do this. Currently, this error should only appear on Linux (not Windows or Mac). You can fix this by installing one of the copy/paste mechanisms:
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
+- ``sudo apt-get install xsel`` to install the xsel utility.
+- ``sudo apt-get install xclip`` to install the xclip utility.
+- ``pip install gtk`` to install the gtk Python module.
+- ``pip install PyQt4`` to install the PyQt4 Python module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/docs/introduction.rst new/pyperclip-1.8.0/docs/introduction.rst
--- old/pyperclip-1.7.0/docs/introduction.rst 2017-10-29 04:25:47.000000000 +0100
+++ new/pyperclip-1.8.0/docs/introduction.rst 1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-.. default-role:: code
-
-============
-Introduction
-============
-
-Purpose
-=======
-
-The purpose of Pyperclip is to provide a cross-platform Python module for copying and pasting text to the clipboard.
-
-To copy text to the clipboard, pass a string to ``pyperclip.copy()``. To paste the text from the clipboard, call ``pyperclip.paste()`` and the text will be returned as a string value.
-
-.. code:: python
-
- >>> import pyperclip
- >>> pyperclip.copy('Hello world!')
- >>> pyperclip.paste()
- 'Hello world!'
-
-Not Implemented Error
-=====================
-
-You may get an error message that says: "Pyperclip could not find a copy/paste mechanism for your system. Please see https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented... for how to fix this."
-
-In order to work equally well on Windows, Mac, and Linux, Pyperclip uses various mechanisms to do this. Currently, this error should only appear on Linux (not Windows or Mac). You can fix this by installing one of the copy/paste mechanisms:
-
-- ``sudo apt-get install xsel`` to install the xsel utility.
-- ``sudo apt-get install xclip`` to install the xclip utility.
-- ``pip install gtk`` to install the gtk Python module.
-- ``pip install PyQt4`` to install the PyQt4 Python module.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/src/pyperclip/__init__.py new/pyperclip-1.8.0/src/pyperclip/__init__.py
--- old/pyperclip-1.7.0/src/pyperclip/__init__.py 2018-09-25 01:10:22.000000000 +0200
+++ new/pyperclip-1.8.0/src/pyperclip/__init__.py 2020-03-29 01:13:14.000000000 +0100
@@ -43,7 +43,7 @@
Pyperclip into running them with whatever permissions the Python process has.
"""
-__version__ = '1.7.0'
+__version__ = '1.8.0'
import contextlib
import ctypes
@@ -64,7 +64,7 @@
EXCEPT_MSG = """
Pyperclip could not find a copy/paste mechanism for your system.
- For more information, please visit https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented... """
+ For more information, please visit https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error """
PY2 = sys.version_info[0] == 2
@@ -93,6 +93,8 @@
message += " (%s)" % ctypes.WinError()
super(PyperclipWindowsException, self).__init__(message)
+class PyperclipTimeoutException(PyperclipException):
+ pass
def _stringifyText(text):
if PY2:
@@ -648,6 +650,45 @@
copy, paste = lazy_load_stub_copy, lazy_load_stub_paste
-__all__ = ['copy', 'paste', 'set_clipboard', 'determine_clipboard']
+
+def waitForPaste(timeout=None):
+ """This function call blocks until a non-empty text string exists on the
+ clipboard. It returns this text.
+
+ This function raises PyperclipTimeoutException if timeout was set to
+ a number of seconds that has elapsed without non-empty text being put on
+ the clipboard."""
+ startTime = time.time()
+ while True:
+ clipboardText = paste()
+ if clipboardText != '':
+ return clipboardText
+ time.sleep(0.01)
+
+ if timeout is not None and time.time() > startTime + timeout:
+ raise PyperclipTimeoutException('waitForPaste() timed out after ' + str(timeout) + ' seconds.')
+
+
+def waitForNewPaste(timeout=None):
+ """This function call blocks until a new text string exists on the
+ clipboard that is different from the text that was there when the function
+ was first called. It returns this text.
+
+ This function raises PyperclipTimeoutException if timeout was set to
+ a number of seconds that has elapsed without non-empty text being put on
+ the clipboard."""
+ startTime = time.time()
+ originalText = paste()
+ while True:
+ currentText = paste()
+ if currentText != originalText:
+ return currentText
+ time.sleep(0.01)
+
+ if timeout is not None and time.time() > startTime + timeout:
+ raise PyperclipTimeoutException('waitForNewPaste() timed out after ' + str(timeout) + ' seconds.')
+
+
+__all__ = ['copy', 'paste', 'waitForPaste', 'waitForNewPaste' 'set_clipboard', 'determine_clipboard']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/src/pyperclip.egg-info/PKG-INFO new/pyperclip-1.8.0/src/pyperclip.egg-info/PKG-INFO
--- old/pyperclip-1.7.0/src/pyperclip.egg-info/PKG-INFO 2018-09-25 01:12:07.000000000 +0200
+++ new/pyperclip-1.8.0/src/pyperclip.egg-info/PKG-INFO 2020-03-29 01:45:16.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pyperclip
-Version: 1.7.0
+Version: 1.8.0
Summary: A cross-platform clipboard module for Python. (Only handles plain text for now.)
Home-page: https://github.com/asweigart/pyperclip
Author: Al Sweigart
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyperclip-1.7.0/src/pyperclip.egg-info/SOURCES.txt new/pyperclip-1.8.0/src/pyperclip.egg-info/SOURCES.txt
--- old/pyperclip-1.7.0/src/pyperclip.egg-info/SOURCES.txt 2018-09-25 01:12:07.000000000 +0200
+++ new/pyperclip-1.8.0/src/pyperclip.egg-info/SOURCES.txt 2020-03-29 01:45:16.000000000 +0100
@@ -4,7 +4,6 @@
docs/Makefile
docs/conf.py
docs/index.rst
-docs/introduction.rst
docs/make.bat
src/pyperclip/__init__.py
src/pyperclip/__main__.py