r9646 pywikipedia - Code Review archive

Repository:pywikipedia
Revision:r9645‎ | r9646 | r9647 >
Date:10:55, 22 October 2011
Author:xqt
Status:old
Tags:
Comment:
rewrite release
Modified paths:
  • /branches/rewrite/scripts/version.py (modified) (history)

Diff [purge]

Index: branches/rewrite/scripts/version.py
@@ -11,7 +11,7 @@
1212 import os
1313 import time
1414 import sys
15 -import config
 15+from pywikibot import config2 as config
1616
1717 cache = None
1818
@@ -31,8 +31,8 @@
3232 try:
3333 (tag, rev, date) = getversion_nightly()
3434 except Exception, e:
35 - import wikipedia
36 - version = wikipedia.__version__
 35+ import pywikibot
 36+ version = pywikibot.__version__
3737 if len(version) == 4:
3838 # the value is most likely '$Id' + '$', it means that
3939 # wikipedia.py got imported without using svn at all
@@ -42,7 +42,7 @@
4343 id, file, rev, date, ts, author, dollar = version.split(' ')
4444 tag = ''
4545 date = time.strptime('%sT%s' % (date, ts), '%Y-%m-%dT%H:%M:%SZ')
46 - rev += ' (wikipedia.py)'
 46+ rev += ' (pywikibot.py)'
4747 datestring = time.strftime('%Y/%m/%d, %H:%M:%S', date)
4848 cache = dict(tag=tag, rev=rev, date=datestring)
4949 return cache
@@ -76,11 +76,8 @@
7777 return (tag, rev, date)
7878
7979 if __name__ == '__main__':
80 - print 'Pywikipedia %s' % getversion()
 80+ print 'Pywikibot %s' % getversion()
8181 print 'Python %s' % sys.version
82 - print 'config-settings:'
83 - print 'use_api =', config.use_api
84 - print 'use_api_login =', config.use_api_login
8582 if not __import__('unicodedata').normalize('NFC', u'\u092e\u093e\u0930\u094d\u0915 \u091c\u093c\u0941\u0915\u0947\u0930\u092c\u0930\u094d\u0917') == u'\u092e\u093e\u0930\u094d\u0915 \u091c\u093c\u0941\u0915\u0947\u0930\u092c\u0930\u094d\u0917':
8683 print u'unicode test: triggers problem #3081100'
8784 else:

Status & tagging log