jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345195?usp=email )
Change subject: [doc] Update ROADMAP.rst, CHANGELOG.rst and docstrings
......................................................................
[doc] Update ROADMAP.rst, CHANGELOG.rst and docstrings
Change-Id: Icc2449e876cb5f6e243c07db8ae178e1142b7604
---
M ROADMAP.rst
M docs/api_ref/bot.rst
M pywikibot/bot.py
M pywikibot/comms/http.py
M pywikibot/data/sparql.py
M pywikibot/i18n.py
M pywikibot/page/_basepage.py
M pywikibot/tools/threading.py
M scripts/CHANGELOG.rst
9 files changed, 101 insertions(+), 6 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 60b1300..e0d3737 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,8 +1,53 @@
Release 11.8
============
+* Load only current revision ID with :attr:`page.BasePage.latest_revision_id`.
+* Return non-option defaults with :func:`bot.input_list_choice`.
(:phab:`T305937`)
+* Add
:meth:`APISite.geosearch()<pywikibot.site._extensions.GeoDataMixin.geosearch>`
+ method. (:phab:`T438772`)
+* Preserve labels with different prefixes in :func:`textlib.replace_links`.
(:phab:`T396719`)
+* Resolve :func:`i18n.bundles` paths from package.
+* Add :meth:`pywikibot.User.is_globally_blocked` and
:meth:`APISite.is_globally_blocked()
+ <pywikibot.site._extensions.GlobalBlockingMixin.is_globally_blocked>` to
support
+ :ext:`GlobalBlocking extension<GlobalBlocking/API#list=globalblocks_(bg)>`.
(:phab:`T394628`)
+* Initialize the wrapped generator once per lifecycle with
+ :class:`tools.collections.GeneratorWrapper`.
+* Use ``functools.cache`` for :func:`date.escapePattern2`.
+* Avoid mutating request inputs in :func:`comms.http.fetch`.
+* Buffer :class:`textlib.GetDataHTML` output in
:attr:`textlib.GetDataHTML.textdata`.
+* Short-circuit intersection cache checks in
:func:`tools.itertools.intersect_generators`.
+* Add :ext:`PageViewInfo` extension support with
:meth:`page.BasePage.pageviews`
+ and
:class:`site.PageViewInfoMixin<pywikibot.site._extensions.PageViewInfoMixin>`.
+ (:phab:`T325473`)
+* Use plain dictionaries for Wikibase :class:`pywikibot.Claim` mappings.
+* Add :attr:`page.BasePage.flagged_state` and :meth:`APSite.flagged_state()
+ <pywikibot.site._extensions.FlaggedRevsMixin.flagged_state>` site method
+ for :ext:`FlaggedRevs` info. (:phab:`T410893`)
+* Disable ``maxlag`` for meta queries, paraminfo and help. (:phab:`T421642`)
+* Added Ukrainian Vikidia and updated testing subdomains for that family.
* Correctly propagate reference group hashes after
:meth:`page.WikibaseEntity.editEntity`. (:phab:`T367324`)
+* Prevent recursive logging :func:`handler initialization<bot.init_handlers>`.
(:phab:`T436130`)
+* Avoid duplicate revision updates and avoid constructing cached file revisions
+ again in :class:`FilePage<page.FilePage>`.
+* Stop pre-encoding API titles because :class:`data.api.Request` normalizes
+ byte parameters back to strings before serialization.
+* Isolate cached tables by server URL in :mod:`data.wikistats` module.
+* Exceptions from the :meth:`tools.threading.ThreadedGenerator.run` producer
+ are re-raised during iteration after yielding any queued results.
+* Release bounded capacity in
:meth:`tools.threading.BoundedPoolExecutor.submit`
+ when submission fails with any Exception.
+* Avoid duplicate key evaluation in :func:`tools.itertools.filter_unique`.
+* Replace :func:`tools.strtobool` value checks with constant mapping.
+* Avoid unnecessary request if *total* is 0 in
:meth:`Category.articles()<page.Category.articles>`.
+* Reject invalid :class:`tools.threading.ThreadList` limits.
+* Public *reason* and *comment* parameters used for page-action and upload
+ summaries were renamed to *summary*. The old parameter names remain
+ available as deprecated aliases. (:phab:`T62442`)
+* Cache valid site codes in :func:`titletranslate.translate`.
+* Normalize family aliases in :meth:`data.wikistats.WikiStats.get` before
cache lookup.
+* Preserve Windows commands without a file placeholder in
:class:`editor.TextEditor`.
+* Preserve existing endpoint query parameters in
:meth:`data.sparql.SparqlQuery.query`.
* Reset the retry counter for each query in :class:`data.sparql.SparqlQuery`.
* Deduplicate intersections with a single input in
:func:`tools.itertools.intersect_generators`.
* Accept path-like filenames and detect suffixes case-insensitively in
:func:`tools.open_archive`.
@@ -31,9 +76,6 @@
* Update translations (i18n).
* Add new :class:`family.WikimediaSubdomainFamily`.
* Update documentation for :meth:`page.BasePage.exists`. (:phab:`T334341`)
-* Public *reason* and *comment* parameters used for page-action and upload
- summaries were renamed to *summary*. The old parameter names remain
- available as deprecated aliases. (:phab:`T62442`)
Deprecations
diff --git a/docs/api_ref/bot.rst b/docs/api_ref/bot.rst
index ce3e886..332442d 100644
--- a/docs/api_ref/bot.rst
+++ b/docs/api_ref/bot.rst
@@ -36,3 +36,5 @@
object is passed to *generator* keyword parameter.
.. warning:: this is just a sample
+
+ .. autofunction:: _init_handlers
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 3ab9aec..8981cae 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -374,6 +374,9 @@
.. version-changed:: 6.2
Different logfiles are used if multiple processes of the same
script are running.
+ .. version-changed:: 11.8
+ Moved to :func:`_init_handlers` to prevent recursive handler
+ initialization.
"""
global _handlers_initializing
@@ -389,7 +392,11 @@
def _init_handlers() -> None:
- """Initialize logging handlers without a re-entrancy check."""
+ """Initialize logging handlers without a re-entrancy check.
+
+ .. version-added:: 11.8
+ Moved from :func:`init_handlers`.
+ """
module_name = calledModuleName()
if not module_name:
module_name = 'terminal-interface'
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 7df0643..c9e6cf7 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -434,6 +434,8 @@
.. version-changed:: 7.0
The *body* parameter was removed; use *data* instead.
+ .. version-changed:: 11.8
+ Avoid mutating headers inputs.
See :py:obj:`requests.Session.request` for parameters.
diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py
index 29fd989..1f8a494 100644
--- a/pywikibot/data/sparql.py
+++ b/pywikibot/data/sparql.py
@@ -135,6 +135,9 @@
looks like the user is not logged in.
.. version-changed:: 9.6
retry on internal server error (500).
+ .. version-changed:: 11.8
+ Preserve existing endpoint query parameters.
+
:param query: Query text
:raises NoUsernameError: User not logged in
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 25cd470..a777a2d 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -885,6 +885,9 @@
'i18n'
.. version-added:: 7.0
+ .. version-changed:: 11.8
+ Resolve message bundle directories from the imported messages
+ package instead of the current working directory.
:param stem: Yield the Path.stem if True and the Path object otherwise
"""
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index 791281a..0aff881 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -2040,7 +2040,7 @@
) -> dict[str, int | None]:
"""Return daily page views for this page.
- Uses the MediaWiki extension PageViewInfo.
+ Uses the MediaWiki extension :ext:`PageViewInfo<PageViewInfo>`.
.. version-added:: 11.8
diff --git a/pywikibot/tools/threading.py b/pywikibot/tools/threading.py
index c344960..00bc078 100644
--- a/pywikibot/tools/threading.py
+++ b/pywikibot/tools/threading.py
@@ -148,13 +148,16 @@
.. version-changed:: 10.0
the unintentional and undocumented *args* parameter was removed.
+ .. version-changed:: 11.8
+ Raise TypeError if *limit* is not an integer; raise ValueError if
+ *limit* is less than 1.
.. seealso:: :class:`BoundedPoolExecutor`
:param limit: the positive integer number of simultaneous threads
:param wait_time: how long to wait if active threads exceeds limit
:raises TypeError: limit is not an integer or is a boolean
- :raises ValueError: limit is less than 1
+ :raises ValueError: limit is less than 1.
"""
limit: int = 128 #: :meta private:
@@ -270,6 +273,10 @@
max_workers=1) as executor:
future = executor.submit(pow, 323, 1235)
print(future.result())
+
+ .. version-changed:: 11.8
+ Release bounded capacity when submission fails with any
+ Exception.
"""
self._bound_semaphore.acquire()
diff --git a/scripts/CHANGELOG.rst b/scripts/CHANGELOG.rst
index b8cb89c..3c3a3be 100644
--- a/scripts/CHANGELOG.rst
+++ b/scripts/CHANGELOG.rst
@@ -9,6 +9,16 @@
* Fix ``-locale`` and ``-timezone`` options.
+category
+^^^^^^^^
+
+* Extract argument handling. (:phab:`T434526`)
+
+category_graph
+^^^^^^^^^^^^^^
+
+* Cache subcategory lists.
+
category_redirect
^^^^^^^^^^^^^^^^^
@@ -46,12 +56,26 @@
* Fix explicit :func:`pywikibot.handle_args` arguments.
+redirect
+^^^^^^^^
+
+* Prevent infinite recursion loop in fix_moved_broken_redirects.
(:phab:`T432620`)
+
+reflinks
+^^^^^^^^
+
+* Skip adding references to templates.
+
solve_disambiguation
^^^^^^^^^^^^^^^^^^^^
* Return on OSError, preserving the initialized ignore list as the pre-pathlib
implementation
did.
+touch
+^^^^^
+
+* Avoid recalculating cached purge rate limits.
tracking_param_remover
^^^^^^^^^^^^^^^^^^^^^^
@@ -63,6 +87,11 @@
* Make summaries order-independent.
+weblinkchecker
+^^^^^^^^^^^^^^
+
+* Honour ``-ignore`` HTTP status codes
+
11.7.0
------
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345195?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Icc2449e876cb5f6e243c07db8ae178e1142b7604
Gerrit-Change-Number: 1345195
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]