Update to 2.30.0

This commit is contained in:
Kalev Lember 2018-09-06 10:10:35 +02:00
parent a1d5037b30
commit d0ac8aa0b7
4 changed files with 8 additions and 90 deletions

1
.gitignore vendored
View File

@ -58,3 +58,4 @@ pyatspi-0.3.6.tar.bz2
/pyatspi-2.25.2.tar.xz
/pyatspi-2.25.3.tar.xz
/pyatspi-2.26.0.tar.xz
/pyatspi-2.30.0.tar.xz

View File

@ -1,82 +0,0 @@
From b2ebbe79b2208ed72f78711ef6204e9c7f3aee70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 28 Jun 2018 17:10:33 +0200
Subject: [PATCH] Rename async to asynchronous, keep backwards comaptibility
async is a keyword in Python 3.7 and keeping it results in SyntaxError.
Fixes https://gitlab.gnome.org/GNOME/pyatspi2/issues/1
---
pyatspi/registry.py | 35 +++++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 8 deletions(-)
diff --git a/pyatspi/registry.py b/pyatspi/registry.py
index cb28395..7256ab6 100644
--- a/pyatspi/registry.py
+++ b/pyatspi/registry.py
@@ -50,9 +50,9 @@ class Registry(object):
reference to the Accessibility.Registry singleton. Doing so is harmless and
has no point.
- @@ivar async: Should event dispatch to local listeners be decoupled from event
- receiving from the registry?
- @@type async: boolean
+ @@ivar asynchronous: Should event dispatch to local listeners be decoupled
+ from event receiving from the registry?
+ @@type asynchronous: boolean
@@ivar reg: Reference to the real, wrapped registry object
@@type reg: Accessibility.Registry
@@ivar dev: Reference to the device controller
@@ -111,25 +111,44 @@ class Registry(object):
self.has_implementations = True
- self.async = False # not fully supported yet
+ self.asynchronous = False # not fully supported yet
self.started = False
self.event_listeners = dict()
+ def __getattr__(self, name):
+ """
+ For backwards compatibility with old API
+ """
+ if name == 'async':
+ return self.asynchronous
+ return object.__getattr__(self, name)
+
+ def __setattr__(self, name, value):
+ """
+ For backwards compatibility with old API
+ """
+ if name == 'async':
+ self.asynchronous = value
+ object.__setattr__(self, name, velue)
+
def _set_default_registry (self):
self._set_registry (MAIN_LOOP_GLIB)
- def start(self, async=False, gil=True):
+ def start(self, asynchronous=False, gil=True, **kwargs):
"""
Enter the main loop to start receiving and dispatching events.
- @@param async: Should event dispatch be asynchronous (decoupled) from
- event receiving from the AT-SPI registry?
- @@type async: boolean
+ @@param asynchronous: Should event dispatch be asynchronous
+ (decoupled) from event receiving from the AT-SPI registry?
+ @@type asynchronous: boolean
@@param gil: Add an idle callback which releases the Python GIL for a few
milliseconds to allow other threads to run? Necessary if other threads
will be used in this process.
@@type gil: boolean
"""
+ if 'async' in kwargs:
+ # support previous API
+ asynchronous = kwargs['async']
if not self.has_implementations:
self._set_default_registry ()
self.started = True
--
2.17.0

View File

@ -1,18 +1,14 @@
%global debug_package %{nil}
Name: pyatspi
Version: 2.26.0
Release: 7%{?dist}
Version: 2.30.0
Release: 1%{?dist}
Summary: Python bindings for at-spi
Group: Development/Languages
License: LGPLv2 and GPLv2
URL: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
#VCS: git:git://git.gnome.org/pyatspi
Source0: http://download.gnome.org/sources/pyatspi/2.26/%{name}-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/pyatspi2/merge_requests/3
Patch0: 0001-Rename-async-to-asynchronous-keep-backwards-comaptib.patch
Source0: http://download.gnome.org/sources/pyatspi/2.30/%{name}-%{version}.tar.xz
BuildRequires: python2-devel
# For tests
@ -130,6 +126,9 @@ sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' python3-examples/magFocusTracker.
%changelog
* Thu Sep 06 2018 Kalev Lember <klember@redhat.com> - 2.30.0-1
- Update to 2.30.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.26.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (pyatspi-2.26.0.tar.xz) = a1aa7e608fa95bdf4c891666fe5038dd2fd7cc7e675cef4c9759ffed4f6342e3cebbc6d5fad8899c0c91eda29664a5f8ff06a1cb0ab46958c8f629cd014d3579
SHA512 (pyatspi-2.30.0.tar.xz) = a7af81bb55dff45d1bceced645f6aeb1adc1fa2a2b61fc39d9e97b6659e474636e5ac1af9923588311e651fee57b5e31a62ea5b2977b341eda43a5a736bf27ed