Xqt created this task.
Xqt added a project: Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
Restricted Application added a project: Pywikibot.

TASK DESCRIPTION
    =================================== FAILURES 
===================================
    ________________ TestRepeatingGenerator.test_RepeatingGenerator 
________________
    
    self = <tests.pagegenerators_tests.TestRepeatingGenerator 
testMethod=test_RepeatingGenerator>
    
        def test_RepeatingGenerator(self):
            """Test RepeatingGenerator."""
            with suppress_warnings(category=DeprecationWarning):
                gen = pagegenerators.RepeatingGenerator(
                    self.site.recentchanges,
                    key_func=lambda x: x['revid'],
                    sleep_duration=10,
                    reverse=True,
                    namespaces=[0],
                    total=self.length)
    >       items = list(gen)
    
    tests/pagegenerators_tests.py:406: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    pywikibot/pagegenerators.py:2188: in RepeatingGenerator
        yield from reversed(list(filtered_generator()))
    pywikibot/pagegenerators.py:2186: in filtered_generator
        pywikibot.sleep(sleep_duration)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    
    secs = 10
    
        def sleep(secs):
            """Suspend execution of the current thread for the given number of 
seconds.
        
            Drop this process from the throttle log if wait time is greater than
            30 seconds.
            """
            if secs >= 30:
                stopme()
    >       time.sleep(secs)
    E       Failed: Timeout >300.0s
    
    pywikibot/__init__.py:1311: Failed
    ------------------------------ Captured log call 
-------------------------------
    VERBOSE  pywiki:logging.py:103 Found 1 wikipedia:test2 processes running, 
including this one.
  
  https://api.travis-ci.org/v3/job/715494867/log.txt
  
  I tried to find out the problem. Test result in an inifite loop which always 
found the first entry in the filtered_generator. The most revid entries which 
is used for the key is 0. Using rcid instead does not help for this test, it 
still loops. removing the break inside the filtered_generator helps but the 
sorting order of timestamps fails for test2 (as well as for de-wiki but it 
works at en-wiki and test)
  
  I result I fear either the generator or the test works wrong. The generator 
was deprecated for 2 years in favour of EventStreams and I propose to remove it.

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

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

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to