jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981474 )
Change subject: [doc] Fix changelog
......................................................................
[doc] Fix changelog
Change-Id: Ief2b7fae23090e9654d2be6ed153028bedba3d90
---
M ROADMAP.rst
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 16fd380..8718fb4 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -15,7 +15,7 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ``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
+* *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`
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981474
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ief2b7fae23090e9654d2be6ed153028bedba3d90
Gerrit-Change-Number: 981474
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981372 )
Change subject: [doc] update documentation
......................................................................
[doc] update documentation
Change-Id: I3468536ba2a9e16a52d57e11cbd30ea6bf715c46
---
M ROADMAP.rst
1 file changed, 12 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index c95ddc6..16fd380 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -14,7 +14,8 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-* *output* OutputOption without *out* property is no longer supported with :class:`pywikibot.OutputProxyOption`
+* ``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`
@@ -23,7 +24,7 @@
* *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`
+* Python 3.6 support was dropped (:phab:`T347026`)
Deprecations
@@ -77,5 +78,4 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* 6.2.0: Error messages with '%' style is deprecated in favour for str.format() style
-* 6.2.0: SequenceOutputter.format_list() is deprecated in favour of 'out' property
* 6.0.0: config.register_family_file() is deprecated
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981372
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3468536ba2a9e16a52d57e11cbd30ea6bf715c46
Gerrit-Change-Number: 981372
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981310 )
Change subject: [bugfix] Remove typing imports from user-config.py file
......................................................................
[bugfix] Remove typing imports from user-config.py file
Bug: T352965
Change-Id: Ic82a614fec7dc565d819bb71bc2f6fc836113af4
---
M pywikibot/scripts/generate_user_files.py
1 file changed, 10 insertions(+), 3 deletions(-)
Approvals:
Meno25: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/scripts/generate_user_files.py b/pywikibot/scripts/generate_user_files.py
index f913868..440a5c2 100755
--- a/pywikibot/scripts/generate_user_files.py
+++ b/pywikibot/scripts/generate_user_files.py
@@ -185,9 +185,6 @@
# This is an automatically generated file. You can find more
# configuration parameters in 'config.py' file or refer
# https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.config.html
-from typing import Optional, Union
-
-from pywikibot.backports import Dict, List, Tuple
# The family of sites to be working on.
# Pywikibot will import families/xxx_family.py so if you want to change
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/981310
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ic82a614fec7dc565d819bb71bc2f6fc836113af4
Gerrit-Change-Number: 981310
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Meno25 <meno25mail(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/980822 )
Change subject: [cleanup] remove deprecated code
......................................................................
[cleanup] remove deprecated code
Change-Id: I8300508be0c50cd1fac184b19908e3bd34aaf51c
---
M pywikibot/__init__.py
M pywikibot/bot_choice.py
M ROADMAP.rst
M pywikibot/tools/itertools.py
M pywikibot/page/__init__.py
M pywikibot/tools/formatter.py
6 files changed, 23 insertions(+), 100 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index fc1f35a..c95ddc6 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -14,6 +14,13 @@
Breaking changes and code cleanups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* *output* OutputOption without *out* property is no longer supported with :class:`pywikibot.OutputProxyOption`
+* ``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`
@@ -69,12 +76,6 @@
Will be removed in Pywikibot 9
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-* 6.5.0: OutputOption.output() method will be removed in favour of OutputOption.out property
-* 6.4.0: 'allow_duplicates' parameter of :func:`tools.itertools.intersect_generators` as positional argument is deprecated, use keyword argument instead
-* 6.4.0: 'iterables' of :func:`tools.itertools.intersect_generators` given as a list or tuple is deprecated, either use consecutive iterables or use '*' to unpack
-* 6.2.0: outputter of OutputProxyOption without out property is deprecated
-* 6.2.0: ContextOption.output_range() and HighlightContextOption.output_range() are deprecated
* 6.2.0: Error messages with '%' style is deprecated in favour for str.format() style
-* 6.2.0: page.url2unicode() function is deprecated in favour of tools.chars.url2string()
* 6.2.0: SequenceOutputter.format_list() is deprecated in favour of 'out' property
* 6.0.0: config.register_family_file() is deprecated
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 6781927..93778ab 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -87,8 +87,8 @@
'LexemeSense', 'Link', 'log', 'MediaInfo', 'output', 'Page',
'page_put_queue', 'PropertyPage', 'showDiff', 'show_help', 'Site',
'SiteLink', 'sleep', 'stdout', 'stopme', 'Timestamp', 'translate', 'ui',
- 'url2unicode', 'User', 'warning', 'WbGeoShape', 'WbMonolingualText',
- 'WbQuantity', 'WbTabularData', 'WbTime', 'WbUnknown', 'WikidataBot',
+ 'User', 'warning', 'WbGeoShape', 'WbMonolingualText', 'WbQuantity',
+ 'WbTabularData', 'WbTime', 'WbUnknown', 'WikidataBot',
)
# argvu is set by pywikibot.bot when it's imported
@@ -278,7 +278,6 @@
SiteLink,
User,
html2unicode,
- url2unicode,
)
diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index 882f2b1..cc79ef8 100644
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -13,7 +13,6 @@
import pywikibot
from pywikibot.backports import Iterable, Sequence
-from pywikibot.tools import deprecated, issue_deprecation_warning
class Option(ABC):
@@ -135,17 +134,6 @@
"""
return ''
- @deprecated('pywikibot.info(OutputOption.out)', since='6.5')
- def output(self) -> None:
- """Output string.
-
- .. deprecated:: 6.5
- This method was replaced by :attr:`out` property and is no
- no longer used by the
- :py:mod:`userinterfaces <pywikibot.userinterfaces>` system.
- """
- pywikibot.info(self.out)
-
class StandardOption(Option):
@@ -197,12 +185,6 @@
@property
def out(self) -> str:
"""Return the contents."""
- if not hasattr(self._outputter, 'out'): # pragma: no cover
- issue_deprecation_warning('{} without "out" property'
- .format(self.__class__.__name__),
- since='6.2.0')
- self._outputter.output()
- return ''
return self._outputter.out
@@ -268,11 +250,6 @@
end = min(len(self.text), self.end + self.context)
return self.text[start:end]
- @deprecated('pywikibot.info(ContextOption.out)', since='6.2.0')
- def output_range(self, start: int, end: int) -> None:
- """DEPRECATED. Output a section from the text."""
- pywikibot.info(self.text[start:end])
-
class Choice(StandardOption):
@@ -598,20 +575,6 @@
self.text[self.end:end],
color=self.color)
- @deprecated('pywikibot.info(HighlightContextOption.out)', since='6.2.0')
- def output_range(self, start: int, end: int) -> None:
- """Show normal context with a highlighted center region.
-
- .. deprecated:: 6.2
- use :attr:`out` instead.
- """
- text = '{}<<{color}>>{}<<default>>{}'.format(
- self.text[start:self.start],
- self.text[self.start:self.end],
- self.text[self.end:end],
- color=self.color)
- pywikibot.info(text)
-
class UnhandledAnswer(Exception): # noqa: N818
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index 33fe142c..f5191b5 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -28,8 +28,6 @@
WikibasePage,
)
from pywikibot.site import BaseSite as _BaseSite
-from pywikibot.tools import deprecated, issue_deprecation_warning
-from pywikibot.tools.chars import url2string as _url2string
__all__ = (
@@ -54,7 +52,6 @@
'MediaInfo',
'Revision',
'html2unicode',
- 'url2unicode',
)
PageSourceType = Union[
@@ -62,31 +59,3 @@
_BaseSite,
Page,
]
-
-
-@deprecated('pywikibot.tools.chars.url2string', since='6.2.0')
-def url2unicode(title: str, encodings='utf-8') -> str:
- """Convert URL-encoded text to unicode using several encoding.
-
- Uses the first encoding that doesn't cause an error.
-
- .. deprecated:: 6.2
- Use :func:`tools.chars.url2string` instead.
-
- :param title: URL-encoded character data to convert
- :param encodings: Encodings to attempt to use during conversion.
- :type encodings: str, list or Site
-
- :raise UnicodeError: Could not convert using any encoding.
- """
- if isinstance(encodings, _BaseSite):
- # use all possible encodings from Site object
- encodings = encodings.encodings()
- issue_deprecation_warning(
- 'Passing BaseSite object to encodings parameter',
- 'BaseSite.encodings()',
- depth=1,
- since='6.2.0'
- )
-
- return _url2string(title, encodings)
diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index 548d72e..7008347 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -42,11 +42,6 @@
super().__init__()
self.sequence = sequence
- @deprecated('out', since='6.2.0')
- def format_list(self):
- """DEPRECATED: Create the text with one item on each line."""
- return self.out
-
@property
def out(self):
"""Create the text with one item on each line."""
diff --git a/pywikibot/tools/itertools.py b/pywikibot/tools/itertools.py
index 36bf588..e3679bb 100644
--- a/pywikibot/tools/itertools.py
+++ b/pywikibot/tools/itertools.py
@@ -18,7 +18,7 @@
from pywikibot.backports import Generator, batched
from pywikibot.logging import debug
-from pywikibot.tools import deprecated, issue_deprecation_warning
+from pywikibot.tools import deprecated
__all__ = (
@@ -124,31 +124,18 @@
.. deprecated:: 6.4
``allow_duplicates`` as positional argument,
- ``iterables`` as list type
+ ``iterables`` as list or tuple type
.. versionchanged:: 7.0
Reimplemented without threads which is up to 10'000 times faster
+ .. versionchanged:: 9.0
+ Iterable elements may consist of lists or tuples
+
:param iterables: page generators
:param allow_duplicates: optional keyword argument to allow duplicates
if present in all generators
"""
- # 'allow_duplicates' must be given as keyword argument
- if iterables and iterables[-1] in (True, False):
- allow_duplicates = iterables[-1]
- iterables = iterables[:-1]
- issue_deprecation_warning("'allow_duplicates' as positional argument",
- 'keyword argument "allow_duplicates={}"'
- .format(allow_duplicates),
- since='6.4.0')
-
- # iterables must not be given as tuple or list
- if len(iterables) == 1 and isinstance(iterables[0], (list, tuple)):
- iterables = iterables[0]
- issue_deprecation_warning("'iterables' as list type",
- "consecutive iterables or use '*' to unpack",
- since='6.4.0')
-
if not iterables:
return
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/980822
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8300508be0c50cd1fac184b19908e3bd34aaf51c
Gerrit-Change-Number: 980822
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/980500 )
Change subject: update typing syntax for 3.7
......................................................................
update typing syntax for 3.7
brought to you by pyupgrade, sed, autoflake, and isort
Change-Id: I8864b90799373b442a3147b823cc5dd10eedf3a0
---
M scripts/redirect.py
M pywikibot/logentries.py
M pywikibot/pagegenerators/_filters.py
M pywikibot/daemonize.py
M pywikibot/site/_datasite.py
M scripts/harvest_template.py
M pywikibot/page/_wikibase.py
M scripts/category_redirect.py
M pywikibot/site/_siteinfo.py
M tests/data/fixes.py
M pywikibot/data/api/_paraminfo.py
M pywikibot/site/_interwikimap.py
M pywikibot/echo.py
M pywikibot/config.py
M pywikibot/page/_page.py
M scripts/transwikiimport.py
M pywikibot/page/_collections.py
M pywikibot/textlib.py
M scripts/watchlist.py
M tests/utils.py
M scripts/create_isbn_edition.py
M pywikibot/site/_generators.py
M scripts/dataextend.py
M scripts/newitem.py
M make_dist.py
M pywikibot/pagegenerators/__init__.py
M scripts/replace.py
M pywikibot/site/_decorators.py
M pywikibot/page/_user.py
M pywikibot/_wbtypes.py
M tests/__init__.py
M pywikibot/userinterfaces/_interface_base.py
M pywikibot/data/memento.py
M pywikibot/login.py
M pywikibot/page/_category.py
M pywikibot/page/_basepage.py
M scripts/interwiki.py
M pywikibot/data/__init__.py
M pywikibot/site/_extensions.py
M pywikibot/userinterfaces/terminal_interface_base.py
M pywikibot/i18n.py
M pywikibot/page/_filepage.py
M pywikibot/site/_upload.py
M pywikibot/flow.py
M scripts/welcome.py
M scripts/interwikidata.py
M pywikibot/tools/__init__.py
M pywikibot/__init__.py
M pywikibot/interwiki_graph.py
M pywikibot/page/_toolforge.py
M scripts/revertbot.py
M scripts/data_ingestion.py
M scripts/djvutext.py
M scripts/coordinate_import.py
M pywikibot/site/_namespace.py
M pywikibot/pagegenerators/_factory.py
M pywikibot/tools/_deprecate.py
M scripts/delinker.py
M pywikibot/data/api/_generators.py
M pywikibot/proofreadpage.py
M scripts/category.py
M pywikibot/exceptions.py
M pywikibot/data/sparql.py
M pywikibot/pagegenerators/_generators.py
M tests/aspects.py
M pywikibot/data/api/_optionset.py
M pywikibot/data/mysql.py
M pywikibot/userinterfaces/buffer_interface.py
M scripts/weblinkchecker.py
M pywikibot/comms/eventstreams.py
M pywikibot/scripts/generate_family_file.py
M pywikibot/tools/collections.py
M scripts/maintenance/cache.py
M pywikibot/editor.py
M pywikibot/version.py
M pywikibot/site/_tokenwallet.py
M scripts/checkimages.py
M pywikibot/plural.py
M scripts/pagefromfile.py
M pywikibot/cosmetic_changes.py
M pywikibot/scripts/preload_sites.py
M pywikibot/date.py
M pywikibot/site/_apisite.py
M pywikibot/page/_decorators.py
M pywikibot/data/wikistats.py
M pywikibot/userinterfaces/gui.py
M scripts/add_text.py
M pywikibot/scripts/login.py
M pywikibot/specialbots/_upload.py
M pywikibot/tools/chars.py
M pywikibot/site/_obsoletesites.py
M scripts/blockpageschecker.py
M pywikibot/family.py
M pywikibot/throttle.py
M pywikibot/scripts/wrapper.py
M pywikibot/tools/itertools.py
M pywikibot/site_detect.py
M pywikibot/scripts/generate_user_files.py
M pywikibot/bot.py
M pywikibot/titletranslate.py
M pywikibot/bot_choice.py
M scripts/solve_disambiguation.py
M scripts/parser_function_count.py
M scripts/delete.py
M scripts/templatecount.py
M pywikibot/time.py
M pywikibot/comms/http.py
M pywikibot/diff.py
M pywikibot/logging.py
M scripts/archivebot.py
M tests/data/set-fixes.py
M pywikibot/xmlreader.py
M pywikibot/backports.py
M pywikibot/userinterfaces/transliteration.py
M pywikibot/data/api/_requests.py
M pywikibot/site/_basesite.py
116 files changed, 1,699 insertions(+), 1,821 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/980500
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8864b90799373b442a3147b823cc5dd10eedf3a0
Gerrit-Change-Number: 980500
Gerrit-PatchSet: 15
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Xqt <info(a)gno.de>
Gerrit-MessageType: merged