Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1596269 - pyatspi is not Python 3.7 compatible, it FTBFS
Summary: pyatspi is not Python 3.7 compatible, it FTBFS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pyatspi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON37 1596291
TreeView+ depends on / blocked
 
Reported: 2018-06-28 13:48 UTC by Miro Hrončok
Modified: 2018-06-28 20:57 UTC (History)
3 users (show)

Fixed In Version: pyatspi-2.26.0-6.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 20:57:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2018-06-28 13:48:49 UTC
Description of problem:
pyatspi extensively sues async as a attribute/argument name:

https://github.com/GNOME/pyatspi2/blob/150e7b386736d41ed3b95a5d691879e0a3246f57/pyatspi/registry.py#L114
(and below that as well).

Version-Release number of selected component: pyatspi-2.26.0-6.fc29

https://koji.fedoraproject.org/koji/taskinfo?taskID=27887876

  File "/usr/lib/python3.7/site-packages/pyatspi/registry.py", line 114
    self.async = False	# not fully supported yet
             ^
SyntaxError: invalid syntax

https://docs.python.org/3/whatsnew/3.7.html#summary-release-highlights

Reproducer: fedpkg build --target=f29-python


This seems like part of an API, so please coordinate with upstream to rename this. 

I have a decorator that might be useful for this (consider it Public Domain or CC0):


    from functools import wraps
    
    
    def deprecated_async(func):
        """A decorator, that let's us keep our old API, but deprecate it"""
        @wraps(func)
        def inner(*args, **kwargs):
            if 'async' in kwargs:
                if 'asynchronous' in kwargs:
                    raise ValueError('cannot use both async and asynchronous '
                                     'keyword arguments! the latter obsoletes the first.')
                warnings.warn('async keyword argumnt is deprecated, '
                              'use asynchronous instead', DeprecationWarning)
                kwargs['asynchronous'] = kwargs.pop('async')
            return func(*args, **kwargs)
        return inner
    
    
    @deprecated_async
    def awesome_func(foo, bar, asynchronous=False):
        """People can pass async or asynchronous"""


This block orca.

Comment 1 Miro Hrončok 2018-06-28 14:20:20 UTC
I'm trying to file an upstream bug, but their bugzilla gives me error 500.

Comment 2 Miro Hrončok 2018-06-28 14:35:49 UTC
Reported at GNOME gitlab: https://gitlab.gnome.org/GNOME/pyatspi2/issues/1

Comment 3 Miro Hrončok 2018-06-28 15:21:14 UTC
Upstream merge request: https://gitlab.gnome.org/GNOME/pyatspi2/merge_requests/3

Comment 4 Miro Hrončok 2018-06-28 16:08:53 UTC
Scratch build with the pacth. https://koji.fedoraproject.org/koji/taskinfo?taskID=27920864

Comment 5 Miro Hrončok 2018-06-28 16:43:23 UTC
accerciser is in bz1596291

orca, python3-caribou and python3-dogtail don't use the async keyword argument.

Comment 7 Kalev Lember 2018-06-28 20:57:42 UTC
Thanks! I've merged the PR and kicked off a build.


Note You need to log in before you can comment on or make changes to this bug.