Sync from SUSE:SLFO:Main python-python-xlib revision f0d24453bcd62f880637ea15c119db49

This commit is contained in:
Adrian Schröter 2024-05-03 22:38:14 +02:00
commit 756bae7a8a
6 changed files with 416 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

245
python-python-xlib.changes Normal file
View File

@ -0,0 +1,245 @@
-------------------------------------------------------------------
Sun Apr 23 16:27:15 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
- update to 0.33:
* Removed unused imports.
* Avoid to use fcntl module on some environments.
* Change a test behavior for unix_connect.get_socket.
* Fix accidental data change.
* Prefer bool over Literal[0, 1, None].
* Change parentheses to brackets in LICENSE.
- Changes from version 0.32:
* Use archived link for X documentation resource.
* Fix for auth entry having no display number.
* Fix return type inconsistency with the pack_value for class Object.
* Rename add_extension_error method to extension_add_error.
* Extension screensaver: fix screensaver protocol mismatch.
* Extension XRandr: add version 1.5 support for
RRSetMonitor RRGetMonitors and RRDeleteMonitors.
-------------------------------------------------------------------
Tue Apr 12 08:58:13 UTC 2022 - Markéta Machová <mmachova@suse.com>
- do not use mock
-------------------------------------------------------------------
Sat Feb 26 12:44:54 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 0.31:
* XInput: add event methods
* XResource: first implementation (thanks @alebastr).
* Randr: add missing parameters to delete_output_mode function
- use multibuild to avoid expensive pytest-xvfb dependency
(should reduce rebuild_time of 1-MinimalX by ~ 12 minutes)
-------------------------------------------------------------------
Thu Aug 12 11:29:05 UTC 2021 - Yifan Jiang <yfjiang@suse.com>
- Completely remove python2 build for TW, Leap 15.4 and SLE 15 SP4.
-------------------------------------------------------------------
Thu Aug 12 11:26:42 UTC 2021 - Yifan Jiang <yfjiang@suse.com>
- Add buildrequires xauth to successfully build on SLE.
-------------------------------------------------------------------
Fri Dec 11 23:39:19 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to version 0.29
* Drawable & XInput: Avoid using array.array.tostring() which
will be removed in Python 3.9 (thanks @t-wissmann).
- Changelog for version 0.28
* DPMS: Display Power Management Signaling (by @thiagokokada)
- Add remove-mock.patch gh#python-xlib/python-xlib#186
- Let the python-rpm-macros do their job for correct provides and
obsoletes tag for all python3 flavors
gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Sun Aug 16 21:12:28 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Replace nose with pytest
- dos2unix %doc files
-------------------------------------------------------------------
Wed Aug 5 08:07:43 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 0.27
* fix TypeError in socket.error exception handling for Python 3.x (by @t-wissmann)
* NV-CONTROL: set offset for all perf levels (by @Sporif)
-------------------------------------------------------------------
Mon Jan 13 04:42:33 UTC 2020 - Dead Mozay <dead_mozay@opensuse.org>
- version update to 0.26
* enrich XFixes extension with XFixesSelectionNotify events (by @acrisci)
* add example xfixes-selection-notify.py (by @acrisci)
* fix two issues in NV-CONTROL extension (by @leinardi)
* add method get_clock_info into NV-CONTROL extension (by @leinardi)
* add default client version into Composite extension (by @jakogut)
* add Damage extension with the example (by @mgarg1 and @jakogut)
-------------------------------------------------------------------
Sun Oct 20 05:31:28 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Add runtime dependency on xorg-x11-server
- Add examples to the docs
- dos2unix the docs
- Remove unused ChangeLog in runtime package source
-------------------------------------------------------------------
Thu May 9 09:56:46 UTC 2019 - pgajdos@suse.com
- version update to 0.25
* fix increasing memory usage on display instantiation
* NV-CONTROL extension
* fix protocol handling: correctly support explicit Unix
connections and fix support fox macOS
* improve Python 3 support: fix events sub-code handling
and possible crashes when unpacking text data
* add support for error handlers to the Composite extension
-------------------------------------------------------------------
Tue Nov 27 11:21:53 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Make sure the tests are run
-------------------------------------------------------------------
Tue Nov 27 09:04:39 UTC 2018 - sor.alexei@meowr.ru
- Update to version 0.23 (changes since 0.19):
* Fix unclosed file in Xauth implementation.
* Fix support for Window.set_wm_transient_for.
* Fix support for Drawable.put_image / Drawable.get_image.
* Use Latin-1 for decoding strings in Python 3 (same as Python 2).
* Fix Python 3 warnings about array.tostring() (deprecated).
* When DISPLAY does not specify a protocol, and the implicit Unix
socket connection fails, fallback to TCP (mimicking XCB's
behaviour).
* Fix Display.change_pointer_control implementation.
* Fix Drawable.put_pil_image implementation.
* Don't bundle a copy of texi2html to build the HTML
documentation, but use the currently installed version instead.
* Improve response processing performance: reduce the number of
`socket.recv` calls needed to receive a full response.
- Remove python-xlib-0.14-increase-receiving-buffer.patch: no
longer needed, see commit 1958a82.
-------------------------------------------------------------------
Thu Aug 31 06:43:36 UTC 2017 - toddrme2178@gmail.com
- Update to Version 0.19
+ Bug Fixes
* don't throw an exception if $XAUTHFILE / ~/.Xauthority is missing
* fix authentication work-around for SSH forwarding under Python 3
* improve $DISPLAY handling: support optional protocol prefix, and
correctly handle `unix:0.0` as `:0.0`
- Update to Version 0.18
+ Bug Fixes
* fix Python 3 buffer abstraction
* fix interrupted select handling for Python 3.3/3.4
* fix Unix socket support when only an abstract address is available
- Update to Version 0.17
+ Bug Fixes
* fix Xauth handling when using Python 2 and DISPLAY contains a remote IP
* fix String16 request field handling when using Python 3
* fix RECORD extension and example when using Python 3
* fix handling of properties: use byte strings for all X11 8-bits
strings, as not all of them are text properties (the window
getters/setters for wm_name, wm_icon_name, wm_class, and
wm_client_machine still return/expect Unicode strings)
+ API Changes
* Core:
> new window getter/setter for text properties: get_full_text_property
and change_text_property; with automatic conversion to/from Unicode
when the property type encoding is supported (STRING and UTF8_STRING)
* Composite extension:
> support for GetOverlayWindow request
- Update to Version 0.16
+ Licensing
* The project is now licensed under the GNU Lesser General Public License
v2.1 or later (see the LICENSE file for details).
+ Compatibility
* Support for Python versions older than 2.7 has been dropped. Support for
Python 3 (3.3, 3.4 and 3.5) has been added. Note that Python-Xlib now
depends on the six package (>=1.10) for combined Python 2 / 3 support.
+ API Changes
* With the change of license, and no way to contact the original author of
the SHAPE extension, the code had to be rewritten from scratch. This
resulted in a few minor API changes (see examples/shapewin.py).
* Partial support for the SECURITY. XInput, and XFIXES extensions has been
added.
+ Bug Fixes
* fix RECORD extension
* fixed OS X socket path
* fix handling of generic events
* fix handling of KeymapNotify events
* several fixes for the RandR extension
- Update to Version 0.15rc1
+ Composite extension
* Support for the composite extension, used to implement a composition
manager (added for plcm work in plwm).
+ XF86 special function keysyms
* Keysym definitions for special function keys found on modern
keyboards, e.g. raise and lower volume, start specific applications,
etc. Have a look in Xlib/keysymdef/xf86.py to see what there are and
experiment with xev to see what your keyboard generates. These
definitions aren't brought in by default, so you must do this after
importing Xlib.XK:
* Xlib.XK.load_keysym_group('xf86')
+ RANDR extension
* The RANDR extension complements XINERAMA as a way of getting data about the
physical screens making up a virtual screen in X. An example of usage can
be found in examples/xrandr.py.
- Rename to python-python-xlib to follow python package
naming rules.
- Change license to LGPL-2.1+
- Remove upstream-included patches:
* python-xlib-0.14-fix-unix-socket-in-display.patch
* python-xlib-0.14-xauthlocalhostname.patch
- Rebase python-xlib-0.14-increase-receiving-buffer.patch
-------------------------------------------------------------------
Thu Aug 24 13:57:59 UTC 2017 - jmatejek@suse.com
- singlespec auto-conversion
-------------------------------------------------------------------
Wed Jan 2 19:44:41 UTC 2013 - toddrme2178@gmail.com
- Fix building on SLES
-------------------------------------------------------------------
Mon Sep 3 00:50:45 UTC 2012 - jengelh@inai.de
- Remove redundant (%clean, Authors) sections
- Make package compile on RH6-like as well
-------------------------------------------------------------------
Thu Aug 19 09:35:59 UTC 2010 - gber@opensuse.org
- added python-xlib-0.14-xauthlocalhostname.patch which takes
XAUTHLOCALHOSTNAME into account when connecting to a local Unix
socket, this fixes python-xlib when logging in with gdm/xdm
(bnc#623507)
- removed python-xlib-0.14-fix-ssh-tunnel-auth.patch, already taken
care of
-------------------------------------------------------------------
Wed Aug 11 09:18:44 UTC 2010 - gber@opensuse.org
- Add selected patches from Debian
+ python-xlib-0.14-fix-unix-socket-in-display.patch: partial fix
for crash when unix is explicitly specified in DISPLAY
+ python-xlib-0.14-increase-receiving-buffer.patch: fix problem
with too small receiving buffer
+ python-xlib-0.14-fix-ssh-tunnel-auth.patch: partial fix for X
tunneling through OpenSSH
-------------------------------------------------------------------
Wed Oct 31 13:36:46 CET 2007 - jpr@suse.de
- Python bindings for Xlib
- Initial checkin of version 0.14

97
python-python-xlib.spec Normal file
View File

@ -0,0 +1,97 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%if !0%{?sle_version} || 0%{?sle_version} > 150300
%define skip_python2 1
%else
%define oldpython python
%endif
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%bcond_with wheel
%endif
Name: python-python-xlib%{psuffix}
Version: 0.33
Release: 0
Summary: Python X11 interface
License: LGPL-2.1-or-later
Group: Development/Libraries/Python
URL: https://github.com/python-xlib/python-xlib
Source: https://files.pythonhosted.org/packages/source/p/python-xlib/python-xlib-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM remove-mock.patch -- gh#python-xlib/python-xlib#186
Patch0: remove-mock.patch
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
%if %{with test}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six >= 1.10.0}
%endif
%if 0%{suse_version} < 1550
BuildRequires: xauth
%endif
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six >= 1.10.0
BuildArch: noarch
Provides: python-xlib = %{version}
Obsoletes: python-xlib < %{version}
%if 0%{?sle_version} && 0%{?sle_version} <= 150300 && "%{python_flavor}" == "python2"
Provides: %{oldpython}-xlib = %{version}
Obsoletes: %{oldpython}-xlib < %{version}
%endif
%python_subpackages
%description
The Python X Library is intended to be a fully functional X client
library for Python programs.
%prep
%setup -q -n python-xlib-%{version}
dos2unix CHANGELOG.md README.rst TODO dev-requirements.txt test/*
# patch only applies to unix endings
%patch0 -p1
%build
%python_build
%if %{with test}
%check
%pytest -rs
%else
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%license LICENSE
%doc CHANGELOG.md README.rst TODO
%{python_sitelib}/Xlib/
%{python_sitelib}/python_xlib-*
%endif
%changelog

BIN
python-xlib-0.33.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

45
remove-mock.patch Normal file
View File

@ -0,0 +1,45 @@
From 8bab50254d78370398dcbdf247d59976b866c27f Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Sat, 12 Dec 2020 00:57:16 +0100
Subject: [PATCH 1/2] remove mock from dev-requirments
---
dev-requirements.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/dev-requirements.txt b/dev-requirements.txt
index b2f5288..22fc710 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,5 +1,4 @@
coverage
codecov
-mock
nose
setuptools-scm
From 4c08116d51e2b2b2bc53d01ee8dd9698793cad5d Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Sat, 12 Dec 2020 00:58:19 +0100
Subject: [PATCH 2/2] Use mock from standard lib if possible
---
test/test_unix_connect.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/test_unix_connect.py b/test/test_unix_connect.py
index 7680ba5..36abede 100644
--- a/test/test_unix_connect.py
+++ b/test/test_unix_connect.py
@@ -6,7 +6,10 @@
import sys
import unittest
-from mock import patch
+try:
+ from unittest.mock import patch
+except ImportError:
+ from mock import patch
from Xlib.support import unix_connect
from Xlib.error import DisplayConnectionError, DisplayNameError