jayvdb created this task.
jayvdb claimed this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  anarchopedia is v1.14alpha.
  
  MediaWikiVersion considers 1.14alpha is less than v1.14, which means that 
APISite.has_extension fails with `NotImplementedError`, and everything fails.
  
  ```
  $ python pwb.py shell
  import pywiWelcome to the Pywikibot interactive shell!
  >>> import pywikibot
  >>> v1_14 = pywikibot.tools.MediaWikiVersion('1.14')
  >>> v1_14alpha = pywikibot.tools.MediaWikiVersion('1.14alpha')
  >>> v1_14alpha.version
  (1, 14)
  >>> v1_14 > v1_14alpha
  True
  >>> v1_14alpha >= v1_14
  False
  >>> v1_14alpha.suffix
  'alpha'
  >>> v1_14.suffix
  u''
  >>> v1_14alpha._dev_version
  (1,)
  >>> v1_14._dev_version
  (4,)
  ```
  
  The simple fix to force the version of anarchopedia to be 1.14.
  A slightly better solution is to change the version checked to be 1.14alpha 
where a feature is known to exist in the alpha.
  
  However the real issue is that Pywikibot uses `x.y` in its version checks, 
which is greater than any pre-release version, but typically any feature in 
`x.y` is also in all pre-releases.
  One solution for this is to treat `x.y` as only two levels of significant 
digits, and is considered to be equal to any `x.y*`, while `x.y.0` is the way 
to describe three levels of significant digits in a version.

TASK DETAIL
  https://phabricator.wikimedia.org/T115441

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: Aklapper, jayvdb, pywikibot-bugs-list



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to