It timeouts on trying to re-login. The reason being that the VCRed response contains a username which does not match the value of site.user(). See https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/data/api.py;d23f618a685394b3ae21b43e14db1f11a1fe10a5$2016
The above patch will also resolve the issue of warnings not being ignored on Windows os because of the difference in os.path.sep.
The test still fails from time to time, the new traceback is:
Sat, Jan 20
Simply adding setuptools_scm ; python_version == '2.6' to requirement.txt does not work. Because requirements.txt is not installed on appveyor builds. We may use dev-requirements.txt instead.
Sounds like https://github.com/pypa/setuptools_scm/issues/209
They've suggested to install setuptools_scm by pip as a temporary workaround.
Fri, Jan 19
There is also another change request at https://gerrit.wikimedia.org/r/#/c/399348/. I had tested it on travis and it too seems to pass the travis tests. I'll probably will suggest to revert the one above.
The issue has appear after 9a13055ce9c130d832ebd273681e7bf4d5dd71a7.
We are already igoring disruptive resource warnings in WarningSourceSkipContextManager. But I'm not sure if it's a good idea to ignore all resource warnings, even the harmless ones like this. May reopen in the future if required.
Thu, Jan 18
Wed, Jan 17
====================================================================== ERROR: test_petscan (tests.pagegenerators_tests.PetScanPageGeneratorTestCase) Test PetScanPageGenerator. ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\projects\pywikibot-g4xqx\tests\pagegenerators_tests.py", line 366, in test_petscan 'User:Sn1per/ProtectTest2'), site=site) File "c:\projects\pywikibot-g4xqx\tests\aspects.py", line 270, in assertPageTitlesEqual gen_titles = self._get_gen_titles(gen, len(titles), site) File "c:\projects\pywikibot-g4xqx\tests\aspects.py", line 203, in _get_gen_titles gen_pages = self._get_gen_pages(gen, count, site) File "c:\projects\pywikibot-g4xqx\tests\aspects.py", line 184, in _get_gen_pages gen_pages = list(gen) File "c:\projects\pywikibot-g4xqx\pywikibot\pagegenerators.py", line 2924, in __iter__ for raw_page in self.query(): File "c:\projects\pywikibot-g4xqx\pywikibot\pagegenerators.py", line 2918, in query j = json.loads(req.content) File "c:\python36-x64\Lib\json\__init__.py", line 354, in loads return _default_decoder.decode(s) File "c:\python36-x64\Lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "c:\python36-x64\Lib\json\decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0
Tue, Jan 16
Upstream issue: https://github.com/kevin1024/vcrpy/issues/342
However we can fix this by amending the requirements.
We also recently had another ResourceWarning in cookiejar.py:
Mon, Jan 15
The tasks seem unrelated.
Sat, Jan 13
Thu, Jan 11
Wed, Jan 10
As it stands, you should add verbose_output = 2 to user-config.py or pass it as a parameter on command line. Otherwise it won't go through init_handlers which configures warnings.