<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[209216] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/209216">209216</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2016-12-01 14:53:36 -0800 (Thu, 01 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove webkitpy dependency on Eliza
https://bugs.webkit.org/show_bug.cgi?id=164979

Reviewed by Daniel Bates.

This module is not on pypi, so installing it is a challenge. The jokes feel pretty old too!

* Scripts/webkitpy/thirdparty/__init__.py:
* Scripts/webkitpy/thirdparty/__init___unittest.py: Changed mock import hook to
test buildbot instead of eliza.
* Scripts/webkitpy/tool/bot/ircbot.py:
* Scripts/webkitpy/tool/bot/ircbot_unittest.py:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpythirdparty__init__py">trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py</a></li>
<li><a href="#trunkToolsScriptswebkitpythirdparty__init___unittestpy">trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotircbotpy">trunk/Tools/Scripts/webkitpy/tool/bot/ircbot.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotircbot_unittestpy">trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (209215 => 209216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-12-01 22:48:55 UTC (rev 209215)
+++ trunk/Tools/ChangeLog        2016-12-01 22:53:36 UTC (rev 209216)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-12-01  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Remove webkitpy dependency on Eliza
+        https://bugs.webkit.org/show_bug.cgi?id=164979
+
+        Reviewed by Daniel Bates.
+
+        This module is not on pypi, so installing it is a challenge. The jokes feel pretty old too!
+
+        * Scripts/webkitpy/thirdparty/__init__.py:
+        * Scripts/webkitpy/thirdparty/__init___unittest.py: Changed mock import hook to
+        test buildbot instead of eliza.
+        * Scripts/webkitpy/tool/bot/ircbot.py:
+        * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+
</ins><span class="cx"> 2016-12-01  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Force clicking tests fail on some machines
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpythirdparty__init__py"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py (209215 => 209216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py        2016-12-01 22:48:55 UTC (rev 209215)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init__.py        2016-12-01 22:53:36 UTC (rev 209216)
</span><span class="lines">@@ -85,8 +85,6 @@
</span><span class="cx">             self._install_pylint()
</span><span class="cx">         elif '.coverage' in fullname:
</span><span class="cx">             self._install_coverage()
</span><del>-        elif '.eliza' in fullname:
-            self._install_eliza()
</del><span class="cx">         elif '.buildbot' in fullname:
</span><span class="cx">             self._install_buildbot()
</span><span class="cx">         elif '.keyring' in fullname:
</span><span class="lines">@@ -147,9 +145,6 @@
</span><span class="cx">         self._ensure_autoinstalled_dir_is_in_sys_path()
</span><span class="cx">         self._install(url=&quot;http://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24&quot;, url_subpath=&quot;coverage-3.5.1/coverage&quot;)
</span><span class="cx"> 
</span><del>-    def _install_eliza(self):
-        self._install(url=&quot;http://www.adambarth.com/webkit/eliza&quot;, target_name=&quot;eliza.py&quot;)
-
</del><span class="cx">     def _install_twisted_15_5_0(self):
</span><span class="cx">         twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, &quot;twisted_15_5_0&quot;)
</span><span class="cx">         installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir)
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpythirdparty__init___unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py (209215 => 209216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py        2016-12-01 22:48:55 UTC (rev 209215)
+++ trunk/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py        2016-12-01 22:53:36 UTC (rev 209216)
</span><span class="lines">@@ -38,10 +38,10 @@
</span><span class="cx">         class MockImportHook(AutoinstallImportHook):
</span><span class="cx">             def __init__(self):
</span><span class="cx">                 AutoinstallImportHook.__init__(self)
</span><del>-                self.eliza_installed = False
</del><ins>+                self.buildbot_installed = False
</ins><span class="cx"> 
</span><del>-            def _install_eliza(self):
-                self.eliza_installed = True
</del><ins>+            def _install_buildbot(self):
+                self.buildbot_installed = True
</ins><span class="cx"> 
</span><span class="cx">         mock_import_hook = MockImportHook()
</span><span class="cx">         try:
</span><span class="lines">@@ -49,8 +49,8 @@
</span><span class="cx">             # so these modules will get installed before MockImportHook runs.
</span><span class="cx">             sys.meta_path.append(mock_import_hook)
</span><span class="cx">             # unused-variable, import failures - pylint: disable-msg=W0612,E0611,F0401
</span><del>-            from webkitpy.thirdparty.autoinstalled import eliza
-            self.assertTrue(mock_import_hook.eliza_installed)
</del><ins>+            from webkitpy.thirdparty.autoinstalled import buildbot
+            self.assertTrue(mock_import_hook.buildbot_installed)
</ins><span class="cx"> 
</span><span class="cx">         finally:
</span><span class="cx">             sys.meta_path.remove(mock_import_hook)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx">         # unused-variable, import failures - pylint: disable-msg=W0612,E0611,F0401
</span><span class="cx">         import webkitpy.thirdparty.autoinstalled.buildbot
</span><span class="cx">         import webkitpy.thirdparty.autoinstalled.coverage
</span><del>-        import webkitpy.thirdparty.autoinstalled.eliza
</del><span class="cx">         import webkitpy.thirdparty.autoinstalled.mechanize
</span><span class="cx">         import webkitpy.thirdparty.autoinstalled.pylint
</span><span class="cx">         import webkitpy.thirdparty.autoinstalled.pep8
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotircbotpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bot/ircbot.py (209215 => 209216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/ircbot.py        2016-12-01 22:48:55 UTC (rev 209215)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/ircbot.py        2016-12-01 22:53:36 UTC (rev 209216)
</span><span class="lines">@@ -52,16 +52,9 @@
</span><span class="cx">         return self._password
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-class Eliza(IRCCommand):
-    therapist = None
-
-    def __init__(self):
-        if not self.therapist:
-            import webkitpy.thirdparty.autoinstalled.eliza as eliza
-            Eliza.therapist = eliza.eliza()
-
</del><ins>+class UnknownCommand(IRCCommand):
</ins><span class="cx">     def execute(self, nick, args, tool, sheriff):
</span><del>-        return &quot;%s: %s&quot; % (nick, self.therapist.respond(&quot; &quot;.join(args)))
</del><ins>+        return &quot;%s: %s&quot; % (nick, &quot;...&quot;)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class IRCBot(object):
</span><span class="lines">@@ -82,7 +75,7 @@
</span><span class="cx">         args = tokenized_request[1:]
</span><span class="cx">         if not command:
</span><span class="cx">             # Give the peoples someone to talk with.
</span><del>-            command = Eliza
</del><ins>+            command = UnknownCommand
</ins><span class="cx">             args = tokenized_request
</span><span class="cx">         return (command, args)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotircbot_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py (209215 => 209216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py        2016-12-01 22:48:55 UTC (rev 209215)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py        2016-12-01 22:53:36 UTC (rev 209216)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> from webkitpy.tool.bot.queueengine import TerminateQueue
</span><span class="cx"> from webkitpy.tool.bot.sheriff import Sheriff
</span><span class="cx"> from webkitpy.tool.bot.ircbot import IRCBot
</span><del>-from webkitpy.tool.bot.ircbot import Eliza
</del><ins>+from webkitpy.tool.bot.ircbot import UnknownCommand
</ins><span class="cx"> from webkitpy.tool.bot.sheriff_unittest import MockSheriffBot
</span><span class="cx"> from webkitpy.tool.mocktool import MockTool
</span><span class="cx"> 
</span><span class="lines">@@ -48,16 +48,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class IRCBotTest(unittest.TestCase):
</span><del>-    def test_eliza(self):
-        eliza = Eliza()
-        eliza.execute(&quot;tom&quot;, &quot;hi&quot;, None, None)
-        eliza.execute(&quot;tom&quot;, &quot;bye&quot;, None, None)
-
</del><span class="cx">     def test_parse_command_and_args(self):
</span><span class="cx">         tool = MockTool()
</span><span class="cx">         bot = IRCBot(&quot;sheriffbot&quot;, tool, Sheriff(tool, MockSheriffBot()), irc_command.commands)
</span><del>-        self.assertEqual(bot._parse_command_and_args(&quot;&quot;), (Eliza, [&quot;&quot;]))
-        self.assertEqual(bot._parse_command_and_args(&quot;   &quot;), (Eliza, [&quot;&quot;]))
</del><ins>+        self.assertEqual(bot._parse_command_and_args(&quot;&quot;), (UnknownCommand, [&quot;&quot;]))
+        self.assertEqual(bot._parse_command_and_args(&quot;   &quot;), (UnknownCommand, [&quot;&quot;]))
</ins><span class="cx">         self.assertEqual(bot._parse_command_and_args(&quot; hi &quot;), (irc_command.Hi, []))
</span><span class="cx">         self.assertEqual(bot._parse_command_and_args(&quot; hi there &quot;), (irc_command.Hi, [&quot;there&quot;]))
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>