[pywikibot] Re: Flagged revisions

2024-02-03 Thread Huji Lee
If you could check which wiki on beta cluster has Flagged Revs enabled and
write some unit tests for the code, we could bring it to Pywikibot core.

On Sat, Feb 3, 2024 at 2:50 PM Bináris  wrote:

> As part of the huwiki package, I wrote some methods dealing with flagged
> revisions that work in some wikis. You may find them useful.
> https://hu.wikipedia.org/wiki/user:BinBot/huwiki/flaggedrevs.py
>
> --
> Bináris
> ___
> pywikibot mailing list -- pywikibot@lists.wikimedia.org
> Public archives at
> https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/5KJDUPEFVTYPYDJBJBMJUZQVSIHLMD4J/
> To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org
>
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at 
https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/6GFFNL67NP7FIME7B7MXUMNXCZWEVIQZ/
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[pywikibot] Flagged revisions

2024-02-03 Thread Bináris
As part of the huwiki package, I wrote some methods dealing with flagged
revisions that work in some wikis. You may find them useful.
https://hu.wikipedia.org/wiki/user:BinBot/huwiki/flaggedrevs.py

-- 
Bináris
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at 
https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/5KJDUPEFVTYPYDJBJBMJUZQVSIHLMD4J/
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org


[Pywikibot-commits] [Gerrit] ...core[master]: [dist] use pyproject.toml for distribution setup

2024-02-03 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/995443?usp=email )

Change subject: [dist] use pyproject.toml for distribution setup
..

[dist] use pyproject.toml for distribution setup

- move information fields from setup.py to pyproject.toml
- add tomli to docs requirements and use that package to read the
  pyproject.toml within docs.conf.py
- remove fields from __meta__ which are in pyproject.toml
- only support __copyright__', '__url__', '__version__ with pywikibot
  and drop support for the others
- read the project name within setup.py using ConfigParser
  and add test for this function

Change-Id: Iae9643f3fe49a41e1997790b8c4bec5ef1616b36
---
M docs/conf.py
M docs/requirements.txt
M pyproject.toml
M pywikibot/__init__.py
M pywikibot/__metadata__.py
M setup.py
M tests/setup_tests.py
7 files changed, 197 insertions(+), 164 deletions(-)

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




diff --git a/docs/conf.py b/docs/conf.py
index 5ca8569..395e968 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,6 @@
 """Configuration file for Sphinx."""
 #
-# (C) Pywikibot team, 2014-2023
+# (C) Pywikibot team, 2014-2024
 #
 # Distributed under the terms of the MIT license.
 #
@@ -24,6 +24,7 @@
 import os
 import re
 import sys
+import tomli
 import warnings
 from pathlib import Path

@@ -78,9 +79,13 @@
 root_doc = 'index'

 # General information about the project.
-project = pywikibot.__name__.title()
+filepath = Path().absolute().parent / 'pyproject.toml'
+with open(filepath, 'rb') as f:
+meta_data = tomli.load(f)
+
+project = meta_data['project']['name'].title()
 project_copyright = pywikibot.__copyright__  # alias since Python 3.5
-author = 'Pywikibot Team'
+author = meta_data['project']['maintainers'][0]['name']

 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 0052ead..d55a081 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -6,3 +6,4 @@
 sphinxext-opengraph >= 0.9.0
 sphinx-notfound-page >= 1.0.0
 furo >= 2023.9.10
+tomli
diff --git a/pyproject.toml b/pyproject.toml
index e94bba3..3c8eb7f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,2 +1,127 @@
 [build-system]
-requires = ["packaging", "setuptools", "wheel"]
\ No newline at end of file
+requires = ["packaging", "setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
+
+
+[project]
+name = "pywikibot"
+
+##
+# Keep this file readable for all entries above this comment #
+##
+
+authors = [
+{name = "xqt", email = "i...@gno.de"},
+]
+maintainers = [
+{name = "The Pywikibot team", email = "pywiki...@lists.wikimedia.org"},
+]
+description = "Python MediaWiki Bot Framework"
+requires-python = ">=3.7.0"
+keywords = [
+"API", "bot", "client", "framework", "mediawiki", "pwb", "pybot", "python",
+"pywiki", "pywikibase", "pywikibot", "pywikipedia", "pywikipediabot",
+"wiki", "wikibase", "wikidata", "wikimedia", "wikipedia",
+]
+license = {text = "MIT License"}
+classifiers=[
+"Development Status :: 5 - Production/Stable",
+"Environment :: Console",
+"Intended Audience :: Developers",
+"License :: OSI Approved :: MIT License",
+"Natural Language :: Afrikaans",
+"Natural Language :: Arabic",
+"Natural Language :: Basque",
+"Natural Language :: Bengali",
+"Natural Language :: Bosnian",
+"Natural Language :: Bulgarian",
+"Natural Language :: Cantonese",
+"Natural Language :: Catalan",
+"Natural Language :: Chinese (Simplified)",
+"Natural Language :: Chinese (Traditional)",
+"Natural Language :: Croatian",
+"Natural Language :: Czech",
+"Natural Language :: Danish",
+"Natural Language :: Dutch",
+"Natural Language :: English",
+"Natural Language :: Esperanto",
+"Natural Language :: Finnish",
+"Natural Language :: French",
+"Natural Language :: Galician",
+"Natural Language :: German",
+"Natural Language :: Greek",
+"Natural Language :: Hebrew",
+"Natural Language :: Hindi",
+"Natural Language :: Hungarian",
+"Natural Language :: Icelandic",
+"Natural Language :: Indonesian",
+"Natural Language :: Irish",
+"Natural Language :: Italian",
+"Natural Language :: Japanese",
+"Natural Language :: Javanese",
+"Natural Language :: Korean",
+"Natural Language :: Latin",
+"Natural Language :: Latvian",
+"Natural Language :: Lithuanian",
+"Natural Language :: Macedonian",
+"Natural Language :: Malay",
+"Natural Language :: Marathi",
+"Natural Language :: Nepali",
+"Natural Language :: Norwegian",
+"Natural Language :: 

[Pywikibot-commits] [Gerrit] ...core[master]: [bugfix] Fix fake-useragent dependency

2024-02-03 Thread Xqt (Code Review)
Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/995394?usp=email )

Change subject: [bugfix] Fix fake-useragent dependency
..

[bugfix] Fix fake-useragent dependency

Currently the latest fake-useragent is 1.4.0

Change-Id: I3f417c800966d39f29fc62387c65b18f3e076fec
---
M setup.py
1 file changed, 12 insertions(+), 1 deletion(-)

Approvals:
  Xqt: Verified; Looks good to me, approved




diff --git a/setup.py b/setup.py
index 80af2a0..7bbfae2 100755
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@
 'Tkinter': ['Pillow>=8.1.2, != 10.0, != 10.1'],
 'mwoauth': ['mwoauth!=0.3.1,>=0.2.4'],
 'html': ['beautifulsoup4>=4.7.1'],
-'http': ['fake-useragent>1.4.0'],
+'http': ['fake-useragent>=1.4.0'],
 'flake8': [  # Due to incompatibilities between packages the order matters.
 'flake8>=5.0.4',
 'darglint2',

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/995394?usp=email
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: I3f417c800966d39f29fc62387c65b18f3e076fec
Gerrit-Change-Number: 995394
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Xqt 
Gerrit-MessageType: merged
___
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org