Multichill created this task. Multichill added a subscriber: Multichill. Multichill added projects: Pywikibot-textlib.py, pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION Python 2.6.6 is supported, see https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Downloading_Pyt... , so why the hell are we using features that are not part of python 2.6 in core?!?!? I'm on a Redhat install where Python 2.6.6 is still the default python and next to impossible to upgrade without disturbing other things on the system.
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Multichill Cc: pywikipedia-bugs, Aklapper, Multichill, jayvdb
jayvdb edited the task description. jayvdb set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: pywikipedia-bugs, Aklapper, Multichill, jayvdb
XZise added a subscriber: XZise. XZise added a comment.
Could you elaborate?!
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Aklapper, Multichill, jayvdb, pywikipedia-bugs
XZise added a blocked task: T72987: py2.6 bugs [tracking].
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Aklapper, Multichill, jayvdb, pywikipedia-bugs
jayvdb added a subscriber: jayvdb. jayvdb added a comment.
What is the problem you saw? We run the full test suite against Python 2.6.9 on Travis. I am now running Win32 and Win64 Python 2.6.6 tests on Appveyor. https://ci.appveyor.com/project/jayvdb/pywikibot-core/build/1.0.py2.6.6.66
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
XZise added a comment.
Can't reproduce, I've installed 2.6.6 locally and I didn't get any textlib related errors (I got a Python 2.6 specific one, one related to a broken wiki and the script tests didn't work because of an insecure python egg directory).
====================================================================== ERROR: test_valid_entities (tests.page_tests.HtmlEntity) Test valid entities. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/xzise/Programms/pywikibot/core/tests/page_tests.py", line 871, in test_valid_entities self.assertEqual(pywikibot.page.html2unicode('𐀀'), u'\U00010000') File "/home/xzise/Programms/pywikibot/core/pywikibot/page.py", line 4881, in html2unicode return entityR.sub(handle_entity, text) File "/home/xzise/Programms/pywikibot/core/pywikibot/page.py", line 4875, in handle_entity return eval("'\U{:08x}'".format(unicodeCodepoint)) ValueError: zero length field name in format
====================================================================== FAIL: testSearch (tests.site_tests.SiteUserTestCase) Test the site.search() method. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/xzise/Programms/pywikibot/core/tests/site_tests.py", line 1000, in testSearch self.assertTrue(all(hit.namespace() == 0 for hit in se)) AssertionError: False is not true
====================================================================== FAIL: test__login_help (tests.script_tests.TestScript) Test running login -help ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/xzise/Programms/pywikibot/core/tests/script_tests.py", line 278, in testScript self.assertIsNone(stderr_other) AssertionError: [u'WARNING: /home/xzise/.pyenv/versions/2.6.6/lib/python2.6/site-packages/setuptools-15.2-py2.6.egg/pkg_resources/__init__.py:1250: UserWarning: /home/xzise/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).', u'', u''] is not None
And is the tone necessary in the bug report? Considering that the information is very vague (textlib and 2.6.6, but what in textlib?) I think it's inappropriate. When at some point we broke compatibility then it happened and we need to fix that (or drop support for it) but starting the issue that way does not help your cause.
The appveyor build is a bust so you need to give more information like a stack trace or similar.
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
jayvdb added a comment.
In https://phabricator.wikimedia.org/T90156#1254947, @XZise wrote:
The appveyor build is a bust so you need to give more information like a stack trace or similar.
Hopefully fixed that build setup problem; new build underway
https://ci.appveyor.com/project/jayvdb/pywikibot-core/build/1.0.appveyor-mor...
TASK DETAIL https://phabricator.wikimedia.org/T90156
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
Multichill added a comment.
We managed to reproduce the bug. It's caused by the check if a bot is allowed to edit. Talked with Jay about this. Nice solution would be to check if the template actually exists before trying to parse a page with textlib
TASK DETAIL https://phabricator.wikimedia.org/T90156
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Multichill Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
XZise added a comment.
So… is that now a Python 2.6.6 specific problem? And where and how does it fail now? When it tries to parse the text and extract the templates? Because that is the only usage of `textlib` via `botMayEdit` and that doesn't need to know which templates actually exist on that wiki. So it can't be fixed by checking if the template actually exist and it would only hide the problem.
TASK DETAIL https://phabricator.wikimedia.org/T90156
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
XZise added a comment.
I tested Python 2.6.6 on a wiki without Bots and Nobots template and botMayEdit worked if you've installed the `future` package:
Python 2.6.6 (r266:84292, May 3 2015, 02:23:05) [GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux3 Type "help", "copyright", "credits" or "license" for more information.
import pywikibot s = pywikibot.Site() pywikibot.Page(s, 'Template:Bots').exists()
False
pywikibot.Page(s, 'Template:Nobots').exists()
False
pywikibot.Page(s, 'Main Page').botMayEdit()
True
So is this bug report actually about the fact that you need the `future` package in Python 2.6 (or that pywikibot needs `OrderedDict`)? Or did I misunderstand that update?
TASK DETAIL https://phabricator.wikimedia.org/T90156
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, Aklapper, Multichill, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org