https://bugzilla.wikimedia.org/show_bug.cgi?id=71398
Bug ID: 71398 Summary: Username case changes after site.data_repository Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: trivial Priority: Unprioritized Component: General Assignee: pywikipedia-b...@lists.wikimedia.org Reporter: commodorefabia...@gmx.de Web browser: --- Mobile Platform: --- When the username starts in lowercase it's stored with that lowercase in the “_sites” map. A site requested via data_repository() is stored with an uppercase starting username. >>> import pywikibot >>> s = pywikibot.Site('test', 'wikidata') >>> pywikibot._sites {'wikidata:test:xZise': Site("test", "wikidata")} >>> type(s) <class 'pywikibot.site.APISite'> >>> d = s.data_repository() >>> type(d) <class 'pywikibot.site.DataSite'> >>> pywikibot._sites {'wikidata:test:xZise': Site("test", "wikidata"), 'wikidata:test:XZise': DataSite("test", "wikidata")} This doesn't make a difference usually, because it requests via the “original” lowercased name: >>> import pywikibot >>> pywikibot.Site('en', 'wikipedia') Site("en", "wikipedia") >>> pywikibot._sites {'wikipedia:en:xZise': Site("en", "wikipedia")} >>> pywikibot.Site('en', 'wikipedia') Site("en", "wikipedia") >>> pywikibot._sites {'wikipedia:en:xZise': Site("en", "wikipedia")} -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l