[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-18 Thread Xqt
Xqt closed this task as "Resolved". Xqt claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T312755 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: Mpaa, Lokal_Profil, matej_suchanek, Aklapper, pywikibot-bugs-list, Xqt, Astuthiod

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-18 Thread Maintenance_bot
Maintenance_bot removed a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T312755 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Maintenance_bot Cc: Mpaa, Lokal_Profil, matej_suchanek, Aklapper, pywikibot-bugs-list, Xqt, Ast

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-18 Thread gerritbot
gerritbot added a comment. Change 812872 **merged** by jenkins-bot: [pywikibot/core@master] [IMPR] Always set uselang=en for parsing parsevalue https://gerrit.wikimedia.org/r/812872 TASK DETAIL https://phabricator.wikimedia.org/T312755 EMAIL PREFERENCES https://phabricator.wikim

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread Xqt
Xqt added a comment. In T312755#8069514 , @matej_suchanek wrote: > Yes, it probably depends on the language. When you edit e.g. dates on Wikidata manually, it will try to parse the input in your language (or English). I think it can be

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread gerritbot
gerritbot added a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T312755 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: gerritbot Cc: Mpaa, Lokal_Profil, matej_suchanek, Aklapper, pywikibot-bugs-list, Xqt, Hellket777, Astut

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread gerritbot
gerritbot added a comment. Change 812872 had a related patch set uploaded (by Xqt; author: Xqt): [pywikibot/core@master] [IMPR] Always set uselang=en for parsing parsevalue https://gerrit.wikimedia.org/r/812872 TASK DETAIL https://phabricator.wikimedia.org/T312755 EMAIL PREFERENCE

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread matej_suchanek
matej_suchanek added a comment. Yes, it probably depends on the language. When you edit e.g. dates on Wikidata manually, it will try to parse the input in your language (or English). I think it can be changed using `uselang= So maybe we should always force parsing in English and add an a

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread Xqt
Xqt added projects: Upstream, MediaWiki-Action-API. Xqt added a comment. **The problem was found upstream:** I found out this strange behavior depends on the bot user global (maybe also local) //Internationalisation language settings//. I guess this not intentional for an API request but a

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread Xqt
Xqt added a comment. Digging deeper in this issue I found out that replacing dot with comma gives the expected result: >>> result = site.parsevalue('quantity', ['1,90e-9+-0,20e-9'], {}, False) >>> result [{'amount': '+0.190', 'unit': '1', 'upperBound': '+0.210',

[Wikidata-bugs] [Maniphest] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread Xqt
Xqt created this task. Xqt added projects: Pywikibot, Pywikibot-Wikidata, Wikidata. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue**: I changed the last statements of http.fetch() as follows (adding print statements