jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[doc] Update Python doc links to PY3

Change-Id: I04d535e689e5fc8c4c598c03e260599088bf0ef2
---
M pywikibot/config2.py
M pywikibot/logging.py
M pywikibot/textlib.py
M scripts/weblinkchecker.py
M tests/README.rst
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 1540dfe..e8316a2 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -460,7 +460,7 @@
# The encoding in which textfiles are stored, which contain lists of page
# titles. The most used is 'utf-8'; 'utf-8-sig' recognizes BOM.
# For a complete list please see:
-# https://docs.python.org/2/library/codecs.html#standard-encodings
+# https://docs.python.org/3/library/codecs.html#standard-encodings
textfile_encoding = 'utf-8'

# tkinter isn't yet ready
@@ -1161,7 +1161,7 @@

if OSWIN32 and editor:
# single character string literals from
- # https://docs.python.org/2/reference/lexical_analysis.html#string-literals
+ # https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
# encode('unicode-escape') also changes Unicode characters
if set(editor) & set('\a\b\f\n\r\t\v'):
warning(
diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index 4cf2691..8976cad 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -159,7 +159,7 @@
@param newline: If True, a line feed will be added after printing the text.
@type newline: bool
@param kwargs: The keyword arguments can be found in the python doc:
- https://docs.python.org/2/howto/logging-cookbook.html#logging-cookbook.
+ https://docs.python.org/3/howto/logging-cookbook.html.
"""
logoutput(text, decoder, newline, WARNING, **kwargs)

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index d92bc93..f595eaa 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -525,7 +525,7 @@
return parser.textdata


-# thanks to https://docs.python.org/2/library/htmlparser.html
+# thanks to https://docs.python.org/3/library/html.parser.html
class _GetDataHTML(HTMLParser):
textdata = ''
keeptags = []
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index a00b34a..958f0d1 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -484,7 +484,7 @@
except httplib.error as error:
return False, 'HTTP Error: {}'.format(error.__class__.__name__)
except socket.error as error:
- # https://docs.python.org/2/library/socket.html :
+ # https://docs.python.org/3/library/socket.html :
# socket.error :
# The accompanying value is either a string telling what went
# wrong or a pair (errno, string) representing an error
diff --git a/tests/README.rst b/tests/README.rst
index 20584d7..b2e8500 100644
--- a/tests/README.rst
+++ b/tests/README.rst
@@ -3,12 +3,12 @@
===============

The Pywikibot tests are based on the `unittest framework
-<https://docs.python.org/2/library/unittest.html>`_,
+<https://docs.python.org/3/library/unittest.html>`_,
and are compatible with `nose <https://nose.readthedocs.org/>`_.

The tests package provides a function load_tests that supports the
`load tests protocol
-<https://docs.python.org/2/library/unittest.html#load-tests-protocol>`_.
+<https://docs.python.org/3/library/unittest.html#load-tests-protocol>`_.
The default ordering begins with tests of underlying components, then tests
site and page semantics, and finishes with tests of the scripts and finally
any tests which have not been inserted into the ordered list of tests.

To view, visit change 513670. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I04d535e689e5fc8c4c598c03e260599088bf0ef2
Gerrit-Change-Number: 513670
Gerrit-PatchSet: 2
Gerrit-Owner: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)