Pywikibot

Latest version: v9.5.0

Safety actively analyzes 683530 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 17

9.2.0

-----
*22 June 2024*

* Add support for ``btmwiki`` to Pywikibot (:phab:`T368069`)
* Include image repository extensions in :attr:`site.APISite.file_extensions
<pywikibot.site._apisite.APISite.file_extensions>`
* Add :func:`pagegenerators.SupersetPageGenerator` pagegenerator (:phab:`T367684`)
* No longer wait in :meth:`data.api.Request._http_request` for ``ImportError`` and ``NameError``
* Replace ``requests.utils.urlparse`` with ``urllib.parse.urlparse`` in
:func:`comms.http.get_authentication` (:phab:`T367649`)
* Show an appropiate message if ``requests_oauthlib`` package is required but missing (:phab:`T353387`)
* Retry ``DBUnexpectedError`` in :meth:`data.api.Request._internal_api_error` (:phab:`T367383`)
* Duplicated entries found in :mod:`pywikibot` were removed
* Pass ``None`` instead of an empty string as *expiry* argument in
:meth:`site.APISite.protect()<pywikibot.site._apisite.APISite.protect>` (:phab:`T367176`)
* Fix keyword argument in :meth:`Page.undelete()<page.BasePage.undelete>` when
calling :meth:`site.APISite.undelete()<pywikibot.site._apisite.APISite.undelete>` (:phab:`T367037`)
* Check whether :attr:`BaseBot.generator<bot.BaseBot.generator>` is None in :meth:`run()<bot.BaseBot.run>` method
* Add *namespaces* parameter to :meth:`Page.templates()<page.BasePage.templates>` and
:meth:`Page.itertemplates()<page.BasePage.itertemplates>` and require keyword arguments;
only use TEMPLATE namespace for meth:`Page.isDisambig()<page.BasePage.isDisambig>` (:phab:`T365199`)
* Drop pheetools support for :mod:`proofreadpage` which is no longer available upstreams (:phab:`T366036`)
* Raise :exc:`exceptions.SectionError` if a section does not exists on a page (:phab:`T107141`)
* Retry api request on ServerError (:phab:`T364275`, :phab:`T364393`)
* i18n updates

9.1.3

-----
*28 May 2024*

* Add support for dtpwiki (:phab:`T365232`)
* i18n updates

9.1.2

-----
*03 May 2024*

* Remove line endings in :func:`version.getversion_nightly` (:phab:`T363943`)
* Provide ``-nouser`` option with :mod:`pywikibot.scripts.version`
* i18n updates

9.1.1

-----
*27 April 2024*

* Add support for new wikis (:phab:`T363272`, :phab:`T363265`, :phab:`T363258`,
:phab:`T363251`, :phab:`T363245`, :phab:`T360312`, :phab:`T360305`)
* i18n updates

9.1.0

-----
*22 April 2024*

* Circumvent problems with *unique* and *prefix* parameters in :meth:`Site.alllinks()
<pywikibot.site._generators.GeneratorsMixin.alllinks>` (:phab:`T359427`)
* Detect nighly version file with :func:`version.getversion_nightly` (:phab:`T362492`)
* :mod:`version`.github_svn_rev2hash() was removed; it was no longer functional (:phab:`T362484`)
* SVN support has been dropped; ``.svnprops`` property settings was removed (:phab:`T362484`)
* Skip process that requires login to logout (:phab:`T326614`)
* File title of :class:`specialbots.UploadRobot` must have a valid file extension (:phab:`T345786`)
* Add a :attr:`post_processor<specialbots.UploadRobot.post_processor>` attribute to :class:`specialbots.UploadRobot`
which can be called after each upload (:phab:`T359766`)
* Avoid using :meth:`pywikibot.handle_args` in private scripts;
use :mod:`pwb<pywikibot.scripts.wrapper>` wrapper instead (:phab:`T359766`)
* Show upload count with :class:`specialbots.UploadRobot`
* Use the same ``iiprop`` properties in :class:`data.api.PageGenerator` as in
:meth:`APISite.loadimageinfo<pywikibot.site._apisite.APISite.loadimageinfo>` (:phab:`T360093`)
* i18n updates

9.0.0

-----
*08 March 2024*

**Improvements**

* Python 3.13 is supported
* Update :mod:`tools`._unidata._category_cf from Unicodedata version 15.1.0
* :meth:`Timestamp.nowutc()<pywikibot.time.Timestamp.nowutc>` and
:meth:`Timestamp.utcnow()<pywikibot.time.Timestamp.utcnow>` were added (:phab:`T337748`)
* Remove content parameter of :meth:`proofreadpage.IndexPage.page_gen` method. (:phab:`T358635`)
* Backport ``itertools.batched`` from Python 3.13 to :func:`backports.batched`
* A copy button was added to the sphinx documentation.
* Make :attr:`languages_by_size<family.WikimediaFamily.languages_by_size>` dynamic (:phab:`T78396`). The property is
only available for :class:`family.WikimediaFamily` families. The ``wikimedia_sites.py`` maintenance script was
removed.
* Add :func:`config.base_dir<config.get_base_dir>` to scripts search path with :mod:`pwb` wrapper (:phab:`T324287`)
* :meth:`pywikibot.WbTime.equal_instant` was added (:phab:`T325248`)
* ``revisions`` parameter of :class:`xmlreader.XmlDump` was introduced to specify parsing method
(:phab:`T340804`)
* Pass global -nolog argument into bot script from wrapper (:phab:`T328900`)
* Add :meth:`site.APISite.ratelimit()<pywikibot.site._apisite.APISite.ratelimit>` method
and :class:`tools.collections.RateLimit` NamedTuple (:phab:`T304808`)
* L10N and i18n updates
* Add :class:`pagegenerators.PagePilePageGenerator` (:phab:`T353086`)

**Bugfixes**

* :meth:`Timestamp.now()<pywikibot.time.Timestamp.now>` and
:meth:`Timestamp.fromtimestamp()<pywikibot.time.Timestamp.fromtimestamp>` also returns a
:class:`Timestamp<pywikibot.time.Timestamp>` object with Python 3.7
* Populate :class:`pywikibot.MediaInfo`._content with expected attributes when loaded (:phab:`T357608`)
* Raise :exc:`exceptions.APIError` if the same error comes twice within :meth:`data.api.Request.submit` loop
(:phab:`T357870`)
* Only delegate :mod:`site` methods to public :class:`family.Family` methods which have *code* as first parameter.
* Use ``str`` instead of ``repr`` for several messages with :class:`family.Family` objects (:phab:`T356782`)
* Add ``hy`` to special languages in :class:`textlib.TimeStripper` (:phab:`T356175`)
* Pass login token when using ``action=login`` (:phab:`T309898`)
* Detect range blocks with :meth:`pywikibot.User.is_blocked` (:phab:`T301282`)
* Use only ``end`` tags in ElementTree.iterparse in :mod:`xmlreader` module (:phab:`T354095`)
* Suppress error in :meth:`cosmetic_changes.CosmeticChangesToolkit.cleanUpLinks` (:phab:`T337045`)
* :func:`pywikibot.input_choice` validates *default* parameter (:phab:`T353097`)
* Remove typing imports from user-config.py file (:phab:`T352965`)

**Breaking changes and code cleanups**

* Cache directory was renamed from ``apicache-py3`` to ``apicache`` due to timestamp changes. (:phab:`T337748`)
**Warning:** Do not use Pywikibot 9+ together with Pywikibot 3.0.20181203 and below.
* Raise ``TypeError`` instead of ``AttributeError`` in :meth:`Site.randompages()
<pywikibot.site._generators.GeneratorsMixin.randompages>` if *redirects* parameter is invalid.
* A RuntimeError will be raised if a :class:`family.Family` subclass has an ``__init__`` initializer method.
:meth:`family.Family.__post_init__` classmethod can be used instead.
* :class:`InteractiveReplace<bot_choice.InteractiveReplace>` was moved from :mod:`bot` to :mod:`bot_choice` module
* ``userinterfaces.transliteration.transliterator`` was renamed to :class:`Transliterator
<userinterfaces.transliteration.Transliterator>`
* ``pywikibot.BaseSite`` and ``pywikibotAPISite`` were dropped. :func:`pywikibot.Site` has to be used to create a
:mod:`site` object.
* ``next`` parameter of :meth:`userinterfaces.transliteration.Transliterator.transliterate` was renamed to ``succ``
* ``type`` parameter of :meth:`site.APISite.protectedpages()<pywikibot.site._generators.GeneratorsMixin.protectedpages>`
was renamed to ``protect_type``
* ``all`` parameter of :meth:`site.APISite.namespace()<pywikibot.site._apisite.APISite.namespace>` was renamed to
``all_ns``
* ``filter`` parameter of :func:`date.dh` was renamed to ``filter_func``
* ``dict`` parameter of :class:`data.api.OptionSet` was renamed to ``data``
* ``setuptools`` package is no longer mandatory but required for tests
(:phab:`T340640`, :phab:`T347052`, :phab:`T354515`)
* ``root`` attribute of :class:`xmlreader.XmlDump` was removed
* ``tools.Version`` class was removed; use classes from ``packaging.version`` instead (:phab:`T340640`)
* ``packaging`` package is mandatory; ``importlib_metadata`` package is required for Python 3.7 (:phab:`T340640`)
* ``SelfCallMixin``, ``SelfCallDict`` and ``SelfCallString`` of :mod:`tools` module were removed
* Calling :attr:`site.BaseSite.sitename<pywikibot.site._basesite.BaseSite.sitename>` as a function
is no longer supported
* ``config.register_family_file()`` function was removed
* require ``PyMySQL >= 1.0.0`` if necessary
* ``keys()`` and ``items()`` methods of :class:`data.api.Request` gives a view instead a list (:phab:`T310953`)
* ``SequenceOutputter.format_list()`` was removed in favour of :attr:`tools.formatter.SequenceOutputter.out` property
* *output* parameter of :class:`bot_choice.OutputProxyOption` (i.e. ``OutputOption`` instance) without *out* property is
no longer supported
* ``OutputOption.output()`` method was removed
* ``ContextOption.output_range()`` and ``HighlightContextOption.output_range()`` methods were removed
* ``page.url2unicode()`` function was removed in favour of :func:`tools.chars.url2string`
* *iterables* of :func:`tools.itertools.intersect_generators` must not be given as a single list or tuple;
either consecutive iterables must be used or '*' to unpack
* *allow_duplicates* parameter of :func:`tools.itertools.intersect_generators` must be given as keyword argument
* Infinite rotating file handler with ``config.logfilesize`` of -1 is no longer supported
* ``Throttle.multiplydelay`` attribute was removed
* Python 3.6 support was dropped (:phab:`T347026`)

Page 2 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.