[Pywikipedia-bugs] [Maniphest] [Commented On] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread Mpaa
Mpaa added a comment.


  Weird.
  Could you give an example where MW outputs a timestamp on 12 digits?
  
  See https://www.mediawiki.org/wiki/Manual:WfTimestamp

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

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

To: Xqt, Mpaa
Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Adamm71, Jersione, Hellket777, 
LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 
SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, 
Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, 
Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, 
Maathavan, Dvorapa, Altostratus, Neuronton, 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


[Pywikibot-commits] [Gerrit] ...core[master]: Retrieve only one match

2022-11-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860501 )

Change subject: Retrieve only one match
..

Retrieve only one match

Change-Id: I2e35bcc2e690d3fc0640dcf5e37928ef9d26087a
---
M scripts/checkimages.py
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 5eb5923..ae6d170 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -610,10 +610,10 @@
 def upload_bot_change_function(report_page_text, upload_bot_array) -> str:
 """Detect the user that has uploaded the file through upload bot."""
 regex = upload_bot_array[1]
-results = re.findall(regex, report_page_text)
+result = re.search(regex, report_page_text)

-if results:
-return results[0]
+if result:
+return result.group()

 # we can't find the user, report the problem to the bot
 return upload_bot_array[0]

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860501
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I2e35bcc2e690d3fc0640dcf5e37928ef9d26087a
Gerrit-Change-Number: 860501
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
___
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org


[Pywikibot-commits] [Gerrit] ...core[master]: [IMPR] Simplify code

2022-11-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860955 )

Change subject: [IMPR] Simplify code
..

[IMPR] Simplify code

Change-Id: I9f53e97e85bce11e5015431c03e9fa3a91097d96
---
M pywikibot/page/_collections.py
M pywikibot/textlib.py
M pywikibot/tools/djvu.py
M pywikibot/version.py
M scripts/nowcommons.py
M scripts/watchlist.py
M scripts/checkimages.py
M pywikibot/site/_datasite.py
M tests/aspects.py
M pywikibot/diff.py
M pywikibot/tools/_deprecate.py
M pywikibot/site/_apisite.py
M pywikibot/flow.py
13 files changed, 61 insertions(+), 79 deletions(-)

Approvals:
  Matěj Suchánek: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index 4a8e6b7..117b6dd 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -587,9 +587,7 @@
 else:
 pywikibot.info(template.format('None.', '', ''))

-text = ''.join(text_list)
-
-return text
+return ''.join(text_list)


 def html_comparator(compare_string: str) -> Dict[str, List[str]]:
diff --git a/pywikibot/flow.py b/pywikibot/flow.py
index ed55212..ff95165 100644
--- a/pywikibot/flow.py
+++ b/pywikibot/flow.py
@@ -503,8 +503,7 @@
 del self._replies
 data = self.site.reply_to_post(self.page, reply_to, content,
content_format)
-post = Post(self.page, data['post-id'])
-return post
+return Post(self.page, data['post-id'])

 # Moderation
 def delete(self, reason: str) -> None:
diff --git a/pywikibot/page/_collections.py b/pywikibot/page/_collections.py
index 2826fa9..77d8ad8 100644
--- a/pywikibot/page/_collections.py
+++ b/pywikibot/page/_collections.py
@@ -267,17 +267,18 @@
 if not diffto:
 return claims

-temp = defaultdict(list)
-props_add = set(claims.keys())
-props_orig = set(diffto.keys())
+diff_claims = defaultdict(list)
+props_add = set(claims)
+props_orig = set(diffto)
 for prop in (props_orig | props_add):
 if prop not in props_orig:
-temp[prop].extend(claims[prop])
+diff_claims[prop].extend(claims[prop])
 continue

 if prop not in props_add:
-temp[prop].extend({'id': claim['id'], 'remove': ''}
-  for claim in diffto[prop] if 'id' in claim)
+diff_claims[prop].extend(
+{'id': claim['id'], 'remove': ''}
+for claim in diffto[prop] if 'id' in claim)
 continue

 claim_ids = set()
@@ -286,24 +287,25 @@

 for claim, json in zip(self[prop], claims[prop]):
 if 'id' not in json:
-temp[prop].append(json)
+diff_claims[prop].append(json)
 continue

 claim_ids.add(json['id'])
 if json['id'] in claim_map:
 other = pywikibot.page.Claim.fromJSON(
 self.repo, claim_map[json['id']])
+
 if claim.same_as(other, ignore_rank=False,
  ignore_refs=False):
 continue
-temp[prop].append(json)
+
+diff_claims[prop].append(json)

 for claim in diffto[prop]:
 if 'id' in claim and claim['id'] not in claim_ids:
-temp[prop].append({'id': claim['id'], 'remove': ''})
+diff_claims[prop].append({'id': claim['id'], 'remove': ''})

-claims = temp
-return claims
+return diff_claims

 def set_on_item(self, item) -> None:
 """Set Claim.on_item attribute for all claims in this collection."""
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index c892912..4509614 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -2652,9 +2652,7 @@
   anononly=anononly, nocreate=nocreate,
   autoblock=autoblock, noemail=noemail,
   reblock=reblock, allowusertalk=allowusertalk)
-
-data = req.submit()
-return data
+return req.submit()

 @need_right('unblock')
 def unblockuser(
@@ -2674,9 +2672,7 @@
   user=user.username,
   token=self.tokens['csrf'],
   reason=reason)
-
-data = req.submit()
-return data
+return req.submit()

 @need_right('editmywatchlist')
 def watch(
@@ -2863,5 +2859,4 @@

 req = self.simple_request(**params)
 data = req.submit()
-comparison = data['compare']['*']
-return comparison
+return data['compare']['*']
diff --git a/pywikibot/site/_datasite.py 

[Pywikipedia-bugs] [Maniphest] [Commented On] T323852: pywikibot: Support non-global login

2022-11-27 Thread RPI2026F1
RPI2026F1 added a comment.


  Thanks, that is really helpful. The final piece of the puzzle that would help 
is if I could provide the password to `site.login()` (for example if I 
collected it from a form). That would allow non-interactive logins of users 
unknown at initial launch.

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

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

To: RPI2026F1
Cc: Xqt, Aklapper, pywikibot-bugs-list, RPI2026F1, 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


[Pywikibot-commits] [Gerrit] ...core[master]: [doc] Update documentation about protection

2022-11-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/860985 )

Change subject: [doc] Update documentation about protection
..

[doc] Update documentation about protection

Change-Id: Id92c696f68e83376db7f09b1346046d9596bbfa1
---
M pywikibot/site/_apisite.py
M pywikibot/page/_page.py
2 files changed, 106 insertions(+), 29 deletions(-)

Approvals:
  Bináris: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/page/_page.py b/pywikibot/page/_page.py
index bd2283a..1b424ed 100644
--- a/pywikibot/page/_page.py
+++ b/pywikibot/page/_page.py
@@ -31,7 +31,15 @@

 import pywikibot
 from pywikibot import Timestamp, config, date, i18n, textlib
-from pywikibot.backports import Generator, Iterable, Iterator, List, Set
+from pywikibot.backports import (
+Dict,
+Generator,
+Iterable,
+Iterator,
+List,
+Set,
+Tuple,
+)
 from pywikibot.cosmetic_changes import CANCEL, CosmeticChangesToolkit
 from pywikibot.exceptions import (
 Error,
@@ -1049,12 +1057,38 @@
 content=content,
 )

-def protection(self) -> dict:
-"""Return a dictionary reflecting page protections."""
+def protection(self) -> Dict[str, Tuple[str, str]]:
+"""Return a dictionary reflecting page protections.
+
+**Example:**
+
+>>> site = pywikibot.Site('wikipedia:test')
+>>> page = pywikibot.Page(site, 'Main Page')
+>>> page.protection()
+{'edit': ('sysop', 'infinity'), 'move': ('sysop', 'infinity')}
+
+.. seealso::
+   - :meth:`Site.page_restrictions()
+ `
+   - :meth:`applicable_protections`
+   - :meth:`protect`
+"""
 return self.site.page_restrictions(self)

 def applicable_protections(self) -> Set[str]:
-"""Return the protection types allowed for that page."""
+"""Return the protection types allowed for that page.
+
+**Example:**
+
+>>> site = pywikibot.Site('wikipedia:test')
+>>> page = pywikibot.Page(site, 'Main Page')
+>>> sorted(page.applicable_protections())
+['edit', 'move']
+
+.. seealso::
+   - :meth:`protect`
+   - :meth:`protection`
+"""
 self.site.loadpageinfo(self)
 return self._applicable_protections

@@ -2008,27 +2042,35 @@

 def protect(self,
 reason: Optional[str] = None,
-protections: Optional[dict] = None,
+protections: Optional[Dict[str, Optional[str]]] = None,
 **kwargs) -> None:
-"""
-Protect or unprotect a wiki page. Requires administrator status.
+"""Protect or unprotect a wiki page. Requires  *protect* right.

-Valid protection levels are '' (equivalent to 'none'),
-'autoconfirmed', 'sysop' and 'all'. 'all' means 'everyone is allowed',
-i.e. that protection type will be unprotected.
+Valid protection levels are ``''`` (equivalent to ``None``),
+``'autoconfirmed'``, ``'sysop'`` and ``'all'``. ``'all'`` means
+everyone is allowed, i.e. that protection type will be
+unprotected.

-In order to unprotect a type of permission, the protection level shall
-be either set to 'all' or '' or skipped in the protections dictionary.
+In order to unprotect a type of permission, the protection level
+shall be either set to ``'all'`` or ``''`` or skipped in the
+protections dictionary.

-Expiry of protections can be set via kwargs, see Site.protect() for
+Expiry of protections can be set via *kwargs*, see
+:meth:`Site.protect()` for
 details. By default there is no expiry for the protection types.

-:param protections: A dict mapping type of protection to protection
-level of that type. Allowed protection types for a page can be
-retrieved by Page.self.applicable_protections()
+.. seealso::
+   - :meth:`Site.protect()
+ `
+   - :meth:`applicable_protections`
+
+:param protections: A dict mapping type of protection to
+protection level of that type. Allowed protection types for
+a page can be retrieved by :meth:`applicable_protections`.
 Defaults to protections is None, which means unprotect all
 protection types.
-Example: {'move': 'sysop', 'edit': 'autoconfirmed'}
+
+Example: ``{'move': 'sysop', 'edit': 'autoconfirmed'}``

 :param reason: Reason for the action, default is None and will set an
 empty string.
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index c892912..da2b051 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -55,7 +55,7 @@
 )
 from 

[Pywikipedia-bugs] [Maniphest] [Updated] T323812: Improve content structure and navigation

2022-11-27 Thread Maintenance_bot
Maintenance_bot removed a project: Patch-For-Review.

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

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

To: KBach, Maintenance_bot
Cc: whym, pywikibot-bugs-list, Aklapper, binbot, Xqt, Dvorapa, KBach, 
Maberdour, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Demian, Pavithraes, Urstrulykkr, Viztor, Wenyi, Jayprakash12345, 
Tbscho, srishakatux, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, 
mys_721tx, Gryllida, jayvdb, Masti, Alchimista, Rfarrand, bd808, jeremyb, 
Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, Juan90264, 
Alter-paule, Beast1978, Un1tY, Hook696, Kent7301, joker88john, CucyNoiD, 
Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Lewizho99, Maathavan, 
Neuronton
___
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] T323812: Improve content structure and navigation

2022-11-27 Thread gerritbot
gerritbot added a comment.


  Change 860982 **merged** by jenkins-bot:
  
  [pywikibot/core@master] [docs] Improve basic content structure and navigation
  
  https://gerrit.wikimedia.org/r/860982

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

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

To: KBach, gerritbot
Cc: whym, pywikibot-bugs-list, Aklapper, binbot, Xqt, Dvorapa, KBach, Adamm71, 
Jersione, Hellket777, LisafBia6531, 786, Biggs657, Maberdour, PotsdamLamb, 
Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Demian, Hook696, Pavithraes, Kent7301, Urstrulykkr, 
joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, 
Bsandipan, Jayprakash12345, Tbscho, srishakatux, MayS, Lewizho99, Mdupont, 
JJMC89, Maathavan, Altostratus, Neuronton, Avicennasis, mys_721tx, Gryllida, 
jayvdb, Masti, Alchimista, Rfarrand, bd808, jeremyb
___
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] T323812: Improve content structure and navigation

2022-11-27 Thread gerritbot
gerritbot added a project: Patch-For-Review.

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

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

To: KBach, gerritbot
Cc: whym, pywikibot-bugs-list, Aklapper, binbot, Xqt, Dvorapa, KBach, Adamm71, 
Jersione, Hellket777, LisafBia6531, 786, Biggs657, Maberdour, PotsdamLamb, 
Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Demian, Hook696, Pavithraes, Kent7301, Urstrulykkr, 
joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, 
Bsandipan, Jayprakash12345, Tbscho, srishakatux, MayS, Lewizho99, Mdupont, 
JJMC89, Maathavan, Altostratus, Neuronton, Avicennasis, mys_721tx, Gryllida, 
jayvdb, Masti, Alchimista, Rfarrand, bd808, jeremyb
___
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] T323812: Improve content structure and navigation

2022-11-27 Thread gerritbot
gerritbot added a comment.


  Change 860982 had a related patch set uploaded (by Xqt; author: KBach):
  
  [pywikibot/core@master] [docs] Improve basic content structure and navigation
  
  https://gerrit.wikimedia.org/r/860982

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

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

To: KBach, gerritbot
Cc: whym, pywikibot-bugs-list, Aklapper, binbot, Xqt, Dvorapa, KBach, 
Maberdour, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Demian, Pavithraes, Urstrulykkr, Viztor, Wenyi, Jayprakash12345, 
Tbscho, srishakatux, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, 
mys_721tx, Gryllida, jayvdb, Masti, Alchimista, Rfarrand, bd808, jeremyb
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[pywikibot] Re: Page protection for limited time

2022-11-27 Thread Bináris
Thank you!

Dalba  ezt írta (időpont: 2022. nov. 27., V, 14:49):

> Hi Bináris!
> Time can be passed through the `kwargs` as `expiry` keyword to
> APISite.protect
> 
> .
>
>> Expiry of protections can be set via kwargs, see Site.protect() for
>> details.
>>
>
> On Sun, Nov 27, 2022 at 3:55 PM Bináris  wrote:
>
>> Of course I meant protect, not block.
>>
>> Bináris  ezt írta (időpont: 2022. nov. 27., V,
>> 13:23):
>>
>>> Hi,
>>> in
>>> https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.protect
>>> I don't see the time. Can we block for infinity only?
>>>
>>> --
>>> Bináris
>>>
>>
>>
>> --
>> Bináris
>> ___
>> pywikibot mailing list -- pywikibot@lists.wikimedia.org
>> To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org
>>
> ___
> pywikibot mailing list -- pywikibot@lists.wikimedia.org
> To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org
>


-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[pywikibot] Re: Page protection for limited time

2022-11-27 Thread Dalba
Hi Bináris!
Time can be passed through the `kwargs` as `expiry` keyword to
APISite.protect

.

> Expiry of protections can be set via kwargs, see Site.protect() for
> details.
>

On Sun, Nov 27, 2022 at 3:55 PM Bináris  wrote:

> Of course I meant protect, not block.
>
> Bináris  ezt írta (időpont: 2022. nov. 27., V,
> 13:23):
>
>> Hi,
>> in
>> https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.protect
>> I don't see the time. Can we block for infinity only?
>>
>> --
>> Bináris
>>
>
>
> --
> Bináris
> ___
> pywikibot mailing list -- pywikibot@lists.wikimedia.org
> To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org
>
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T323852: pywikibot: Support non-global login

2022-11-27 Thread Xqt
Xqt added a comment.


  pywikibot.Site() already has some functionality you required, you can give 
the user account with it and login after it:
  
D:\pwb\GIT\core>pwb shell
Welcome to the Pywikibot interactive shell!
>>> site = pywikibot.Site('wikipedia:de', user='xqt')
>>> site.login()
Password for user Xqt on wikipedia:de (no characters will be shown):
Logging in to wikipedia:de as Xqt
Bitte gib einen Verifizierungscode von deinem Authentifizierungsgerät ein.:
>>> site.logged_in()
True
>>>
  
  
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html#pywikibot.Site
  (The previous was a 2FA example)
  
  Also `site.login()` has a parameter to give the user name.
  
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.site.html#pywikibot.site._apisite.APISite.login
  
  You may use a bot password file for login parameters. `user-config.py` is 
recommended but not mandatory. You may have multiple config files using the 
`-config` global option. Global options can always be used even if you have 
your own option parser and you don't use `pywikibot.handle_args()` for example:
  
  `pwb []  

[pywikibot] Re: Can't log in as admin

2022-11-27 Thread Bináris
Storno, I had to run login.py directly.

But I still have the question: if I edit pages with my regular bot account,
and one of them is protected, what will happen? Can I switch to my sysop
account?

Bináris  ezt írta (időpont: 2022. nov. 27., V, 13:42):

> python pwb.py -nolog -user:Bináris userpageprotect.py
> python pwb.py -nolog -user:"Bináris" userpageprotect.py
>
> Neither asks for my password when the script wants to protect a page. (The
> script is own development.)
> Instead I get:
>
> pywikibot.exceptions.UserRightsError: User "None" does not have required
> user right "protect"
> CRITICAL: Exiting due to uncaught exception  'pywikibot.exceptions.UserRightsError'>
> Do I do soemthing wrong?
>
> I liked the compat solution with my sysop user in user-config much better.
> :-(
> --
> Bináris
>


-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Updated] T243200: Move PAWS to OAuth 2.0

2022-11-27 Thread Xqt
Xqt added a parent task: T192237: Support administrative actions in PAWS.

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

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

To: Xqt
Cc: Aklapper, Stang, Daniel_Mietchen, Bstorm, Dvorapa, MarcoAurelio, 
pywikibot-bugs-list, Mpaa, Chicocvenancio, Ramtin2021, PotsdamLamb, dcaro, 
Devnull, Slst2020, GeminiAgaloos, Jyoo1011, nskaggs, JohnsonLee01, SHEKH, 
Dijkstra, Raymond_Ndibe, Khutuck, Zkhalido, Phamhi, AshokChakra, Viztor, 
94rain, Wenyi, sietec, R96340, Allthingsgo, Tbscho, MayS, Mdupont, JJMC89, 
Altostratus, Avicennasis, Susannaanas, mys_721tx, Jane023, Xqt, yuvipanda, 
jayvdb, zhuyifei1999, Masti, Alchimista, bd808
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[pywikibot] Can't log in as admin

2022-11-27 Thread Bináris
python pwb.py -nolog -user:Bináris userpageprotect.py
python pwb.py -nolog -user:"Bináris" userpageprotect.py

Neither asks for my password when the script wants to protect a page. (The
script is own development.)
Instead I get:

pywikibot.exceptions.UserRightsError: User "None" does not have required
user right "protect"
CRITICAL: Exiting due to uncaught exception 
Do I do soemthing wrong?

I liked the compat solution with my sysop user in user-config much better.
:-(
-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[pywikibot] Re: Page protection for limited time

2022-11-27 Thread Bináris
Of course I meant protect, not block.

Bináris  ezt írta (időpont: 2022. nov. 27., V, 13:23):

> Hi,
> in
> https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.protect
> I don't see the time. Can we block for infinity only?
>
> --
> Bináris
>


-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[pywikibot] Page protection for limited time

2022-11-27 Thread Bináris
Hi,
in
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.protect
I don't see the time. Can we block for infinity only?

-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Updated] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread gerritbot
gerritbot added a project: Patch-For-Review.

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

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

To: Xqt, gerritbot
Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Adamm71, Jersione, Hellket777, 
LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 
SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, 
Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, 
Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, 
Maathavan, Dvorapa, Altostratus, Neuronton, 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] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread gerritbot
gerritbot added a comment.


  Change 860978 had a related patch set uploaded (by Xqt; author: Xqt):
  
  [pywikibot/core@master] [IMPR] create a timestamp even if hours, minutes or 
seconds are missing
  
  https://gerrit.wikimedia.org/r/860978

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

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

To: Xqt, gerritbot
Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, 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] [Updated] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread Xqt
Xqt removed a project: Regression.
Xqt added a comment.


  The old implementation also failed by giving a wrong result.

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

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

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


[Pywikipedia-bugs] [Maniphest] [Started] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread Xqt
Xqt changed the task status from "Open" to "In Progress".

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

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

To: Xqt
Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Susie413113, PotsdamLamb, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Jayprakash12345, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, Wong128hk, 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] T323851: Timestamp.fromtimestampformat() class method is failing

2022-11-27 Thread Xqt
Xqt claimed this task.

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

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

To: Xqt
Cc: Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Susie413113, PotsdamLamb, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Jayprakash12345, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, Wong128hk, 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