jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1100075?usp=email )
Change subject: [IMPR] Remove warning if Pywikibot is running with Python 3.7 ......................................................................
[IMPR] Remove warning if Pywikibot is running with Python 3.7
Also update ROADMAP.rst and HISTORY.rst.
This prepares a yet unpublished Pywikibot 9.6.1 and 10
Change-Id: I1572cf2aa9f1d72b8ea5ce21bfe8d72be5e439e0 --- M HISTORY.rst M ROADMAP.rst M pywikibot/__init__.py M pywikibot/__metadata__.py M tests/utils.py 5 files changed, 26 insertions(+), 34 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst index eafd659..186f92f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,29 @@ Release History ===============
+9.6.0 +----- + +* Add support for idwikivoyage (:phab:`T381082`) +* Add docstrings of :class:`tools.classproperty` methods (:phab:`T380628`) +* Site property :attr:`BaseSite.codes<pywikibot.site._basesite.BaseSite.codes>` was added (:phab:`T380606`) +* Increase *leeway* parameter of :meth:`login.OauthLoginManager.identity` (:phab:`T380270`) +* Show a warning if *ignore_extension* parameter of :class:`pywikibot.FilePage` was set and the extension is invalid +* Remove old code of Python 3.2 or older in :func:`tools.chars.replace_invisible` due to :pep:`393` +* use :meth:`BasePage.autoFormat()<page.BasePage.autoFormat>` instead of :func:`date.getAutoFormat` in + :mod:`titletranslate` +* Upcast :class:`pywikibot.Page` to :class:`pywikibot.FilePage` in :meth:`PageGenerator.result() + <data.api.PageGenerator.result>` if ``imageinfo`` is given (:phab:`T379513`) +* Update oauth requirements +* i18n-updates +* Implement param *with_sort_key* in :meth:`page.BasePage.categories` (:phab:`T75561`) +* Python 3.7 support will be discontinued and probably this is the last version supporting it +* Add :meth:`page.BasePage.get_revision` method +* Retry :meth:`data.sparql.SparqlQuery.query` on internal server error (500) (:phab:`T378788`) +* Extract :meth:`APISite.linktrail()<pywikibot.site._apisite.APISite.linktrail>` + for hr-wiki (:phab:`T378787`) + + 9.5.0 ----- *30 October 2024* diff --git a/ROADMAP.rst b/ROADMAP.rst index b706a44..a2b2b64 100644 --- a/ROADMAP.rst +++ b/ROADMAP.rst @@ -1,25 +1,7 @@ Current Release Changes =======================
-* Add support for idwikivoyage (:phab:`T381082`) -* Add docstrings of :class:`tools.classproperty` methods (:phab:`T380628`) -* Site property :attr:`BaseSite.codes<pywikibot.site._basesite.BaseSite.codes>` was added (:phab:`T380606`) -* Increase *leeway* parameter of :meth:`login.OauthLoginManager.identity` (:phab:`T380270`) -* Show a warning if *ignore_extension* parameter of :class:`pywikibot.FilePage` was set and the extension is invalid -* Remove old code of Python 3.2 or older in :func:`tools.chars.replace_invisible` due to :pep:`393` -* use :meth:`BasePage.autoFormat()<page.BasePage.autoFormat>` instead of :func:`date.getAutoFormat` in - :mod:`titletranslate` -* Upcast :class:`pywikibot.Page` to :class:`pywikibot.FilePage` in :meth:`PageGenerator.result() - <data.api.PageGenerator.result>` if ``imageinfo`` is given (:phab:`T379513`) -* Update oauth requirements -* i18n-updates -* Implement param *with_sort_key* in :meth:`page.BasePage.categories` (:phab:`T75561`) -* Python 3.7 support will be discontinued and probably this is the last version supporting it -* Add :meth:`page.BasePage.get_revision` method -* Retry :meth:`data.sparql.SparqlQuery.query` on internal server error (500) (:phab:`T378788`) -* Extract :meth:`APISite.linktrail()<pywikibot.site._apisite.APISite.linktrail>` - for hr-wiki (:phab:`T378787`) - +* (no changes yet)
Current Deprecations ==================== diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 6819a7f..2375309 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -59,7 +59,7 @@ ) from pywikibot.site import BaseSite as _BaseSite from pywikibot.time import Timestamp -from pywikibot.tools import PYTHON_VERSION, normalize_username +from pywikibot.tools import normalize_username
if TYPE_CHECKING: @@ -87,15 +87,6 @@
_sites: dict[str, APISite] = {}
-if PYTHON_VERSION < (3, 8): - __version = sys.version.split(maxsplit=1)[0] - warn(f""" - - Python {__version} will be dropped soon with Pywikibot 10. - It is recommended to use Python 3.8 or above. - See phab: T379227 for further information. -""", FutureWarning) # adjust this line no in utils.execute() -
@cache def _code_fam_from_url(url: str, name: str | None = None diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py index 73d3b8f..8a63ca1 100644 --- a/pywikibot/__metadata__.py +++ b/pywikibot/__metadata__.py @@ -12,6 +12,6 @@ from time import strftime
-__version__ = '9.6.0' +__version__ = '9.6.1' __url__ = 'https://www.mediawiki.org/wiki/Manual:Pywikibot' __copyright__ = f'2003-{strftime("%Y")}, Pywikibot team' diff --git a/tests/utils.py b/tests/utils.py index 89b92bb..c80e331 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -23,7 +23,6 @@ from pywikibot.exceptions import APIError from pywikibot.login import LoginStatus from pywikibot.site import Namespace -from pywikibot.tools import PYTHON_VERSION from pywikibot.tools.collections import EMPTY_DEFAULT from tests import _pwb_py
@@ -474,9 +473,6 @@
:param command: executable to run and arguments to use """ - if PYTHON_VERSION < (3, 8): - command.insert(1, '-W ignore::FutureWarning:pywikibot:97') - env = os.environ.copy()
# Prevent output by test package; e.g. 'max_retries reduced from x to y'
pywikibot-commits@lists.wikimedia.org