Skip to content

Commit

Permalink
[9.5] Publish Pywikibot 9.5
Browse files Browse the repository at this point in the history
Change-Id: I932ef97a87073c5633f9f876af60a6a2cc595039
  • Loading branch information
xqt committed Oct 30, 2024
1 parent 84a7294 commit 88d1b4b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
10 changes: 10 additions & 0 deletions ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Current Release Changes
=======================

* Add support for tcywikisource and tcywiktionary (:phab:`T378473`, :phab:`T378465`)
* i18n-updates
* Update invisible chars in :mod:`tools.chars` from unicode 16.0.0
* Rename :meth:`DataSite.getPropertyType()<pywikibot.site._datasite.DataSite.getPropertyType>`
to :meth:`DataSite.get_property_type()<pywikibot.site._datasite.DataSite.get_property_type>`
* provide XXXI with :func:`date.romanNumToInt` and :func:`date.intToRomanNum` functions
* No longer raise :exc:`exceptions.UnsupportedPageError` within :meth:`data.api.PageGenerator.result` (:phab:`T377651`)
* Extract messages with strong tag from xtools as error message in
:meth:`Page.authorship()<page._toolforge.WikiBlameMixin.authorship>` (:phab:`T376815`)

Current Deprecations
====================

* 9.5.0: :meth:`DataSite.getPropertyType()<pywikibot.site._datasite.DataSite.getPropertyType>` will be removed
in favour of :meth:`DataSite.get_property_type()<pywikibot.site._datasite.DataSite.get_property_type>`
* 9.4.0: :mod:`flow` support is deprecated and will be removed (:phab:`T371180`)
* 9.3.0: :meth:`page.BasePage.userName` and :meth:`page.BasePage.isIpEdit` are deprecated in favour of
``user`` or ``anon`` attributes of :attr:`page.BasePage.latest_revision` property
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/__metadata__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
from time import strftime


__version__ = '9.5.0.dev2'
__version__ = '9.5.0'
__url__ = 'https://www.mediawiki.org/wiki/Manual:Pywikibot'
__copyright__ = f'2003-{strftime("%Y")}, Pywikibot team'
2 changes: 1 addition & 1 deletion pywikibot/data/api/_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def result(self, pagedata: dict[str, Any]) -> pywikibot.Page:
This can be overridden in subclasses to return a different type
of object.
.. versionchanged:: 9.4
.. versionchanged:: 9.5
no longer raise :exc:`exceptions.UnsupportedPageError` but
return a generic :class:`pywikibot.Page` obect. The exception
is raised when getting the content for example.
Expand Down
16 changes: 13 additions & 3 deletions pywikibot/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,24 @@ def localDigitsStrToInt(value: str, digitsToLocalDict: Mapping[int, str],


def intToRomanNum(i: int) -> str:
"""Convert integer to roman numeral."""
if i >= len(_romanNumbers):
"""Convert integer to roman numeral.
.. versionchanged:: 9.5
negative *i* is no longer accepted but 31 is a valid value.
:raises IndexError: Roman value *i* is nont in range 0..31
"""
if not 0 <= i < len(_romanNumbers):
raise IndexError(f'Roman value {i} is not defined')
return _romanNumbers[i]


def romanNumToInt(v: str) -> int:
"""Convert roman numeral to integer."""
"""Convert roman numeral to integer.
.. versionchanged:: 9.5
``XXXI`` can be converted.
"""
return _romanNumbers.index(v)


Expand Down
2 changes: 2 additions & 0 deletions pywikibot/site/_datasite.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ def get_property_type(self, prop: pywikibot.page.Property) -> str:
This is used specifically because we can cache the value for a
much longer time (near infinite).
.. versionadded:: 9.5
:raises NoWikibaseEntityError: *prop* does not exist
"""
params = {'action': 'wbgetentities', 'ids': prop.getID(),
Expand Down
10 changes: 10 additions & 0 deletions scripts/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Scripts Changelog
=================

9.5.0
-----

* i18n updates

interwiki
^^^^^^^^^

* Remove ``-repository`` option which was never implemented in core

9.4.1
-----

Expand Down

0 comments on commit 88d1b4b

Please sign in to comment.