[Pywikipedia-bugs] [Maniphest] [Closed] T353086: Create a PagePile generator

2023-12-09 Thread Strainu
Strainu closed this task as "Resolved".

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T353086: Create a PagePile generator

2023-12-08 Thread Strainu
Strainu added a comment.


  Already working on this, will put up a patch for review shortly.

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Created] T353086: Create a PagePile generator

2023-12-08 Thread Strainu
Strainu created this task.
Strainu added projects: Pywikibot, Pywikibot-pagegenerators.py.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Feature summary** (what you would like to be able to do and where):
  
  Create a generator (and equivalent CLI option) that given a PagePile 
<https://pagepile.toolforge.org/> id, can obtain the corresponding Page objects.
  
  **Use case(s)** (list the steps that you performed to discover that problem, 
and describe the actual underlying problem which you want to solve. Do not 
describe only a solution):
  
  There are situations when I process PagePiles without knowing the site 
upfront. In this case, the `-url` option is not enough, as the text output of 
PagePile does not contain Site information.
  
  **Benefits** (why should this be implemented?): Much shorter to give an id 
rather than a full URL

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T352482: APIError: Petscan: No result for source categories

2023-12-03 Thread Strainu
Strainu added a comment.


  Probably a duplicate of https://github.com/magnusmanske/petscan_rs/issues/106

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

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

To: Strainu
Cc: Strainu, Sn1per, Magnus, Xqt, Mpaa, mevo, Aklapper, pywikibot-bugs-list, 
JJMC89, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, Dvorapa, Altostratus, binbot, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Krenair
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T325473: Add support for Extension:PageViewInfo

2022-12-20 Thread Strainu
Strainu added a comment.


  Let's clarify the terminology and separate the concerns here:
  
  - I suggested that, based on the usecase, pageview data might be better 
retrieved from the **Wikimedia.org**  REST API ( 
https://wikimedia.org/api/rest_v1/#/ ) which is **different** from the REST API 
on the other sites (see here 
<https://www.mediawiki.org/wiki/Wikimedia_REST_API>). As usual, extensions can 
add their own endpoints (see for instance `/pages/talk` at 
https://en.wikipedia.org/api/rest_v1/ which is missing from MediaWiki 
Confusing, I know.
  - Pageviews are only part of the Wikimedia API, so it is not exposed through 
the `PageViewInfo` extension. From a design point of view, they're totally 
separated and could potentially return different data at least occasionally 
(although I suppose they share a common data source)
  
  I think all three are valuable (local API, Wikimedia REST, MediaWiki REST) 
and should all have wrappers in PWB:
  
  1. PWB should have a `RestAPISite` class and potentially subclasses per 
family (i.e. `WikipediaRestApi`, `CommonsRestApi`,`WikidataRestApi` etc.) + a 
`WikimediaOrgRestApi`. Exact naming is TBD, of course.
  2. to expose pageviews data in the `Page` object the local API should be 
used, just like it's the case for `page_image()` or `coordinates()`. Use of 
REST API should be at most a backup, but I would personally leave the 
implementation of the backup mechanism to the bot builders.

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

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

To: Strainu
Cc: Strainu, Aklapper, pywikibot-bugs-list, binbot, Xqt, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T301908: Drop support for Python 3.5

2022-02-24 Thread Strainu
Strainu added a comment.


  In T301908#7734951 <https://phabricator.wikimedia.org/T301908#7734951>, @Xqt 
wrote:
  
  > In T301908#7734698 <https://phabricator.wikimedia.org/T301908#7734698>, 
@Strainu wrote:
  >
  >> I continue to believe we need to support a version at least a year after 
Cloud Services have moved away from it, as described in 
https://lists.wikimedia.org/hyperkitty/list/pywiki...@lists.wikimedia.org/message/BSTDB6JYJ74DE3BTNWND4BAROLIXJTW5/
  >>
  >> That would mean mid-2023 if I understood correctly the latest news about 
the Debian upgrades.
  >
  > If I follow this your proposal:
  >
  > 1. two years after official support has ended (e.g. 7 years after launch) 
AND
  > 2. one year after Toolforge moved to a newer Python version. AND
  > 3. the percentage of users of a version goes under 5%
  >
  > 1. The official support has ended Sept. 2020; two additional years will be 
Sept 2022. Dropping Python 3.5 is not planed for an earlier date.
  > 2. Toolforge migration has already started.
  > 3. The percentage of users is already below 0,3 % except for Toolforge but 
this will decrease rapidly if the Python base is changed.
  >
  > I don't want to fight for a few weeks or months. Release Pywikibot 7 was 
also postponed for few months. But I want to promote a change as early as even 
possible but this is also a long term process so that it can be planned.
  
  OK, I checked the announcement 
<https://lists.wikimedia.org/hyperkitty/list/wikitec...@lists.wikimedia.org/message/EPJFISC52T7OOEFH5YYMZNL57O4VGSPR/>
 and it seems that the final shutdown of Stretch is planned to happen around 
June (although I suspect it will get delayed a little, but probably not until 
October). Let's get some data after that happens and see if there is anyone 
still using 3.5 from the Cloud Services (which would mean they explicitly need 
it) and if not then we can keep your proposed date.
  
  If there are still 3.5 users after June, we can still keep the date, but we 
should arrange some kind of notification (not sure who and in what 
circumstances can do that).
  
  How does that sound?
  
  > Please take into account that other packages that are mandatory for 
Pywikibot need Python 3.6 already; for example the central http interface 
`requests` has dropped Python 3.5 support 7 months ago and Python 3.6 support 
will be dropped this year.
  
  It's not immediately obvious to me what's the concern here. What's forcing us 
to increase the required requests version?

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

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

To: Strainu
Cc: Majavah, Strainu, Mpaa, Framawiki, Dvorapa, Dalba, Meno25, valhallasw, 
Multichill, Rubin16, Basilicofresco, kscanne, Larske, Lee, Huji, Salween, 
JJMC89, Legoktm, matej_suchanek, Aklapper, Xqt, pywikibot-bugs-list, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T301908: Drop support for Python 3.5

2022-02-24 Thread Strainu
Strainu added a comment.


  I continue to believe we need to support a version at least a year after 
Cloud Services have moved away from it, as described in 
https://lists.wikimedia.org/hyperkitty/list/pywiki...@lists.wikimedia.org/message/BSTDB6JYJ74DE3BTNWND4BAROLIXJTW5/
  
  That would mean mid-2023 if I understood correctly the latest news about the 
Debian upgrades.

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

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

To: Strainu
Cc: Majavah, Strainu, Mpaa, Framawiki, Dvorapa, Dalba, Meno25, valhallasw, 
Multichill, Rubin16, Basilicofresco, kscanne, Larske, Lee, Huji, Salween, 
JJMC89, Legoktm, matej_suchanek, Aklapper, Xqt, pywikibot-bugs-list, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-06 Thread Strainu
Strainu added a comment.


  Indeed, removing `config.step` from user-config.py solved the problem. I 
don't remember why I added that, maybe it's an inheritance from old versions (I 
have that config file all the way back from compat branch :D )

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-06 Thread Strainu
Strainu added a comment.


>>> page.isRedirectPage()
>>> _handle_query_limit
None None True
1000 None
{'_count': 0,
 '_previous_dicts': {},
 '_props': frozenset({'info'}),
 'api_limit': 1000,
 'continue_name': 'continue',
 'continue_update': >,
 'continuekey': ['info'],
 'limit': None,
 'limited_module': None,
 'modules': ['info'],
 'query_limit': 1000,
 'request': 
pywikibot.data.api.Request'/w/api.php?continue==query=info=Cod:SIRUTA:136=protection='>,
 'request_class': ,
 'resultkey': 'pages',
 'site': APISite("ro", "wikipedia")}
<<<

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-04 Thread Strainu
Strainu added a comment.


$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add ..." to include in what will be committed)

[...]

nothing added to commit but untracked files present (use "git add" to track)

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-04 Thread Strainu
Strainu added a comment.


$ python3 pwb.py version
Pywikibot: [https] r-pywikibot-core (758de7a, g15553, 2021/11/03, 12:54:56, 
OUTDATED)
Release version: 7.0.0.dev0
setuptools version: 33.1.1
mwparserfromhell version: 0.6.3
wikitextparser version: n/a
requests version: 2.25.1
  cacerts: 
/home/andrei/.local/lib/python3.5/site-packages/certifi/cacert.pem
certificate test: ok
Python: 3.5.3 (default, Apr  5 2021, 09:00:41)
[GCC 6.3.0 20170516]
PYWIKIBOT_DIR: Not set
PYWIKIBOT_DIR_PWB:
PYWIKIBOT_NO_USER_CONFIG: Not set
Config base dir: /home/andrei/pywikibot-core
Usernames for family "commons":
commons: Strainubot
Usernames for family "wikidata":
wikidata: Strainubot
Usernames for family "wikipedia":
ro: Strainubot

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Updated] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-03 Thread Strainu
Strainu added a comment.


  Thank you for your suggestions @Xqt abd @matej_suchanek . Unfortunately I am 
still reproducing the issue after deleting all __pycache__ and apicache-py3 
folders, using the simplified example (see below). Have you tried with the same 
commit (28e31f98dcc2b152fde16385172a49f721394ed3 
<https://phabricator.wikimedia.org/rPWBC28e31f98dcc2b152fde16385172a49f721394ed3>)?
  
>>> import pywikibot
>>> site = pywikibot.Site('ro')
>>> page = pywikibot.Page(site, 'Cod:SIRUTA:136')
>>> page.exists()
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/andrei/pywikibot-core/pywikibot/page/__init__.py", line 717, 
in exists
raise InvalidPageError(self)
pywikibot.exceptions.InvalidPageError: Page [[ro:Cod:SIRUTA:136]] is 
invalid.
>>> page.isRedirectPage()
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/andrei/pywikibot-core/pywikibot/page/__init__.py", line 730, 
in isRedirectPage
return self.site.page_isredirect(self)
  File "/home/andrei/pywikibot-core/pywikibot/site/_apisite.py", line 1194, 
in page_isredirect
self.loadpageinfo(page)
  File "/home/andrei/pywikibot-core/pywikibot/site/_apisite.py", line 1107, 
in loadpageinfo
self._update_page(page, query)
  File "/home/andrei/pywikibot-core/pywikibot/site/_apisite.py", line 1081, 
in _update_page
for pageitem in query:
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2740, in 
__iter__
yield from super().__iter__()
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2582, in 
__iter__
prev_limit, new_limit, previous_result_had_data)
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2507, in 
_handle_query_limit
self.request[self.prefix + 'limit'] = str(new_limit)
AttributeError: 'PropertyGenerator' object has no attribute 'prefix'

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-02 Thread Strainu
Strainu added a comment.


  Pretty much any page, I've encountered it several times. Just checked for 
[[ro:Cod:SIRUTA:136]], it reproduces

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

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

To: Strainu
Cc: matej_suchanek, Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Edited] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-02 Thread Strainu
Strainu updated the task description.

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T293820: UploadError is not thrown to the client code when some warnings are ignored

2021-11-02 Thread Strainu
Strainu added a comment.


  I agree, it would have been preferable if the change in semantics came 
through a rename of parameters instead.

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

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

To: Strainu
Cc: Xqt, Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Created] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-02 Thread Strainu
Strainu created this task.
Strainu added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Sample code** (simplified):
  
user.mylang = 'ro'
user.family = 'wikipedia'
site = pywikibot.Site()
page = pywikibot.Page(site, result['page_title'])
pywikibot.output(page.title())
if page.exists() and page.isRedirectPage():
page = page.getRedirectTarget()
elif not page.exists():
pass # DO stuff
  
  **Expected outcome:** get the redirect target or handle non-existent pages
  
  **Actual outcome:**
  
Traceback (most recent call last):
  File "pwb.py", line 420, in 
if not main():
  File "pwb.py", line 415, in main
module)
  File "pwb.py", line 113, in run_python_file
main_mod.__dict__)
  File "./wikiro/robots/python/pywikipedia/localitati/create_shortcuts.py", 
line 80, in 
main()
  File "./wikiro/robots/python/pywikipedia/localitati/create_shortcuts.py", 
line 64, in main
if page.exists() and page.isRedirectPage():
  File "/home/andrei/pywikibot-core/pywikibot/page/__init__.py", line 717, 
in exists
raise InvalidPageError(self)
  
  Trying to debug, we add a print:
  
$ git diff pywikibot/page/__init__.py
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index ee06a0203..fa52faec5 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -714,6 +714,7 @@ class BasePage(ComparableMixin):
 """
 with suppress(AttributeError):
 return self.pageid > 0
+print(self.pageid)
 raise InvalidPageError(self)

 @property
  
  Sure enough, we had an AttributeError:
  
Traceback (most recent call last):
  File "pwb.py", line 420, in 
if not main():
  File "pwb.py", line 415, in main
module)
  File "pwb.py", line 113, in run_python_file
main_mod.__dict__)
  File "./wikiro/robots/python/pywikipedia/localitati/create_shortcuts.py", 
line 80, in 
main()
  File "./wikiro/robots/python/pywikipedia/localitati/create_shortcuts.py", 
line 64, in main
if source_page.exists():
  File "/home/andrei/pywikibot-core/pywikibot/page/__init__.py", line 717, 
in exists
print(self.pageid)
  File "/home/andrei/pywikibot-core/pywikibot/page/__init__.py", line 261, 
in pageid
self.site.loadpageinfo(self)
  File "/home/andrei/pywikibot-core/pywikibot/site/_apisite.py", line 1107, 
in loadpageinfo
self._update_page(page, query)
  File "/home/andrei/pywikibot-core/pywikibot/site/_apisite.py", line 1081, 
in _update_page
for pageitem in query:
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2740, in 
__iter__
yield from super().__iter__()
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2582, in 
__iter__
prev_limit, new_limit, previous_result_had_data)
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2507, in 
_handle_query_limit
self.request[self.prefix + 'limit'] = str(new_limit)
AttributeError: 'PropertyGenerator' object has no attribute 'prefix'
CRITICAL: Exiting due to uncaught exception 
  
  **Pywikibot version**:
  
=== Pywikibot framework v7.0.0.dev0 -- Logging header ===   
  [80/1812]
COMMAND: ['pwb.py', '-v']
DATE: 2021-11-02 13:35:29.761891 UTC
VERSION: [https] r-pywikibot-core (28e31f9, g15398, 2021/09/21, 11:52:45, 
n/a)
SYSTEM: 

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Created] T293820: UploadError is not thrown to the client code when some warnings are ignored

2021-10-19 Thread Strainu
Strainu created this task.
Strainu added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Try to upload a duplicate of 
[[:ro:File:Fotoliu_(Artă_decorativă)_2784_11.10.2017_Fond_8764B28DD6F748CC984A8365A6CA66CF.jpg]],
 using the "Foto" prefix for the duplicate file, so it triggers the bad-prefix 
warning. In order for the upload to happen, I'm ignoring the bad-prefix 
warning, as shown by the (simplified) code below:
  
try:
success = imagepage.upload("/path/to/file",
ignore_warnings=['bad-prefix'],
chunk_size=0,
_file_key=None, _offset=0,
comment="Imagine Cimec nouă")
except pywikibot.exceptions.APIError as error:
if error.code == 'bad-prefix':
pywikibot.error('Upload error: Bad-prefix')
elif error.code == 'duplicate':
pywikibot.error('Upload error: Duplicate')
   return
except Exception:
pywikibot.error('Upload error: ', exc_info=True)
return

if success:
pywikibot.output('Success')
else:
pywikibot.output('Upload aborted.')
  
  The actual output is:
  
[UploadError("duplicate", "Uploaded file is a duplicate of 
['Fotoliu_(Artă_decorativă)_2784_11.10.2017_Fond_8764B28DD6F748CC984A8365A6CA66CF.jpg'].",
 {}), UploadError("bad-prefix", "Target filename has a bad prefix 
Fotoliu_(Artă_decorativă)_2784_11.10.2017_Fond_A8C631B7BB4A4D8CB3DD2DE4B52A21B0.jpg.",
 {})]
Upload aborted.
  
  Expected output would be to have the unignored error thrown to the user code:
  
[UploadError("duplicate", "Uploaded file is a duplicate of 
['Fotoliu_(Artă_decorativă)_2784_11.10.2017_Fond_8764B28DD6F748CC984A8365A6CA66CF.jpg'].",
 {}), UploadError("bad-prefix", "Target filename has a bad prefix 
Fotoliu_(Artă_decorativă)_2784_11.10.2017_Fond_A8C631B7BB4A4D8CB3DD2DE4B52A21B0.jpg.",
 {})]
Upload error: Duplicate

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Claimed] T233959: File revision contains no timestamp

2019-09-26 Thread Strainu
Strainu claimed this task.
Strainu added a comment.


  Ah, I think I found the original issue: 
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/533482/ (T221812 
<https://phabricator.wikimedia.org/T221812>)
  
  Will claim the task and try to provide a fix in PWB.

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

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

To: Strainu
Cc: Liuxinyu970226, pywikibot-bugs-list, Xqt, Strainu, Aklapper, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T233959: File revision contains no timestamp

2019-09-26 Thread Strainu
Strainu updated the task description.

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

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

To: Strainu
Cc: Liuxinyu970226, pywikibot-bugs-list, Xqt, Strainu, Aklapper, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T233959: File revision contains no timestamp

2019-09-26 Thread Strainu
Strainu created this task.
Strainu added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Liuxinyu970226.

TASK DESCRIPTION
  Parsing a pywikibot generator over the pages referring [[:c:Template:Monument 
istoric]] started crashing when parsing the file 
https://commons.wikimedia.org/wiki/File:CATEDRALA_EVANGHELICA_SIBIU.jpg
  
  The contents of the file_revision variable as parsed by PWB is: 
`{'descriptionurl': 
'https://commons.wikimedia.org/wiki/File:CATEDRALA_EVANGHELICA_SIBIU.jpg', 
'filemissing': '', 'descriptionshorturl': 
'https://commons.wikimedia.org/w/index.php?curid=16462988'}`
  
  The backtrace I get is:
  
Traceback (most recent call last):
  File "pwb.py", line 321, in 
if not main():
  File "pwb.py", line 316, in main
run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 101, in run_python_file
main_mod.__dict__)
  File 
"./wikiro/robots/python/pywikipedia/monumente/parse_monument_article.py", line 
708, in 
main()
  File 
"./wikiro/robots/python/pywikipedia/monumente/parse_monument_article.py", line 
635, in main
for page in pregenerator:
  File "/home/andrei/pywikibot-core/pywikibot/pagegenerators.py", line 
2219, in PreloadingGenerator
for page in generator:
  File "/home/andrei/pywikibot-core/pywikibot/pagegenerators.py", line 
1738, in NamespaceFilterPageGenerator
for page in generator:
  File "/home/andrei/pywikibot-core/pywikibot/tools/__init__.py", line 
1159, in filter_unique
for item in iterable:
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2824, in 
__iter__
for result in self._extract_results(resultdata):
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2773, in 
_extract_results
result = self.result(item)
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 2925, in 
result
update_page(p, pagedata, self.props)
  File "/home/andrei/pywikibot-core/pywikibot/data/api.py", line 3328, in 
update_page
page._load_file_revisions(pagedict['imageinfo'])
  File "/home/andrei/pywikibot-core/pywikibot/page.py", line 2483, in 
_load_file_revisions
file_revision = FileInfo(file_rev)
  File "/home/andrei/pywikibot-core/pywikibot/page.py", line 5696, in 
__init__
self.timestamp = pywikibot.Timestamp.fromISOformat(self.timestamp)
AttributeError: 'FileInfo' object has no attribute 'timestamp'
CRITICAL: Exiting due to uncaught exception 
  
  This is probably caused by the weird first version of the file which has no 
preview and has probably been uncovered by the fix in T233392 
<https://phabricator.wikimedia.org/T233392>. A fix in PWB should probably 
include ignoring revisions containing the 'filemissing' flag (which is 
undocumented - see T109125 <https://phabricator.wikimedia.org/T109125>) but 
seems to indicate a problem with the image.
  
  However, I believe the MediaWiki team should probably also take a look at why 
that version is missing an image - @Aklapper , could you please add the 
relevant people in CC?

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

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

To: Strainu
Cc: Liuxinyu970226, pywikibot-bugs-list, Xqt, Strainu, Aklapper, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T233392: FilePage.getRedirectTarget should return a FilePage

2019-09-20 Thread Strainu
Strainu updated the task description.

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, Viztor, DannyS712, Wenyi, Tbscho, 
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, 
Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T233392: FilePage.getRedirectTarget should return a FilePage

2019-09-20 Thread Strainu
Strainu created this task.
Strainu added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Please treat this as an RFC rather than a bug report.  The following 
simplified code should illustrate the problem:
  
val = pywikibot.FilePage(commons, filename)
 while val.isRedirectPage():
val = val.getRedirectTarget() //val is now a Page
claim = pywikibot.Claim(self.item.repo, prop, datatype="commonsMedia")
claim.setTarget(val) //this fails if filename is redirect, works otherwise
  
  Even if theoretically you could have cross-ns redirects, these are highly 
discouraged and so I believe it would make sense to override getRedirectTarget 
in FilePage to ensure it returns a FilePage rather than a simple Page.

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

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

To: Strainu
Cc: Aklapper, pywikibot-bugs-list, Strainu, Viztor, DannyS712, Wenyi, Tbscho, 
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, 
Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T189398: page.coordinate() throws KeyError for [[ro:File:Parcul Romanescu DJ-II-a-A-07924 (14).jpg]]

2018-03-19 Thread Strainu
Strainu added a comment.
I'm familiar with the development process, but I feel that somebody should properly investigate this situation (which is expected for older entries at Wikidata according to a talk page I can't seem to find anymore) and evaluate whether this fix is enough. I don't have the time to invest in that anytime soon, sorry.TASK DETAILhttps://phabricator.wikimedia.org/T189398EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Framawiki, Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T189398: page.coordinate() throws KeyError for [[ro:File:Parcul Romanescu DJ-II-a-A-07924 (14).jpg]]

2018-03-10 Thread Strainu
Strainu updated the task description. (Show Details)
CHANGES TO TASK DESCRIPTIONThe co object does not contain a key 'dim' @ pywikibot/data/api.py:3261: dim=int(co['dim'])...TASK DETAILhttps://phabricator.wikimedia.org/T189398EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T189398: page.coordinate() throws KeyError for [[ro:File:Parcul Romanescu DJ-II-a-A-07924 (14).jpg]]

2018-03-10 Thread Strainu
Strainu created this task.Strainu added projects: Pywikibot-core, Pywikibot-Wikidata.Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTIONThe co object does not contain a key 'dim' @ pywikibot/data/api.py: dim=int(co['dim'])

I am not sure the following patch is a full solution, but it works for me:

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 1f8ca1f..d0514f5 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -3258,7 +3258,7 @@ def update_page(page, pagedict, props=[]):
  lon=co['lon'],
  typ=co.get('type', ''),
  name=co.get('name', ''),
- dim=int(co['dim']),
+ dim=int(co.get('dim', 0)) or None,
  globe=co['globe'],  # See [[gerrit:67886]]
  )
 coords.append(coord)TASK DETAILhttps://phabricator.wikimedia.org/T189398EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Closed] T172625: Add support for retrieving pageimages

2017-08-06 Thread Strainu
Strainu removed a project: Patch-For-Review.Strainu closed this task as "Resolved".
TASK DETAILhttps://phabricator.wikimedia.org/T172625EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: gerritbot, Framawiki, Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T172625: Add support for retrieving pageimages

2017-08-06 Thread Strainu
Strainu added a comment.
Actually, during the review, I noticed a case when the API call and pageprops return different values, see  https://commons.wikimedia.org/wiki/Special:ApiSandbox#action="">

Now, the file namespace is not a prime candidate for this call, but still.TASK DETAILhttps://phabricator.wikimedia.org/T172625EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Framawiki, Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T172625: Add support for retrieving pageimages

2017-08-06 Thread Strainu
Strainu added a comment.
@Framawiki , thanks for the pointer. It seems a bit of an overkill to load all the page properties only for this.TASK DETAILhttps://phabricator.wikimedia.org/T172625EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Framawiki, Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T172625: Add support for retrieving pageimages

2017-08-05 Thread Strainu
Strainu created this task.Strainu added a project: Pywikibot-core.Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTIONIt would be useful to be able to retrieve the #pageimages of a BasePage directly from the library. I need this, so I'll be working on it.TASK DETAILhttps://phabricator.wikimedia.org/T172625EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T165898: Reduce max_retries from 25 to 15

2017-05-20 Thread Strainu
Strainu added a project: Wikimedia-Hackathon-2017.
TASK DETAILhttps://phabricator.wikimedia.org/T165898EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Framawiki, StrainuCc: gerritbot, Framawiki, Aklapper, pywikibot-bugs-list, Strainu, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Puik, Maathavan, D3r1ck01, Envlh, Avicennasis, Sn1per, Tobias1984, jayvdb, Dalba, Masti, Alchimista, Rxy, Jay8g, fgiunchedi___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T165898: Reduce max_retries from 25 to 15

2017-05-20 Thread Strainu
Strainu created this task.Strainu added a project: Pywikibot-core.Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTIONThe default setting for retrying are:


start timer: 5s
max timer: 120s
number of retries: 25


This leads to a total waiting time of ~43 minutes, which is a bit high, especially for newcomers, which are prone to configuration mistakes. I would suggest reducing the number of retries from 25 to 15, for a reduction of 20 minutes in total retry timer. Users who run autonomous bots can customize this in their user-config or directly in the script.TASK DETAILhttps://phabricator.wikimedia.org/T165898EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Aklapper, pywikibot-bugs-list, Strainu, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T165819: Loop caused by a 302 error on testwiki

2017-05-20 Thread Strainu
Strainu added a comment.
@LegoFan4000 , can you try setting max_retries in user_config?  The default seems to be 25, but considering the increasing timeout, it will probably seem like forever (around 11 minutes)TASK DETAILhttps://phabricator.wikimedia.org/T165819EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Strainu, Framawiki, Aklapper, LegoFan4000, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Declined] T56555: Add force option to editTime

2016-11-28 Thread Strainu
Strainu closed this task as "Declined".
TASK DETAILhttps://phabricator.wikimedia.org/T56555EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: StrainuCc: Legoktm, jayvdb, Ricordisamoa, pywikibot-bugs-list, Ladsgroup, Strainu, Vali.matei, GWicke, Jay8g___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T150210: Make WbQuantity handle case without errors

2016-11-21 Thread Strainu
Strainu added a comment.
Since backwards compatibility will be broken anyway, the question is if we should keep the extra code that handles older versions of Wikibase. Is there any data on the number of Wikibase installations out there?TASK DETAILhttps://phabricator.wikimedia.org/T150210EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lokal_Profil, StrainuCc: daniel, Magul, ChongDae, Strainu, gerritbot, Aklapper, Lokal_Profil, pywikibot-bugs-list, Ramalepe, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, jayvdb, Ricordisamoa, Wesalius, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T150210: Make WbQuantity handle case without errors

2016-11-10 Thread Strainu
Strainu added a comment.

In T150210#2785021, @Lokal_Profil wrote:
My worry is that the current solution would require everyone who wants their bot to correctly handle Quantities on Wikidata to update their code (adding the site object). Whereas if they ignore the warning they can happily go on mishandling them (which affects T142087).

After thinking about this some more one solution would be to have _require_errors() return False instead if no site object is provided. That way Wikidata users will automatically get the desired behaviour without changing anything.


Having the default accommodate the newest version seems like a good idea, but I don't think the current version would qualify as "incorrect", even from an ontology POV. It would simply be a QuantityValue instead of an UnboundedQuantityValue. I would expect a maintenance script to be run after the change if the intention is to move all Quantities with upper/lower bound 0 to UnboundedQuantityValue. I'm not familiar enough with ontologies to be able to say if this is needed/desirable.TASK DETAILhttps://phabricator.wikimedia.org/T150210EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lokal_Profil, StrainuCc: Strainu, gerritbot, Aklapper, Lokal_Profil, pywikibot-bugs-list, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, jayvdb, Ricordisamoa, Wesalius, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T150210: Make WbQuantity handle case without errors

2016-11-09 Thread Strainu
Strainu added a comment.
Great job keeping the backwards compatibility! I say submit the code with the current logic and remove the extra logic later if the code becomes unmaintainable (this will eventually happen after a few more breaking changes to wikibase).TASK DETAILhttps://phabricator.wikimedia.org/T150210EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lokal_Profil, StrainuCc: Strainu, gerritbot, Aklapper, Lokal_Profil, pywikibot-bugs-list, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, jayvdb, Ricordisamoa, Wesalius, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs