jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/483764 )
Change subject: [bugfix] Remove disfunctional cgi_interface.py ......................................................................
[bugfix] Remove disfunctional cgi_interface.py
Bug: T248250 Bug: T248292 Bug: T193978 Change-Id: Ib838d5d7bff021849798be1a35a1ddd00fa8281b --- M pywikibot/CONTENT.rst M pywikibot/config2.py D pywikibot/userinterfaces/cgi_interface.py 3 files changed, 1 insertion(+), 28 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst index 7d56f9d..1069f55 100644 --- a/pywikibot/CONTENT.rst +++ b/pywikibot/CONTENT.rst @@ -147,8 +147,6 @@ +-----------------------------------------------------------------------------------+ | User Interface | +============================+======================================================+ - | cgi_interface.py | CGI user interface | - +----------------------------+------------------------------------------------------+ | gui.py | GUI with a unicode textfield where the user can edit | +----------------------------+------------------------------------------------------+ | terminal_interface.py | Platform independent terminal interface module | diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 08de9c4..b36531b 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -456,7 +456,7 @@ # https://docs.python.org/3/library/codecs.html#standard-encodings textfile_encoding = 'utf-8'
-# tkinter isn't yet ready +# currently terminal is the only userinterface supported userinterface = 'terminal'
# this can be used to pass variables to the UI init function diff --git a/pywikibot/userinterfaces/cgi_interface.py b/pywikibot/userinterfaces/cgi_interface.py deleted file mode 100644 index 44a5cbb..0000000 --- a/pywikibot/userinterfaces/cgi_interface.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -"""CGI user interface.""" -# -# (C) Pywikibot team, 2007-2018 -# -# Distributed under the terms of the MIT license. -# -from __future__ import absolute_import, division, unicode_literals - -import sys - - -class UI(object): - - """CGI user interface.""" - - def output(self, text, colors=None, newline=True, toStdout=False): - """Output text to CGI stream if toStdout is True.""" - if not toStdout: - return - sys.stdout.write(text.encode('UTF-8', 'replace')) - - def input(self, question, colors=None): - """Output question to CGI stream.""" - self.output(question + ' ', newline=False, toStdout=True)