Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, Regression. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION Most namespaces on Wikidata are no longer declaring the `defaultcontentmodel` in action=query+meta=siteinfo+siprop=namespaces, e.g. the main (Item) namespace: $ curl -s 'https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&formatversion=2&format=json' | jq '.query.namespaces["0"]' { "id": 0, "case": "first-letter", "name": "", "subpages": false, "content": true, "nonincludable": false } In fact, only four namespaces still declare it: $ curl -s 'https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&formatversion=2&format=json' | jq '.query.namespaces | .[] | select(has("defaultcontentmodel")) | { id, canonical, defaultcontentmodel }' { "id": 640, "canonical": "EntitySchema", "defaultcontentmodel": "EntitySchema" } { "id": 641, "canonical": "EntitySchema talk", "defaultcontentmodel": "wikitext" } { "id": 2302, "canonical": "Gadget definition", "defaultcontentmodel": "GadgetDefinition" } { "id": 2600, "canonical": "Topic", "defaultcontentmodel": "flow-board" } One outcome of this is that Pywikibot refuses to operate on Wikidata, since it thinks the Item entity type isn’t supported: >>> import pywikibot >>> site = pywikibot.Site("wikidata", "wikidata") >>> item = pywikibot.ItemPage(site, "Q42") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/luwe/git/pywikibot/core/pywikibot/page/__init__.py", line 3900, in __init__ ns = site.item_namespace File "/home/luwe/git/pywikibot/core/pywikibot/site/_datasite.py", line 91, in item_namespace self._item_namespace = self.get_namespace_for_entity_type('item') File "/home/luwe/git/pywikibot/core/pywikibot/site/_datasite.py", line 78, in get_namespace_for_entity_type raise EntityTypeUnknownError( pywikibot.exceptions.EntityTypeUnknownError: DataSite("wikidata", "wikidata") does not support entity type "item" TASK DETAIL https://phabricator.wikimedia.org/T288724 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Lucas_Werkmeister_WMDE, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wong128hk, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org