Xqt reopened this task as "Open".
Xqt added a comment.

  There are still some other tests failing:
  
    =================================== FAILURES 
===================================
    ______________________ TestOauthLoginManger.test_identity 
______________________
    
    self = <tests.oauth_tests.TestOauthLoginManger testMethod=test_identity>
    
        def test_identity(self):
            """Test identity."""
    >       login_manager = self._get_login_manager()
    
    tests/oauth_tests.py:78: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    tests/oauth_tests.py:64: in _get_login_manager
        user=self.consumer_token[0])
    pywikibot/tools/__init__.py:1744: in wrapper
        return obj(*__args, **__kw)
    pywikibot/login.py:380: in __init__
        super(OauthLoginManager, self).__init__(None, False, site, None)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    
    __args = (<pywikibot.login.OauthLoginManager object at 0x7fc6f2aeffd0>, 
None, False, APISite("en", "wpbeta"), None)
    __kw = {}, name = 'pywikibot.login.LoginManager.__init__', depth = 2
    old_arg = 'sysop', new_arg = None
    output_args = {'name': 'pywikibot.login.LoginManager.__init__', 'new_arg': 
None, 'old_arg': 'sysop'}
    
        def wrapper(*__args, **__kw):
            """Replacement function.
        
            @param __args: args passed to the decorated function
            @param __kw: kwargs passed to the decorated function
            @return: the value returned by the decorated function
            @rtype: any
            """
            name = obj.__full_name__
            depth = get_wrapper_depth(wrapper) + 1
            for old_arg, new_arg in arg_pairs.items():
                output_args = {
                    'name': name,
                    'old_arg': old_arg,
                    'new_arg': new_arg,
                }
                if old_arg in __kw:
                    if new_arg not in [True, False, None]:
                        if new_arg in __kw:
                            warn('%(new_arg)s argument of %(name)s '
                                 'replaces %(old_arg)s; cannot use both.'
                                 % output_args,
                                 RuntimeWarning, depth)
                        else:
                            # If the value is positionally given this will
                            # cause a TypeError, which is intentional
                            warn('%(old_arg)s argument of %(name)s '
                                 'is deprecated; use %(new_arg)s instead.'
                                 % output_args,
                                 DeprecationWarning, depth)
                            __kw[new_arg] = __kw[old_arg]
                    else:
                        if new_arg is False:
                            cls = PendingDeprecationWarning
                        else:
                            cls = DeprecationWarning
                        warn('%(old_arg)s argument of %(name)s is deprecated.'
                             % output_args,
                             cls, depth)
                    del __kw[old_arg]
    >       return obj(*__args, **__kw)
    E       TypeError: __init__() takes at most 4 arguments (5 given)
    
    pywikibot/tools/__init__.py:1744: TypeError
    _______________________ TestOauthLoginManger.test_login 
________________________
    
    self = <tests.oauth_tests.TestOauthLoginManger testMethod=test_login>
    
        def test_login(self):
            """Test login."""
    >       login_manager = self._get_login_manager()
    
    tests/oauth_tests.py:71: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    tests/oauth_tests.py:64: in _get_login_manager
        user=self.consumer_token[0])
    pywikibot/tools/__init__.py:1744: in wrapper
        return obj(*__args, **__kw)
    pywikibot/login.py:380: in __init__
        super(OauthLoginManager, self).__init__(None, False, site, None)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    
    __args = (<pywikibot.login.OauthLoginManager object at 0x7fc6f2a03f50>, 
None, False, APISite("en", "wpbeta"), None)
    __kw = {}, name = 'pywikibot.login.LoginManager.__init__', depth = 2
    old_arg = 'sysop', new_arg = None
    output_args = {'name': 'pywikibot.login.LoginManager.__init__', 'new_arg': 
None, 'old_arg': 'sysop'}
    
        def wrapper(*__args, **__kw):
            """Replacement function.
        
            @param __args: args passed to the decorated function
            @param __kw: kwargs passed to the decorated function
            @return: the value returned by the decorated function
            @rtype: any
            """
            name = obj.__full_name__
            depth = get_wrapper_depth(wrapper) + 1
            for old_arg, new_arg in arg_pairs.items():
                output_args = {
                    'name': name,
                    'old_arg': old_arg,
                    'new_arg': new_arg,
                }
                if old_arg in __kw:
                    if new_arg not in [True, False, None]:
                        if new_arg in __kw:
                            warn('%(new_arg)s argument of %(name)s '
                                 'replaces %(old_arg)s; cannot use both.'
                                 % output_args,
                                 RuntimeWarning, depth)
                        else:
                            # If the value is positionally given this will
                            # cause a TypeError, which is intentional
                            warn('%(old_arg)s argument of %(name)s '
                                 'is deprecated; use %(new_arg)s instead.'
                                 % output_args,
                                 DeprecationWarning, depth)
                            __kw[new_arg] = __kw[old_arg]
                    else:
                        if new_arg is False:
                            cls = PendingDeprecationWarning
                        else:
                            cls = DeprecationWarning
                        warn('%(old_arg)s argument of %(name)s is deprecated.'
                             % output_args,
                             cls, depth)
                    del __kw[old_arg]
    >       return obj(*__args, **__kw)
    E       TypeError: __init__() takes at most 4 arguments (5 given)
    
    pywikibot/tools/__init__.py:1744: TypeError

TASK DETAIL
  https://phabricator.wikimedia.org/T237501

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Huji, Aklapper, Xqt, pywikibot-bugs-list, Zkhalido, Viztor, DannyS712, 
Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to