Use site.has_right which is cached


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11257 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Simplify logic, None > 0 is always false


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11258 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
PEP8 fixes


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11259 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
General cleanup:
*Move ssl logic out of try block
*PEP8 fixes
*Fix wrong variable w/ prop=info


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11260 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Re-organize imports and PEP8 fixes


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11261 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Re-implement showPatrolled option for site.recentchanges.
Also reorganized imports and PEP8 fixes


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11262 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Update unit tests, remove deprecated test


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11263 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Fix interwiki_putfirst unittests, fix patrol tests after r11262.


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11264 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Start Wikibase unittests, minor PEP8 fix


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11265 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Use assertType from site_tests.py, PEP8 fixes, +1 wikibase test


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11266 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Have CategorizedPageGenerator implement sortkey with API


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11267 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
update disambiguationTemplates fromtrunk r11272

git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11273 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
update disambiguationTemplates

git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11274 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Override _sites cache if instance does not match. This will solve the following:
>>> import pwb
>>> import pywikibot as wp
>>> s = wp.Site('wikidata', 'wikidata')
>>> s
Site("wikidata", "wikidata")
>>> s = wp.Site('wikidata', 'wikidata', interface='DataSite')
>>> s
DataSite("wikidata", "wikidata")
>>> 
here the second instantation returns the right class whereas the previous cached object would be Site("wikidata", "wikidata")

git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11276 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Fix references to pywikibot.Page, patch by nu11zer0


git-svn-id: http://svn.wikimedia.org/svnroot/pywikipedia/branches/rewrite@11277 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6