Pywikibot

Latest version: v9.0.0

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

Scan your dependencies

Page 1 of 16

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`)

8.6.0

-----
*05 December 2023*

* Lazy load imageinfo metadata (:phab:`T253591`, :phab:`T258036`)
* Fetch URL of page scan via :api:`imageforpage` in :mod:`proofreadpage` module
(:phab:`T114318`, :phab:`T181913`, :phab:`T352524`)
* Sort page names before loading pages in :mod:`proofreadpage` module
* L10N and i18n updates
* check for valid family and site option after ``-help`` is processed (:phab:`T350756`)
* Handle canary events in comms.eventstreams (:phab:`T350756`)

8.5.1

-----
*11. November 2023*

* Add support for new wikis (:phab:`T350231`, :phab:`T350237`, :phab:`T350243`, :phab:`T350375`)

8.5.0

-----
*05. November 2023*

* Add a pagegenerators filter option to check if a page is redirect (:phab:`T261549`)
* Add support for ``vikidia:nl`` site
* Replace MediaWiki API deprecated ``inprop=preload`` with ``preloadcontent`` (:phab:`T348910`)
* Remove check for purge right from APISite.purgepages (:phab:`T349348`)
* Add MediaInfo editLabels, AddClaim and removeClaim functions (:phab:`T348422`)
* Drop unused ``Family.use_hard_category_redirects`` (:phab:`T348953`)
* No longer drop site decorators for optimized codes (:phab:`T74424`)
* Improve handling of uninitialized MediaInfo
* Add support for ``vikidia:ar`` site
* Make exception about missing mediainfo more friendly
* L10N and i18n updates
* Give visible error to user when there are no rights (:phab:`T345342`)

8.4.0

-----
*07. October 2023*

* Add support for fonwiki (:phab:`T347941`)
* :meth:`site.BaseSite.redirects()<pywikibot.site._basesite.BaseSite.redirects>` and
:meth:`site.APISite.redirects()<pywikibot.site._apisite.APISite.redirects>`
methods were added (:phab:`T347226`)
* Upcast to :class:`pywikibot.FilePage` for a proper extension only (:phab:`T346889`)
* Handle missing SDC mediainfo (:phab:`T345038`)
* *modules_only_mode* parameter of :class:`data.api.ParamInfo`, its *paraminfo_keys* class attribute
and its *preloaded_modules* property was deprecated, the :meth:`data.api.ParamInfo.normalize_paraminfo`
method became a staticmethod (:phab:`T306637`)
* raise ValueError when :class:`pywikibot.FilePage` title doesn't have a valid file extension (:phab:`T345786`)
* :attr:`site.APISite.file_extensions <pywikibot.site._apisite.APISite.file_extensions>` property was added
(:phab:`T345786`)
* ``dropdelay`` and ``releasepid`` attributes of :class:`throttle.Throttle` where deprecated
in favour of `expiry` class attribute
* Add https scheme if missing in url asked by :mod:`pywikibot.scripts.generate_family_file`
* L10N updates and i18n updates
* use inline re.IGNORECASE flag in :func:`textlib.case_escape` function (:phab:`T308265`)
* Convert URL-encoded characters also for links outside main namespace with
:meth:`cosmetic_changes.CosmeticChangesToolkit.cleanUpLinks` (:phab:`T342470`)
* Implement Flow topic summaries (:phab:`T109443`)

8.3.3

-----
*20. September 2023*

* Extract code and family from dbname in :meth:`site.APISite.fromDBName()
<pywikibot.site._apisite.APISite.fromDBName>` (:phab:`T345036`)
* L10N and i18n updates

Page 1 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.