Page MenuHomePhabricator

compat emits NameError in user-config.py when it contains values appropriate for core
Closed, DeclinedPublic

Description

The 'core' user-config.py might include debug_log.append("") , to set debug.

However if this same user-config is used for compat, it creates a NameError.

compat$ python pwb.py shell
Traceback (most recent call last):
  File "pwb.py", line 50, in <module>
    import userlib
  File "userlib.py", line 13, in <module>
    import wikipedia as pywikibot
  File "wikipedia.py", line 172, in <module>
    from pywikibot.support import *
  File "pywikibot/support.py", line 15, in <module>
    from exceptions import *
  File "exceptions.py", line 14, in <module>
    import config
  File "config.py", line 606, in <module>
    exec open(_filename, 'r').read()
  File "<string>", line 15, in <module>
NameError: name 'debug_log' is not defined

There are probably other core only variables which are not supported in compat.

Event Timeline

jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot-compat.
jayvdb subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptApr 4 2015, 2:26 AM
Xqt lowered the priority of this task from High to Medium.May 14 2015, 9:48 AM
Xqt subscribed.

downgraded because it is compat and rarely used wrapper script.

Aklapper lowered the priority of this task from Medium to Lowest.Jun 5 2015, 1:41 PM

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out https://www.mediawiki.org/wiki/Manual:Pywikibot/Development Thank you for your understanding.

Declined due to decommission of compat branch.