After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796709 - Submitting bug gives me error 500
Submitting bug gives me error 500
Status: RESOLVED DUPLICATE of bug 744491
Product: bugzilla.gnome.org
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Bugzilla Maintainers
Bugzilla Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-28 14:21 UTC by Miro Hrončok
Modified: 2018-06-28 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Miro Hrončok 2018-06-28 14:21:17 UTC
I try to submit bug for pyatspi2, but I got error 500.
Comment 1 Miro Hrončok 2018-06-28 14:22:09 UTC
In: https://bugzilla.gnome.org/enter_bug.cgi?product=pyatspi2

Summary: pyatspi is not Python 3.7 compatible

Description:

pyatspi extensively uses "async" as a attribute/argument name:

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

This results in:

  • 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

Fedora reproducer: fedpkg build --target=f29-python -> https://koji.fedoraproject.org/koji/taskinfo?taskID=27887876


This needs to be renamed. But it kinda seems like part of an API, if that's true, it's a good idea to provide a backwards compatible API as well. 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"""


Fedora bug for cross reference:  https://bugzilla.redhat.com/show_bug.cgi?id=1596269
Comment 2 Miro Hrončok 2018-06-28 14:34:10 UTC
The mass migration from Bugzilla to GitLab might be the factor. I've open an issue on gitlab instead.
Comment 3 André Klapper 2018-06-28 15:01:40 UTC

*** This bug has been marked as a duplicate of bug 744491 ***