Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-xlib for 
openSUSE:Factory checked in at 2022-02-27 22:42:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-xlib (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-xlib.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-xlib"

Sun Feb 27 22:42:47 2022 rev:10 rq:957765 version:0.31

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-xlib/python-python-xlib.changes    
2021-08-16 10:13:00.982997806 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-xlib.new.1958/python-python-xlib.changes
  2022-02-27 22:42:54.786627307 +0100
@@ -1,0 +2,10 @@
+Sat Feb 26 12:44:54 UTC 2022 - Dirk M??ller <dmuel...@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)
+
+-------------------------------------------------------------------

Old:
----
  python-xlib-0.29.tar.gz

New:
----
  _multibuild
  python-xlib-0.31.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-xlib.spec ++++++
--- /var/tmp/diff_new_pack.De3ZaR/_old  2022-02-27 22:42:55.326627464 +0100
+++ /var/tmp/diff_new_pack.De3ZaR/_new  2022-02-27 22:42:55.330627465 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package python-python-xlib
+# spec file
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,8 +22,17 @@
 %else
 %define         oldpython python
 %endif
-Name:           python-python-xlib
-Version:        0.29
+%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.31
 Release:        0
 Summary:        Python X11 interface
 License:        LGPL-2.1-or-later
@@ -32,11 +41,13 @@
 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 pytest-xvfb}
-BuildRequires:  %{python_module pytest}
 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:  python-mock
 BuildRequires:  xauth
@@ -67,17 +78,21 @@
 %build
 %python_build
 
+%if %{with test}
+%check
+%pytest -rs
+
+%else
+
 %install
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%check
-%pytest -rs
-
 %files %{python_files}
 %license LICENSE
 %doc CHANGELOG.md README.rst TODO
 %{python_sitelib}/Xlib/
 %{python_sitelib}/python_xlib-*
+%endif
 
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>test</package>
</multibuild>

++++++ python-xlib-0.29.tar.gz -> python-xlib-0.31.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/.gitignore 
new/python-xlib-0.31/.gitignore
--- old/python-xlib-0.29/.gitignore     2019-02-03 22:05:24.000000000 +0100
+++ new/python-xlib-0.31/.gitignore     2021-07-02 12:32:04.000000000 +0200
@@ -59,7 +59,9 @@
 target/
 
 # IntelliJ
-
 .idea/
 
+# Visual Studio Code
+.vscode/
+
 /.mypy_cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/CHANGELOG.md 
new/python-xlib-0.31/CHANGELOG.md
--- old/python-xlib-0.29/CHANGELOG.md   2020-11-22 12:58:26.000000000 +0100
+++ new/python-xlib-0.31/CHANGELOG.md   2021-07-02 12:32:04.000000000 +0200
@@ -1,5 +1,24 @@
 NEWS for Python X Library
 
+Version 0.31
+============
+
+Extensions
+--------------------
+
+- XInput: add event methods (thanks @dd4e).
+
+---
+Version 0.30
+============
+
+Extensions
+--------------------
+
+- XResource: first implementation (thanks @alebastr).
+- XRandr: add missing parameters to delete_output_mode function (thanks 
@jimmy-loyola).
+
+---
 Version 0.29
 ============
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/PKG-INFO 
new/python-xlib-0.31/PKG-INFO
--- old/python-xlib-0.29/PKG-INFO       2020-11-22 12:59:46.000000000 +0100
+++ new/python-xlib-0.31/PKG-INFO       2021-07-02 12:32:12.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-xlib
-Version: 0.29
+Version: 0.31
 Summary: Python X Library
 Home-page: https://github.com/python-xlib/python-xlib
 Author: Peter Liljenberg
@@ -102,7 +102,7 @@
         There is a resource database implementation, ICCCM support and a
         framework for adding X extension code. Several extensions have been
         implemented (RECORD, SHAPE, Xinerama, Composite, RANDR, DAMAGE,
-        Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL and DPMS);
+        Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL, DPMS and 
XRes);
         patches for additions are very welcome.
         
         There are most likely still bugs, but the library is at least stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/README.rst 
new/python-xlib-0.31/README.rst
--- old/python-xlib-0.29/README.rst     2020-09-19 22:47:42.000000000 +0200
+++ new/python-xlib-0.31/README.rst     2021-05-15 20:11:33.000000000 +0200
@@ -93,7 +93,7 @@
 There is a resource database implementation, ICCCM support and a
 framework for adding X extension code. Several extensions have been
 implemented (RECORD, SHAPE, Xinerama, Composite, RANDR, DAMAGE,
-Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL and DPMS);
+Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL, DPMS and XRes);
 patches for additions are very welcome.
 
 There are most likely still bugs, but the library is at least stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/Xlib/__init__.py 
new/python-xlib-0.31/Xlib/__init__.py
--- old/python-xlib-0.29/Xlib/__init__.py       2020-11-22 12:58:26.000000000 
+0100
+++ new/python-xlib-0.31/Xlib/__init__.py       2021-07-02 12:32:04.000000000 
+0200
@@ -19,7 +19,7 @@
 #    Suite 330,
 #    Boston, MA 02111-1307 USA
 
-__version__ = (0, 29)
+__version__ = (0, 31)
 
 __version_extra__ = ''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/Xlib/ext/__init__.py 
new/python-xlib-0.31/Xlib/ext/__init__.py
--- old/python-xlib-0.29/Xlib/ext/__init__.py   2020-09-19 22:29:42.000000000 
+0200
+++ new/python-xlib-0.31/Xlib/ext/__init__.py   2021-05-15 20:11:33.000000000 
+0200
@@ -39,6 +39,7 @@
     ('NV-CONTROL', 'nvcontrol'),
     ('DAMAGE', 'damage'),
     ('DPMS', 'dpms'),
+    ('X-Resource', 'res'),
     ]
 
 __all__ = map(lambda x: x[1], __extensions__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/Xlib/ext/randr.py 
new/python-xlib-0.31/Xlib/ext/randr.py
--- old/python-xlib-0.29/Xlib/ext/randr.py      2016-08-13 10:06:14.000000000 
+0200
+++ new/python-xlib-0.31/Xlib/ext/randr.py      2021-05-15 20:11:33.000000000 
+0200
@@ -699,7 +699,7 @@
         rq.Card32('mode'),
         )
 
-def delete_output_mode(self):
+def delete_output_mode(self, output, mode):
     return DeleteOutputMode(
         display=self.display,
         opcode=self.display.get_extension_major(extname),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/Xlib/ext/res.py 
new/python-xlib-0.31/Xlib/ext/res.py
--- old/python-xlib-0.29/Xlib/ext/res.py        1970-01-01 01:00:00.000000000 
+0100
+++ new/python-xlib-0.31/Xlib/ext/res.py        2021-05-15 20:11:33.000000000 
+0200
@@ -0,0 +1,288 @@
+# Xlib.ext.res -- X-Resource extension module
+#
+#    Copyright (C) 2021 Aleksei Bavshin <alebast...@gmail.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+#    Free Software Foundation, Inc.,
+#    51 Franklin Street,
+#    Fifth Floor,
+#    Boston, MA 02110-1301 USA
+
+"""X-Resource extension allows a client to query the X server about its usage
+of various resources.
+
+For detailed description see any of the following documents.
+Protocol specification:
+    https://www.x.org/releases/current/doc/resourceproto/resproto.txt
+XCB Protocol specification:
+    https://cgit.freedesktop.org/xcb/proto/tree/src/res.xml
+"""
+from Xlib.protocol import rq
+
+RES_MAJOR_VERSION = 1
+RES_MINOR_VERSION = 2
+
+extname = "X-Resource"
+
+# v1.0
+ResQueryVersion = 0
+ResQueryClients = 1
+ResQueryClientResources = 2
+ResQueryClientPixmapBytes = 3
+# v1.2
+ResQueryClientIds = 4
+ResQueryResourceBytes = 5
+
+
+class QueryVersion(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryVersion),
+            rq.RequestLength(),
+            rq.Card8("client_major"),
+            rq.Card8("client_minor"),
+            rq.Pad(2))
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.Card16("server_major"),
+            rq.Card16("server_minor"),
+            rq.Pad(20))
+
+
+def query_version(self, client_major=RES_MAJOR_VERSION,
+                  client_minor=RES_MINOR_VERSION):
+    """ Query the protocol version supported by the X server.
+
+    The client sends the highest supported version to the server and the
+    server sends the highest version it supports, but no higher than the
+    requested version."""
+    return QueryVersion(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname),
+            client_major=client_major,
+            client_minor=client_minor)
+
+
+Client = rq.Struct(
+        rq.Card32("resource_base"),
+        rq.Card32("resource_mask"))
+
+
+class QueryClients(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryClients),
+            rq.RequestLength())
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.LengthOf("clients", 4),
+            rq.Pad(20),
+            rq.List("clients", Client))
+
+
+def query_clients(self):
+    """Request the list of all currently connected clients."""
+    return QueryClients(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname))
+
+
+Type = rq.Struct(
+        rq.Card32("resource_type"),
+        rq.Card32("count"))
+
+
+class QueryClientResources(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryClientResources),
+            rq.RequestLength(),
+            rq.Card32("client"))
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.LengthOf("types", 4),
+            rq.Pad(20),
+            rq.List("types", Type))
+
+
+def query_client_resources(self, client):
+    """Request the number of resources owned by a client.
+
+    The server will return the counts of each type of resource.
+    """
+    return QueryClientResources(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname),
+            client=client)
+
+
+class QueryClientPixmapBytes(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryClientPixmapBytes),
+            rq.RequestLength(),
+            rq.Card32("client"))
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.Card32("bytes"),
+            rq.Card32("bytes_overflow"),
+            rq.Pad(16))
+
+
+def query_client_pixmap_bytes(self, client):
+    """Query the pixmap usage of some client.
+
+    The returned number is a sum of memory usage of each pixmap that can be
+    attributed to the given client.
+    """
+    return QueryClientPixmapBytes(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname),
+            client=client)
+
+
+class SizeOf(rq.LengthOf):
+    """A SizeOf stores the size in bytes of some other Field whose size
+    may vary, e.g. List
+    """
+    def __init__(self, name, size, item_size):
+        rq.LengthOf.__init__(self, name, size)
+        self.item_size = item_size
+
+    def parse_value(self, length, display):
+        return length // self.item_size
+
+
+ClientXIDMask = 1 << 0
+LocalClientPIDMask = 1 << 1
+
+
+ClientIdSpec = rq.Struct(
+        rq.Card32("client"),
+        rq.Card32("mask"))
+
+
+ClientIdValue = rq.Struct(
+        rq.Object("spec", ClientIdSpec),
+        SizeOf("value", 4, 4),
+        rq.List("value", rq.Card32Obj))
+
+
+class QueryClientIds(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryClientIds),
+            rq.RequestLength(),
+            rq.LengthOf("specs", 4),
+            rq.List("specs", ClientIdSpec))
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.LengthOf("ids", 4),
+            rq.Pad(20),
+            rq.List("ids", ClientIdValue))
+
+
+def query_client_ids(self, specs):
+    """Request to identify a given set of clients with some identification 
method.
+
+    The request sends a list of specifiers that select clients and
+    identification methods to server. The server then tries to identify the
+    chosen clients using the identification methods specified for each client.
+    The server returns IDs for those clients that were successfully identified.
+    """
+    return QueryClientIds(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname),
+            specs=specs)
+
+
+ResourceIdSpec = rq.Struct(
+        rq.Card32("resource"),
+        rq.Card32("type"))
+
+
+ResourceSizeSpec = rq.Struct(
+        # inline struct ResourceIdSpec to work around
+        # a parser bug with nested objects
+        rq.Card32("resource"),
+        rq.Card32("type"),
+        rq.Card32("bytes"),
+        rq.Card32("ref_count"),
+        rq.Card32("use_count"))
+
+
+ResourceSizeValue = rq.Struct(
+        rq.Object("size", ResourceSizeSpec),
+        rq.LengthOf("cross_references", 4),
+        rq.List("cross_references", ResourceSizeSpec))
+
+
+class QueryResourceBytes(rq.ReplyRequest):
+    _request = rq.Struct(
+            rq.Card8("opcode"),
+            rq.Opcode(ResQueryResourceBytes),
+            rq.RequestLength(),
+            rq.Card32("client"),
+            rq.LengthOf("specs", 4),
+            rq.List("specs", ResourceIdSpec))
+    _reply = rq.Struct(
+            rq.ReplyCode(),
+            rq.Pad(1),
+            rq.Card16("sequence_number"),
+            rq.ReplyLength(),
+            rq.LengthOf("sizes", 4),
+            rq.Pad(20),
+            rq.List("sizes", ResourceSizeValue))
+
+
+def query_resource_bytes(self, client, specs):
+    """Query the sizes of resources from X server.
+
+    The request sends a list of specifiers that selects resources for size
+    calculation. The server tries to calculate the sizes of chosen resources
+    and returns an estimate for a resource only if the size could be determined
+    """
+    return QueryResourceBytes(
+            display=self.display,
+            opcode=self.display.get_extension_major(extname),
+            client=client,
+            specs=specs)
+
+
+def init(disp, info):
+    disp.extension_add_method("display", "res_query_version", query_version)
+    disp.extension_add_method("display", "res_query_clients", query_clients)
+    disp.extension_add_method("display", "res_query_client_resources",
+                              query_client_resources)
+    disp.extension_add_method("display", "res_query_client_pixmap_bytes",
+                              query_client_pixmap_bytes)
+    disp.extension_add_method("display", "res_query_client_ids",
+                              query_client_ids)
+    disp.extension_add_method("display", "res_query_resource_bytes",
+                              query_resource_bytes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/Xlib/ext/xinput.py 
new/python-xlib-0.31/Xlib/ext/xinput.py
--- old/python-xlib-0.29/Xlib/ext/xinput.py     2020-11-22 12:58:26.000000000 
+0100
+++ new/python-xlib-0.31/Xlib/ext/xinput.py     2021-07-02 12:32:04.000000000 
+0200
@@ -158,6 +158,8 @@
 DEVICE = rq.Card16
 DEVICEUSE = rq.Card8
 
+PROPERTY_TYPE_FLOAT = 'FLOAT'
+
 class FP1616(rq.Int32):
 
     def check_value(self, value):
@@ -426,6 +428,114 @@
         deviceid=deviceid,
         )
 
+class XIListProperties(rq.ReplyRequest):
+    _request = rq.Struct(
+        rq.Card8('opcode'),
+        rq.Opcode(56),
+        rq.RequestLength(),
+        DEVICEID('deviceid'),
+        rq.Pad(2),
+    )
+
+    _reply = rq.Struct(
+        rq.ReplyCode(),
+        rq.Pad(1),
+        rq.Card16('sequence_number'),
+        rq.ReplyLength(),
+        rq.LengthOf('atoms', 2),
+        rq.Pad(22),
+        rq.List('atoms', rq.Card32Obj),
+    )
+
+def list_device_properties(self, deviceid):
+    return XIListProperties(
+        display=self.display,
+        opcode=self.display.get_extension_major(extname),
+        deviceid=deviceid,
+    )
+
+class XIGetProperty(rq.ReplyRequest):
+    _request = rq.Struct(
+        rq.Card8('opcode'),
+        rq.Opcode(59),
+        rq.RequestLength(),
+        DEVICEID('deviceid'),
+        rq.Card8('delete'),
+        rq.Pad(1),
+        rq.Card32('property'),
+        rq.Card32('type'),
+        rq.Card32('offset'),
+        rq.Card32('length'),
+    )
+
+    _reply = rq.Struct(
+        rq.ReplyCode(),
+        rq.Pad(1),
+        rq.Card16('sequence_number'),
+        rq.ReplyLength(),
+        rq.Card32('type'),
+        rq.Card32('bytes_after'),
+        rq.LengthOf('value', 4),
+        rq.Format('value', 1),
+        rq.Pad(11),
+        rq.PropertyData('value')
+    )
+
+def get_device_property(self, deviceid, property, type, offset, length, 
delete=False):
+    return XIGetProperty(
+        display=self.display,
+        opcode=self.display.get_extension_major(extname),
+        deviceid=deviceid,
+        property=property,
+        type=type,
+        offset=offset,
+        length=length,
+        delete=delete,
+    )
+
+class XIChangeProperty(rq.Request):
+    _request = rq.Struct(
+        rq.Card8('opcode'),
+        rq.Opcode(57),
+        rq.RequestLength(),
+        DEVICEID('deviceid'),
+        rq.Card8('mode'),
+        rq.Format('value', 1),
+        rq.Card32('property'),
+        rq.Card32('type'),
+        rq.LengthOf('value', 4),
+        rq.PropertyData('value'),
+    )
+
+def change_device_property(self, deviceid, property, type, mode, value):
+    return XIChangeProperty(
+        display=self.display,
+        opcode=self.display.get_extension_major(extname),
+        deviceid=deviceid,
+        property=property,
+        type=type,
+        mode=mode,
+        value=value,
+    )
+
+class XIDeleteProperty(rq.Request):
+    _request = rq.Struct(
+        rq.Card8('opcode'),
+        rq.Opcode(58),
+        rq.RequestLength(),
+        DEVICEID('deviceid'),
+        rq.Pad(2),
+        rq.Card32('property'),
+    )
+
+def delete_device_property(self, deviceid, property):
+    return XIDeleteProperty(
+        display=self.display,
+        opcode=self.display.get_extension_major(extname),
+        deviceid=deviceid,
+        property=property,
+    )
+
 class XIGrabDevice(rq.ReplyRequest):
     _request = rq.Struct(
         rq.Card8('opcode'),
@@ -639,6 +749,14 @@
     rq.List('classes', ClassInfo),
 )
 
+PropertyEventData = rq.Struct(
+    DEVICEID('deviceid'),
+    rq.Card32('time'),
+    rq.Card32('property'),
+    rq.Card8('what'),
+    rq.Pad(11),
+)
+
 def init(disp, info):
     disp.extension_add_method('display', 'xinput_query_version', query_version)
     disp.extension_add_method('window', 'xinput_select_events', select_events)
@@ -647,8 +765,13 @@
     disp.extension_add_method('display', 'xinput_ungrab_device', ungrab_device)
     disp.extension_add_method('window', 'xinput_grab_keycode', grab_keycode)
     disp.extension_add_method('window', 'xinput_ungrab_keycode', 
ungrab_keycode)
+    disp.extension_add_method('display', 'xinput_get_device_property', 
get_device_property)
+    disp.extension_add_method('display', 'xinput_list_device_properties', 
list_device_properties)
+    disp.extension_add_method('display', 'xinput_change_device_property', 
change_device_property)
+    disp.extension_add_method('display', 'xinput_delete_device_property', 
delete_device_property)
     if hasattr(disp,"ge_add_event_data"):
         for device_event in (ButtonPress, ButtonRelease, KeyPress, KeyRelease, 
Motion):
             disp.ge_add_event_data(info.major_opcode, device_event, 
DeviceEventData)
         disp.ge_add_event_data(info.major_opcode, DeviceChanged, 
DeviceEventData)
         disp.ge_add_event_data(info.major_opcode, HierarchyChanged, 
HierarchyEventData)
+        disp.ge_add_event_data(info.major_opcode, PropertyEvent, 
PropertyEventData)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/doc/src/objects.texi 
new/python-xlib-0.31/doc/src/objects.texi
--- old/python-xlib-0.29/doc/src/objects.texi   2019-02-03 22:05:24.000000000 
+0100
+++ new/python-xlib-0.31/doc/src/objects.texi   2021-05-15 20:11:33.000000000 
+0200
@@ -1175,7 +1175,7 @@
 @end defmethod
 
 @defmethod Window get_wm_class ( )
-Returns None or (isntance, class)
+Returns None or (instance, class)
 @end defmethod
 
 @defmethod Window set_wm_transient_for ( window, onerror = None )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/examples/run_examples.py 
new/python-xlib-0.31/examples/run_examples.py
--- old/python-xlib-0.29/examples/run_examples.py       2016-08-13 
10:06:03.000000000 +0200
+++ new/python-xlib-0.31/examples/run_examples.py       2021-05-15 
20:11:33.000000000 +0200
@@ -77,6 +77,10 @@
         """ Run xlsatoms.py -- show list atoms on X server """
         self.assertEqual(run_example(examples_folder + "xlsatoms.py"), 0)
 
+    def test_xres(self):
+        """ Run xres.py -- demonstrate the X-Resource extension """
+        self.assertEqual(run_example(examples_folder + "xres.py"), 0)
+
 
 if __name__ == '__main__':
     unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/examples/xres.py 
new/python-xlib-0.31/examples/xres.py
--- old/python-xlib-0.29/examples/xres.py       1970-01-01 01:00:00.000000000 
+0100
+++ new/python-xlib-0.31/examples/xres.py       2021-05-15 20:11:33.000000000 
+0200
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+#
+# examples/xres.py -- demonstrate the X-Resource extension
+#
+#    Copyright (C) 2021 Aleksei Bavshin <alebast...@gmail.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+#    Free Software Foundation, Inc.,
+#    51 Franklin Street,
+#    Fifth Floor,
+#    Boston, MA 02110-1301 USA
+
+import os
+import sys
+
+# Change path so we find Xlib
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
+
+from Xlib.display import Display
+from Xlib.ext import res as XRes
+
+
+def check_ext(disp, extname, version):
+    if disp.query_extension(extname) is None:
+        raise AssertionError("Server has {} extension".format(extname))
+
+    r = disp.res_query_version()
+    if (r.server_major, r.server_minor) < version:
+        raise AssertionError(
+            "Server has requested version {} of {} extension".format(version, 
extname)
+        )
+
+
+def query_client_id(display, wid):
+    specs = [{"client": wid, "mask": XRes.LocalClientPIDMask}]
+    r = display.res_query_client_ids(specs)
+    for id in r.ids:
+        if id.spec.client > 0 and id.spec.mask == XRes.LocalClientPIDMask:
+            for value in id.value:
+                return value
+    return None
+
+
+def print_client_info(disp, client):
+    print("client: {}".format(client))
+
+    resources = disp.res_query_client_resources(client)
+    rc = [r.count for r in resources.types]
+    print("\tresouces: {} resources of {} types".format(sum(rc), len(rc)))
+
+    pb = disp.res_query_client_pixmap_bytes(client)
+    print("\tpixmaps: {} bytes {} overflow".format(pb.bytes, 
pb.bytes_overflow))
+
+    pid = query_client_id(disp, client)
+    print("\tpid: {}".format(pid))
+
+    rb = disp.res_query_resource_bytes(client, [{"resource": 0, "type": 0}])
+    sizes = [s.size.bytes for s in rb.sizes]
+    print("\t{} resources consume {} bytes".format(len(sizes), sum(sizes)))
+
+
+def main():
+    display = Display()
+    check_ext(display, XRes.extname, (1, 2))
+
+    clients = display.res_query_clients().clients
+    print("{} clients connected to the server".format(len(clients)))
+
+    for client in clients:
+        print_client_info(display, client.resource_base)
+
+
+if __name__ == "__main__":
+    main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/python_xlib.egg-info/PKG-INFO 
new/python-xlib-0.31/python_xlib.egg-info/PKG-INFO
--- old/python-xlib-0.29/python_xlib.egg-info/PKG-INFO  2020-11-22 
12:59:45.000000000 +0100
+++ new/python-xlib-0.31/python_xlib.egg-info/PKG-INFO  2021-07-02 
12:32:11.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-xlib
-Version: 0.29
+Version: 0.31
 Summary: Python X Library
 Home-page: https://github.com/python-xlib/python-xlib
 Author: Peter Liljenberg
@@ -102,7 +102,7 @@
         There is a resource database implementation, ICCCM support and a
         framework for adding X extension code. Several extensions have been
         implemented (RECORD, SHAPE, Xinerama, Composite, RANDR, DAMAGE,
-        Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL and DPMS);
+        Generic Event, SECURITY, XFIXES, XInput, XTEST, NV-CONTROL, DPMS and 
XRes);
         patches for additions are very welcome.
         
         There are most likely still bugs, but the library is at least stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-xlib-0.29/python_xlib.egg-info/SOURCES.txt 
new/python-xlib-0.31/python_xlib.egg-info/SOURCES.txt
--- old/python-xlib-0.29/python_xlib.egg-info/SOURCES.txt       2020-11-22 
12:59:45.000000000 +0100
+++ new/python-xlib-0.31/python_xlib.egg-info/SOURCES.txt       2021-07-02 
12:32:11.000000000 +0200
@@ -33,6 +33,7 @@
 Xlib/ext/nvcontrol.py
 Xlib/ext/randr.py
 Xlib/ext/record.py
+Xlib/ext/res.py
 Xlib/ext/security.py
 Xlib/ext/shape.py
 Xlib/ext/xfixes.py
@@ -119,6 +120,7 @@
 examples/xinput.py
 examples/xlsatoms.py
 examples/xrandr.py
+examples/xres.py
 python_xlib.egg-info/PKG-INFO
 python_xlib.egg-info/SOURCES.txt
 python_xlib.egg-info/dependency_links.txt

Reply via email to