<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>36093</bug_id>
          
          <creation_ts>2010-03-13 16:55:20 -0800</creation_ts>
          <short_desc>webkitpy: Move modules in webkitpy/ into appropriate sub-packages (master bug)</short_desc>
          <delta_ts>2010-03-25 07:47:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>36483</dependson>
    
    <dependson>36580</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Jerdonek">cjerdonek</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>cjerdonek</cc>
    
    <cc>eric</cc>
    
    <cc>hamaji</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>199430</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-13 16:55:20 -0800</bug_when>
    <thetext>This is a master bug for discussion purposes, and because these moves will probably be spread over more than one patch.

Initial thoughts:

* In the end, we probably want webkitpy/ to contain only the following as
  immediate children:
  - Package folders
  - Their associated *_references.py modules.
  - And perhaps unittests.py.
* webkit-patch specific files can go in webkitpy/patch, as was discussed here:
  https://bugs.webkit.org/show_bug.cgi?id=35499#c9
* Some of the modules used by more than just webkit-patch seem to be--
  - diff_parser
  - scm and its dependencies (changelogs, executive, user, webkit_logging)
* We may want to group the scm-related files into an scm package.
* We might want to explicitly partition off code that needs to work with Python
  2.4 (e.g. into webkitpy/python24).  The version-checking code, for example,
  needs to work with Python 2.4 so we can report a nice error message to Python
  2.4 users.  By separating it off, it will be easier to ensure that this code does
  not accidentally import code that requires Python 2.5 and break.

Initial questions:

(1) Are the webkitpy/commands and webkitpy/steps packages webkit-patch
    specific?
(2) Aside from patch, scm, and any infra-structure related modules that can
    go in webkitpy/init, do you see any other possibilities for packages that should
    go immediately under webkitpy?  For example, are there any other applications
    distinct from webkit-patch that rely on the scm-related code in webkitpy?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199432</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-13 17:21:42 -0800</bug_when>
    <thetext>Here&apos;s a candidate layout:

webkitpy/
  __init__.py
  init/
  layout_tests/
  style/
  style_references.py
  thirdparty/
  patch/
    commands/
    commands_references.py
    steps/
    steps_references.py
    bot/
      patchcollection.py
      patchcollection_unittest.py
      queueengine.py
      queueengine_unittest.py
    stepsequence.py
    comments.py
    mock_bugzillatool.py &lt;-- wrong name
    multicommandtool.py
    multicommandtool_unittest.py
  config/
    committers.py
    committers_unittest.py
    webkitport.py
    webkitport_unittest.py
  scm/
    changelogs.py
    changelogs_unittest.py
    diff_parser.py
    diff_parser_unittest.py
    scm.py &lt;-- should become many files
    scm_unittest.py
  net/ &lt;-- classes that talk to servers
    bugzilla.py
    bugzilla_unittest.py
    buildbot.py
    buildbot_unittest.py
    credentials.py
    credentials_unittest.py
    networktransaction.py
    networktransaction_unittest.py
    statusserver.py
  base/
    grammar.py
    grammar_unittest.py
    executive.py
    executive_unittest.py
    outputcapture.py &lt;-- probably should die
    user.py
    user_unittest.py
    webkit_logging.py &lt;-- probably should die
    webkit_logging_unittest.py
  unittests.py &lt;-- not sure</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199433</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-13 17:24:08 -0800</bug_when>
    <thetext>I know the dependences probably aren&apos;t pretty right now, but that&apos;s something to aim for at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199457</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-14 03:07:14 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Here&apos;s a candidate layout:

Here&apos;s a suggested revision.  For conciseness, I&apos;ve left out the *_references.py and *_unittest.py files, which should go in as siblings of their corresponding package folders and modules, respectively.

webkitpy/
  common/ &lt;-- contains modules used by more than one root-level package
    infra/
      autoinstall.py &lt;-- after re-landing the rewrite
      executive.py
      logtesting.py
      logutils.py
      user.py
      webkit_logging.py &lt;-- probably should die
    scm/
      changelogs.py
      diff_parser.py
      scm.py &lt;-- should become many files
  layout_tests/
  patch/
    bot/
      patchcollection.py
      queueengine.py
    commands/
    config/
      committers.py
      webkitport.py
    net/ &lt;-- classes that talk to servers
      bugzilla.py
      buildbot.py
      credentials.py
      networktransaction.py
      statusserver.py
    steps/
    comments.py
    grammar.py
    mock_bugzillatool.py &lt;-- wrong name
    multicommandtool.py
    outputcapture.py &lt;-- probably should die
    stepsequence.py
  python24/
    versioning.py
  style/
  thirdparty/
  unittests.py &lt;-- not sure

I tried moving config/, net/, grammar.py, and outputcapture.py into the patch/ folder because they don&apos;t seem to be used by non-patch modules.

My initial feeling is that we should try to put modules into the inner-most package in which they are used (thirdparty/ seems to be an exception).  This way a module has to &quot;prove&quot; itself before being moved to the shared package at the root level (i.e. common/).  This will help us limit the size of common/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199467</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-14 08:19:03 -0700</bug_when>
    <thetext>&gt; My initial feeling is that we should try to put modules into the inner-most
&gt; package in which they are used (thirdparty/ seems to be an exception).  This
&gt; way a module has to &quot;prove&quot; itself before being moved to the shared package at
&gt; the root level (i.e. common/).  This will help us limit the size of common/.

That sounds like a good plan.  We might want to move config and networktransaction to common now because we have immediate plans to use them in layout_tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199484</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-14 13:19:45 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; &gt; My initial feeling is that we should try to put modules into the inner-most
&gt; &gt; package in which they are used (thirdparty/ seems to be an exception).  This
&gt; &gt; way a module has to &quot;prove&quot; itself before being moved to the shared package at
&gt; &gt; the root level (i.e. common/).  This will help us limit the size of common/.
&gt; 
&gt; That sounds like a good plan.  We might want to move config and
&gt; networktransaction to common now because we have immediate plans to use them in
&gt; layout_tests.

I assume that would just be config/webkitport.py?  Sounds good, though we might want to wait on those until the versioning stuff is decided.  It seems like some people may still want to preserve 2.4 for layout_tests, and networktransaction and webkitport both currently require 2.5 (for example, networktransaction imports mechanize, which in turn needs autoinstall).

By the way, how do you feel about renaming webkitport.py to ports.py since it will be in a webkitpy config/ directory and contain configurations for multiple ports?  And similarly, networktransaction.py -&gt; transaction.py since it will be in a net/ directory?  (Just the modules and not the class names within.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199486</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-14 13:26:37 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; And similarly, networktransaction.py -&gt; transaction.py since it will be
&gt; in a net/ directory?  (Just the modules and not the class names within.)

Or perhaps common/infra/net.py (or network.py or networktransaction.py) would be a better location for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199552</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-15 00:00:28 -0700</bug_when>
    <thetext>webkitport =&gt; ports is a good idea.  I&apos;m not sure about networktransaction.  I never really liked the name, but I like the class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199554</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-15 00:01:26 -0700</bug_when>
    <thetext>There&apos;s also a notion of ports in layout_test.  Those need to get merged at some point.  There&apos;s a patch in review now for layout_test that needs networktransaction (the one about uploading the JSON to AppEngine).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199933</commentid>
    <comment_count>9</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-15 17:41:55 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; There&apos;s a patch in review now for layout_test that needs
&gt; networktransaction (the one about uploading the JSON to AppEngine).

So others know, the patch referred to here is associated with this report:

https://bugs.webkit.org/show_bug.cgi?id=36063</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202969</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-23 01:49:03 -0700</bug_when>
    <thetext>Updating the plan for the new hierarchy.

(Again leaving out *_references.py and *_unittest.py files.)

webkitpy/
  common/ &lt;-- contains modules used by more than one root-level package
    config/
      ports.py (was webkitport.py)
    infra/
      autoinstall.py &lt;-- after re-landing the rewrite
      executive.py
      logtesting.py
      logutils.py
      net.py (was networktransaction.py)
      user.py
      webkit_logging.py &lt;-- probably should die
    scm/
      changelogs.py
      diff_parser.py
      scm.py &lt;-- should become many files
  layout_tests/
  patch/
    bot/
      patchcollection.py
      queueengine.py
    commands/
    config/
      committers.py
    irc/
    net/ &lt;-- classes that talk to servers
      bugzilla.py
      buildbot.py
      credentials.py
      statusserver.py
    steps/
    comments.py
    grammar.py
    mock_bugzillatool.py &lt;-- wrong name
    multicommandtool.py
    outputcapture.py &lt;-- probably should die
    stepsequence.py
  python24/
    versioning.py
  style/
  test/
    main.py (move code from test-webkitpy)
    unittests.py
  thirdparty/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203788</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-24 22:03:11 -0700</bug_when>
    <thetext>webkitpy/
  common/ &lt;-- contains modules used by more than one root-level package
    config/
      ports.py (was webkitport.py)
      committers.py
    infra/
      autoinstall.py &lt;-- after re-landing the rewrite
      executive.py
      logtesting.py
      logutils.py
      user.py
      webkit_logging.py &lt;-- probably should die
    scm/
      changelogs.py
      diff_parser.py
      scm.py &lt;-- should become many files
    net/ &lt;-- classes that talk to servers
      irc/
      bugzilla.py
      buildbot.py
      credentials.py
      networktransaction.py
      statusserver.py
  layout_tests/
  patch/
    bot/
      patchcollection.py
      queueengine.py
    commands/
    steps/
    comments.py
    grammar.py  &lt;-- WTF?
    mock_bugzillatool.py &lt;-- wrong name
    multicommandtool.py
    outputcapture.py &lt;-- probably should die
    stepsequence.py
  python24/
    versioning.py
  style/
  test/
    main.py (move code from test-webkitpy)
    unittests.py
  thirdparty/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203826</commentid>
    <comment_count>12</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-24 23:30:56 -0700</bug_when>
    <thetext>Manually committed:

http://trac.webkit.org/changeset/56497

(Moves webkitpy/steps/ to webkitpy/tools/steps.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203860</commentid>
    <comment_count>13</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-25 00:19:32 -0700</bug_when>
    <thetext>Manually committed:

http://trac.webkit.org/changeset/56504

(Moves webkitport.py and committers.py into common/config/.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203885</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 00:52:53 -0700</bug_when>
    <thetext>webkitpy.common.net in http://trac.webkit.org/changeset/56508</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203895</commentid>
    <comment_count>15</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-25 01:13:35 -0700</bug_when>
    <thetext>Moved init/versioning.py into python24/versioning.py:

http://trac.webkit.org/changeset/56509</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203904</commentid>
    <comment_count>16</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 01:36:07 -0700</bug_when>
    <thetext>webkitpy.common.checkout in http://trac.webkit.org/changeset/56510</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203911</commentid>
    <comment_count>17</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 01:42:16 -0700</bug_when>
    <thetext>Committed r56512: &lt;http://trac.webkit.org/changeset/56512&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203912</commentid>
    <comment_count>18</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 01:42:49 -0700</bug_when>
    <thetext>stepsequence in http://trac.webkit.org/changeset/56512</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203924</commentid>
    <comment_count>19</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-25 01:50:08 -0700</bug_when>
    <thetext>Moved init/ to common/system/:

http://trac.webkit.org/changeset/56514</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203925</commentid>
    <comment_count>20</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 01:50:23 -0700</bug_when>
    <thetext>Committed r56516: &lt;http://trac.webkit.org/changeset/56516&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203928</commentid>
    <comment_count>21</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 01:50:42 -0700</bug_when>
    <thetext>grammar.py in http://trac.webkit.org/changeset/56516</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203940</commentid>
    <comment_count>22</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 02:01:09 -0700</bug_when>
    <thetext>Committed r56517: &lt;http://trac.webkit.org/changeset/56517&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203942</commentid>
    <comment_count>23</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 02:05:38 -0700</bug_when>
    <thetext>Committed r56518: &lt;http://trac.webkit.org/changeset/56518&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203943</commentid>
    <comment_count>24</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 02:11:42 -0700</bug_when>
    <thetext>Committed r56519: &lt;http://trac.webkit.org/changeset/56519&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203947</commentid>
    <comment_count>25</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 02:17:20 -0700</bug_when>
    <thetext>Committed r56520: &lt;http://trac.webkit.org/changeset/56520&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203951</commentid>
    <comment_count>26</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-25 02:32:12 -0700</bug_when>
    <thetext>Divided the unittest files up:

http://trac.webkit.org/changeset/56521</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203952</commentid>
    <comment_count>27</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-03-25 02:32:31 -0700</bug_when>
    <thetext>Committed r56522: &lt;http://trac.webkit.org/changeset/56522&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204059</commentid>
    <comment_count>28</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-03-25 07:47:50 -0700</bug_when>
    <thetext>Moved webkit_logging.py to common/system/deprecated_logging.py:

http://trac.webkit.org/changeset/56544</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>