Various Python 3 fixes

Makes the following Python 3 compatibility fixes that were discovered
while ensuring that telemetry_perf_unittests runs under Python 3:

1. Updates several error handling snippets in typ to print out strings
   individually instead of a list, which makes the errors much more
   readable.
2. Fixes an issue in typ under Python 3 where stale errors were kept
   around and could be handled multiple times by later tests.
3. Updates Telemetry's Page to be properly usable under Python 3.
4. Updates the modulegraph third party module to the latest (0.19.2),
   as the older version had syntax errors when run under Python 3.

Bug: chromium:1198237
Change-Id: I921ebc511dce00fae875d85bba542dc122923f20
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/3202386
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Rakib Hasan <rmhasan@google.com>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
diff --git a/telemetry/telemetry/page/__init__.py b/telemetry/telemetry/page/__init__.py
index c15e4e3..4b02ee8 100644
--- a/telemetry/telemetry/page/__init__.py
+++ b/telemetry/telemetry/page/__init__.py
@@ -141,6 +141,12 @@
       return x
     return cmp(self.url, other.url)
 
+  def __eq__(self, other):
+    return self.name == other.name and self.url == other.url
+
+  def __hash__(self):
+    return hash((self.name, self.url))
+
   def __str__(self):
     return self.url
 
diff --git a/telemetry/third_party/modulegraph/LICENSE b/telemetry/third_party/modulegraph/LICENSE
new file mode 100644
index 0000000..2ae9f17
--- /dev/null
+++ b/telemetry/third_party/modulegraph/LICENSE
@@ -0,0 +1,16 @@
+Copyright (c) 2006-2020 Bob Ippolito and others
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/telemetry/third_party/modulegraph/MANIFEST.in b/telemetry/third_party/modulegraph/MANIFEST.in
deleted file mode 100644
index 7d2580d..0000000
--- a/telemetry/third_party/modulegraph/MANIFEST.in
+++ /dev/null
@@ -1,9 +0,0 @@
-include *.txt MANIFEST.in *.py
-recursive-include scripts *.py
-graft doc
-graft doc/_static
-graft doc/_templates
-graft modulegraph_tests
-global-exclude .DS_Store
-global-exclude *.pyc
-global-exclude *.so
diff --git a/telemetry/third_party/modulegraph/PKG-INFO b/telemetry/third_party/modulegraph/PKG-INFO
deleted file mode 100644
index bfd4006..0000000
--- a/telemetry/third_party/modulegraph/PKG-INFO
+++ /dev/null
@@ -1,337 +0,0 @@
-Metadata-Version: 1.1
-Name: modulegraph
-Version: 0.12.1
-Summary: Python module dependency analysis tool
-Home-page: http://bitbucket.org/ronaldoussoren/modulegraph
-Author: Ronald Oussoren
-Author-email: ronaldoussoren@mac.com
-License: MIT
-Download-URL: http://pypi.python.org/pypi/modulegraph
-Description: modulegraph determines a dependency graph between Python modules primarily
-        by bytecode analysis for import statements.
-        
-        modulegraph uses similar methods to modulefinder from the standard library,
-        but uses a more flexible internal representation, has more extensive 
-        knowledge of special cases, and is extensible.
-        
-        
-        Release history
-        ===============
-        
-        0.12.1
-        ------
-        
-        * Issue #25: Complex python files could cause an "maximum recursion depth exceeded"
-          exception due to using stack-based recursion to walk the module AST.
-        
-        
-        0.12
-        ----
-        
-        * Added 'modulegraph.modulegraph.InvalidSourceModule'. This graph node is
-          used for Python source modules that cannot be compiled (for example because
-          they contain syntax errors).
-        
-          This is primarily useful for being able to create a graph for packages
-          that have python 2.x or python 3.x compatibility in separate modules that
-          contain code that isn't valid in the "other" python version.
-        
-        * Added 'modulegraph.modulegraph.InvalidCompiledModule'. This graph node
-          is used for Python bytecode modules that cannot be loaded.
-        
-        * Added 'modulegraph.modulegraph.NamespacePackage'.
-        
-          Patch by bitbucket user htgoebel.
-        
-        * No longer add a MissingModule node to the graph for 'collections.defaultdict'
-          when using 'from collections import defaultdict' ('collections.defaultdict'
-          is an attribute of 'collections', not a submodule).
-        
-        * Fixed typo in ModuleGraph.getReferences()
-        
-        * Added ModuleGraph.getReferers(tonode). This methods yields the
-          nodes that are referencing *tonode* (the reverse of getReferences)
-        
-        * The graph will no longer contain MissingModule nodes when using 'from ... import name' to
-          import a global variable in a python module.
-        
-          There will still be MissingModule nodes for global variables in C extentions, and
-          for 'from missing import name' when 'missing' is itself a MissingModule.
-        
-        * Issue #18: Don't assume that a PEP 302 loader object has a ``path`` attribute. That
-          attribute is not documented and is not always present.
-        
-        0.11.2
-        ------
-        
-        *
-        
-        0.11.1
-        ------
-        
-        * Issue #145: Don't exclude the platform specific 'path' modules (like ntpath)
-        
-        0.11
-        ----
-        
-        This is a feature release
-        
-        Features
-        ........
-        
-        * Hardcode knowlegde about the compatibility aliases in the email
-          module (for python 2.5 upto 3.0).
-        
-          This makes it possible to remove a heavy-handed recipe from py2app.
-        
-        * Added ``modegraph.zipio.getmode`` to fetch the Unix file mode
-          for a file.
-        
-        * Added some handy methods to ``modulegraph.modulegraph.ModuleGraph``.
-        
-        0.10.5
-        ------
-        
-        This is a bugfix release
-        
-        * Don't look at the file extension to determine the file type
-          in modulegraph.find_modules.parse_mf_results, but use the
-          class of the item.
-        
-        * Issue #13: Improved handing of bad relative imports
-          ("from .foo import bar"), these tended to raise confusing errors and
-          are now handled like any other failed import.
-        
-        0.10.4
-        ------
-        
-        This is a bugfix release
-        
-        * There were no 'classifiers' in the package metadata due to a bug
-          in setup.py.
-        
-        0.10.3
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
-          a py2app module didn't have a file name ending in '.py'.
-        
-        0.10.2
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * Issue #12: modulegraph would sometimes find the wrong package *__init__*
-          module due to using the wrong search method. One easy way to reproduce the
-          problem was to have a toplevel module named *__init__*.
-        
-          Reported by Kentzo.
-        
-        0.10.1
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref
-          and --graph options of py2app) didn't work with python 3 due to use of
-          APIs that aren't available in that version of python.
-        
-          Reported by Andrew Barnert.
-        
-        
-        0.10
-        ----
-        
-        This is a minor feature release
-        
-        Features
-        ........
-        
-        * ``modulegraph.find_modules.find_needed_modules`` claimed to automaticly
-          include subpackages for the "packages" argument as well, but that code
-          didn't work at all.
-        
-        * Issue #9: The modulegraph script is deprecated, use
-          "python -mmodulegraph" instead.
-        
-        * Issue #10: Ensure that the result of "zipio.open" can be used
-          in a with statement (that is, ``with zipio.open(...) as fp``.
-        
-        * No longer use "2to3" to support Python 3.
-        
-          Because of this modulegraph now supports Python 2.6
-          and later.
-        
-        * Slightly improved HTML output, which makes it easier
-          to manipulate the generated HTML using JavaScript.
-        
-          Patch by anatoly techtonik.
-        
-        * Ensure modulegraph works with changes introduced after
-          Python 3.3b1.
-        
-        * Implement support for PEP 420 ("Implicit namespace packages")
-          in Python 3.3.
-        
-        * ``modulegraph.util.imp_walk`` is deprecated and will be
-          removed in the next release of this package.
-        
-        Bugfixes
-        ........
-        
-        * The module graph was incomplete, and generated incorrect warnings
-          along the way, when a subpackage contained import statements for
-          submodules.
-        
-          An example of this is ``sqlalchemy.util``, the ``__init__.py`` file
-          for this package contains imports of modules in that modules using
-          the classic relative import syntax (that is ``import compat`` to
-          import ``sqlalchemy.util.compat``). Until this release modulegraph
-          searched the wrong path to locate these modules (and hence failed
-          to find them).
-        
-        
-        0.9.2
-        -----
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * The 'packages' option to modulegraph.find_modules.find_modules ignored
-          the search path argument but always used the default search path.
-        
-        * The 'imp_find_modules' function in modulegraph.util has an argument 'path',
-          this was a string in previous release and can now also be a sequence.
-        
-        * Don't crash when a module on the 'includes' list doesn't exist, but warn
-          just like for missing 'packages' (modulegraph.find_modules.find_modules)
-        
-        0.9.1
-        -----
-        
-        This is a bugfix release
-        
-        Bug fixes
-        .........
-        
-        - Fixed the name of nodes imports in packages where the first element of
-          a dotted name can be found but the rest cannot. This used to create
-          a MissingModule node for the dotted name in the global namespace instead
-          of relative to the package.
-        
-          That is, given a package "pkg" with submodule "sub" if the "__init__.py"
-          of "pkg" contains "import sub.nomod" we now create a MissingModule node
-          for "pkg.sub.nomod" instead of "sub.nomod".
-        
-          This fixes an issue with including the crcmod package in application
-          bundles, first reported on the pythonmac-sig mailinglist by
-          Brendan Simon.
-        
-        0.9
-        ---
-        
-        This is a minor feature release
-        
-        
-        Features:
-        
-        - Documentation is now generated using `sphinx <http://pypi.python.org/pypi/sphinx>`_
-          and can be viewed at <http://packages.python.org/modulegraph>.
-        
-          The documention is very rough at this moment and in need of reorganisation and
-          language cleanup. I've basiclly writting the current version by reading the code
-          and documenting what it does, the order in which classes and methods are document
-          is therefore not necessarily the most useful.
-        
-        - The repository has moved to bitbucket
-        
-        - Renamed ``modulegraph.modulegraph.AddPackagePath`` to ``addPackagePath``,
-          likewise ``ReplacePackage`` is now ``replacePackage``. The old name is still
-          available, but is deprecated and will be removed before the 1.0 release.
-        
-        - ``modulegraph.modulegraph`` contains two node types that are unused and
-          have unclear semantics: ``FlatPackage`` and ``ArchiveModule``. These node
-          types are deprecated and will be removed before 1.0 is released.
-        
-        - Added a simple commandline tool (``modulegraph``) that will print information
-          about the dependency graph of a script.
-        
-        - Added a module (``zipio``) for dealing with paths that may refer to entries
-          inside zipfiles (such as source paths referring to modules in zipped eggfiles).
-        
-          With this addition ``modulegraph.modulegraph.os_listdir`` is deprecated and
-          it will be removed before the 1.0 release.
-        
-        Bug fixes:
-        
-        - The ``__cmp__`` method of a Node no longer causes an exception
-          when the compared-to object is not a Node. Patch by Ivan Kozik.
-        
-        - Issue #1: The initialiser for ``modulegraph.ModuleGraph`` caused an exception
-          when an entry on the path (``sys.path``) doesn't actually exist.
-        
-          Fix by "skurylo", testcase by Ronald.
-        
-        - The code no longer worked with python 2.5, this release fixes that.
-        
-        - Due to the switch to mercurial setuptools will no longer include
-          all required files. Fixed by adding a MANIFEST.in file
-        
-        - The method for printing a ``.dot`` representation of a ``ModuleGraph``
-          works again.
-        
-        
-        0.8.1
-        -----
-        
-        This is a minor feature release
-        
-        Features:
-        
-        - ``from __future__ import absolute_import`` is now supported
-        
-        - Relative imports (``from . import module``) are now supported
-        
-        - Add support for namespace packages when those are installed
-          using option ``--single-version-externally-managed`` (part
-          of setuptools/distribute)
-        
-        0.8
-        ---
-        
-        This is a minor feature release
-        
-        Features:
-        
-        - Initial support for Python 3.x
-        
-        - It is now possible to run the test suite
-          using ``python setup.py test``.
-        
-          (The actual test suite is still fairly minimal though)
-        
-Keywords: import,,dependencies
-Platform: any
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Software Development :: Build Tools
diff --git a/telemetry/third_party/modulegraph/README.chromium b/telemetry/third_party/modulegraph/README.chromium
index 937e677..f8da5e9 100644
--- a/telemetry/third_party/modulegraph/README.chromium
+++ b/telemetry/third_party/modulegraph/README.chromium
@@ -1,11 +1,12 @@
 Name: modulegraph
 Short Name: modulegraph
 URL: https://pypi.python.org/pypi/modulegraph/
-Version: 0.12.1
+Version: 0.19.2
 License: MIT
 License File: NOT_SHIPPED
 Security Critical: no
 Description: modulegraph determines a dependency graph between Python modules
 primarily by bytecode analysis for import statements. It's used by telemetry's
 find_dependencies script.
-Local modification: remove doc/_build directory.
+Local modification: Remove all files and directories except for modulegraph/,
+which contains the relevant source files, LICENSE, and README.rst.
diff --git a/telemetry/third_party/modulegraph/README.rst b/telemetry/third_party/modulegraph/README.rst
new file mode 100644
index 0000000..b29c0f8
--- /dev/null
+++ b/telemetry/third_party/modulegraph/README.rst
@@ -0,0 +1,24 @@
+modulegraph
+===========
+
+modulegraph determines a dependency graph between Python modules primarily
+by bytecode analysis for import statements.
+
+modulegraph uses similar methods to modulefinder from the standard library,
+but uses a more flexible internal representation, has more extensive
+knowledge of special cases, and is extensible.
+
+CI Status
+---------
+
+.. image:: https://github.com/ronaldoussoren/modulegraph/workflows/Lint/badge.svg
+.. image:: https://github.com/ronaldoussoren/modulegraph/workflows/Test/badge.svg
+
+Project links
+-------------
+
+* `Documentation <https://modulegraph.readthedocs.io/en/latest/>`_
+
+* `Issue Tracker <https://github.com/ronaldoussoren/modulegraph/issues>`_
+
+* `Repository <https://github.com/ronaldoussoren/modulegraph/>`_
diff --git a/telemetry/third_party/modulegraph/README.txt b/telemetry/third_party/modulegraph/README.txt
deleted file mode 100644
index 55ebf46..0000000
--- a/telemetry/third_party/modulegraph/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-modulegraph determines a dependency graph between Python modules primarily
-by bytecode analysis for import statements.
-
-modulegraph uses similar methods to modulefinder from the standard library,
-but uses a more flexible internal representation, has more extensive 
-knowledge of special cases, and is extensible.
diff --git a/telemetry/third_party/modulegraph/doc/Makefile b/telemetry/third_party/modulegraph/doc/Makefile
deleted file mode 100644
index b91ac81..0000000
--- a/telemetry/third_party/modulegraph/doc/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS    =
-SPHINXBUILD   = sphinx-build
-PAPER         =
-BUILDDIR      = _build
-
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
-
-help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  html      to make standalone HTML files"
-	@echo "  dirhtml   to make HTML files named index.html in directories"
-	@echo "  pickle    to make pickle files"
-	@echo "  json      to make JSON files"
-	@echo "  htmlhelp  to make HTML files and a HTML help project"
-	@echo "  qthelp    to make HTML files and a qthelp project"
-	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo "  changes   to make an overview of all changed/added/deprecated items"
-	@echo "  linkcheck to check all external links for integrity"
-	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
-
-clean:
-	-rm -rf $(BUILDDIR)/*
-
-html:
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
-	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-pickle:
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
-	@echo
-	@echo "Build finished; now you can process the pickle files."
-
-json:
-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
-	@echo
-	@echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
-	@echo
-	@echo "Build finished; now you can run HTML Help Workshop with the" \
-	      ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
-	@echo
-	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/altgraph.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/altgraph.qhc"
-
-latex:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo
-	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
-	      "run these through (pdf)latex."
-
-changes:
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
-	@echo
-	@echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
-	@echo
-	@echo "Link check complete; look for any errors in the above output " \
-	      "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
-	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
-	@echo "Testing of doctests in the sources finished, look at the " \
-	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/telemetry/third_party/modulegraph/doc/changelog.rst b/telemetry/third_party/modulegraph/doc/changelog.rst
deleted file mode 100644
index f6725ac..0000000
--- a/telemetry/third_party/modulegraph/doc/changelog.rst
+++ /dev/null
@@ -1,307 +0,0 @@
-Release history
-===============
-
-0.12.1
-------
-
-* Issue #25: Complex python files could cause an "maximum recursion depth exceeded"
-  exception due to using stack-based recursion to walk the module AST.
-
-
-0.12
-----
-
-* Added 'modulegraph.modulegraph.InvalidSourceModule'. This graph node is
-  used for Python source modules that cannot be compiled (for example because
-  they contain syntax errors).
-
-  This is primarily useful for being able to create a graph for packages
-  that have python 2.x or python 3.x compatibility in separate modules that
-  contain code that isn't valid in the "other" python version.
-
-* Added 'modulegraph.modulegraph.InvalidCompiledModule'. This graph node
-  is used for Python bytecode modules that cannot be loaded.
-
-* Added 'modulegraph.modulegraph.NamespacePackage'.
-
-  Patch by bitbucket user htgoebel.
-
-* No longer add a MissingModule node to the graph for 'collections.defaultdict'
-  when using 'from collections import defaultdict' ('collections.defaultdict'
-  is an attribute of 'collections', not a submodule).
-
-* Fixed typo in ModuleGraph.getReferences()
-
-* Added ModuleGraph.getReferers(tonode). This methods yields the
-  nodes that are referencing *tonode* (the reverse of getReferences)
-
-* The graph will no longer contain MissingModule nodes when using 'from ... import name' to
-  import a global variable in a python module.
-
-  There will still be MissingModule nodes for global variables in C extentions, and
-  for 'from missing import name' when 'missing' is itself a MissingModule.
-
-* Issue #18: Don't assume that a PEP 302 loader object has a ``path`` attribute. That
-  attribute is not documented and is not always present.
-
-0.11.2
-------
-
-*
-
-0.11.1
-------
-
-* Issue #145: Don't exclude the platform specific 'path' modules (like ntpath)
-
-0.11
-----
-
-This is a feature release
-
-Features
-........
-
-* Hardcode knowlegde about the compatibility aliases in the email
-  module (for python 2.5 upto 3.0).
-
-  This makes it possible to remove a heavy-handed recipe from py2app.
-
-* Added ``modegraph.zipio.getmode`` to fetch the Unix file mode
-  for a file.
-
-* Added some handy methods to ``modulegraph.modulegraph.ModuleGraph``.
-
-0.10.5
-------
-
-This is a bugfix release
-
-* Don't look at the file extension to determine the file type
-  in modulegraph.find_modules.parse_mf_results, but use the
-  class of the item.
-
-* Issue #13: Improved handing of bad relative imports
-  ("from .foo import bar"), these tended to raise confusing errors and
-  are now handled like any other failed import.
-
-0.10.4
-------
-
-This is a bugfix release
-
-* There were no 'classifiers' in the package metadata due to a bug
-  in setup.py.
-
-0.10.3
-------
-
-This is a bugfix release
-
-Bugfixes
-........
-
-* ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
-  a py2app module didn't have a file name ending in '.py'.
-
-0.10.2
-------
-
-This is a bugfix release
-
-Bugfixes
-........
-
-* Issue #12: modulegraph would sometimes find the wrong package *__init__*
-  module due to using the wrong search method. One easy way to reproduce the
-  problem was to have a toplevel module named *__init__*.
-
-  Reported by Kentzo.
-
-0.10.1
-------
-
-This is a bugfix release
-
-Bugfixes
-........
-
-* Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref
-  and --graph options of py2app) didn't work with python 3 due to use of
-  APIs that aren't available in that version of python.
-
-  Reported by Andrew Barnert.
-
-
-0.10
-----
-
-This is a minor feature release
-
-Features
-........
-
-* ``modulegraph.find_modules.find_needed_modules`` claimed to automaticly
-  include subpackages for the "packages" argument as well, but that code
-  didn't work at all.
-
-* Issue #9: The modulegraph script is deprecated, use
-  "python -mmodulegraph" instead.
-
-* Issue #10: Ensure that the result of "zipio.open" can be used
-  in a with statement (that is, ``with zipio.open(...) as fp``.
-
-* No longer use "2to3" to support Python 3.
-
-  Because of this modulegraph now supports Python 2.6
-  and later.
-
-* Slightly improved HTML output, which makes it easier
-  to manipulate the generated HTML using JavaScript.
-
-  Patch by anatoly techtonik.
-
-* Ensure modulegraph works with changes introduced after
-  Python 3.3b1.
-
-* Implement support for PEP 420 ("Implicit namespace packages")
-  in Python 3.3.
-
-* ``modulegraph.util.imp_walk`` is deprecated and will be
-  removed in the next release of this package.
-
-Bugfixes
-........
-
-* The module graph was incomplete, and generated incorrect warnings
-  along the way, when a subpackage contained import statements for
-  submodules.
-
-  An example of this is ``sqlalchemy.util``, the ``__init__.py`` file
-  for this package contains imports of modules in that modules using
-  the classic relative import syntax (that is ``import compat`` to
-  import ``sqlalchemy.util.compat``). Until this release modulegraph
-  searched the wrong path to locate these modules (and hence failed
-  to find them).
-
-
-0.9.2
------
-
-This is a bugfix release
-
-Bugfixes
-........
-
-* The 'packages' option to modulegraph.find_modules.find_modules ignored
-  the search path argument but always used the default search path.
-
-* The 'imp_find_modules' function in modulegraph.util has an argument 'path',
-  this was a string in previous release and can now also be a sequence.
-
-* Don't crash when a module on the 'includes' list doesn't exist, but warn
-  just like for missing 'packages' (modulegraph.find_modules.find_modules)
-
-0.9.1
------
-
-This is a bugfix release
-
-Bug fixes
-.........
-
-- Fixed the name of nodes imports in packages where the first element of
-  a dotted name can be found but the rest cannot. This used to create
-  a MissingModule node for the dotted name in the global namespace instead
-  of relative to the package.
-
-  That is, given a package "pkg" with submodule "sub" if the "__init__.py"
-  of "pkg" contains "import sub.nomod" we now create a MissingModule node
-  for "pkg.sub.nomod" instead of "sub.nomod".
-
-  This fixes an issue with including the crcmod package in application
-  bundles, first reported on the pythonmac-sig mailinglist by
-  Brendan Simon.
-
-0.9
----
-
-This is a minor feature release
-
-
-Features:
-
-- Documentation is now generated using `sphinx <http://pypi.python.org/pypi/sphinx>`_
-  and can be viewed at <http://packages.python.org/modulegraph>.
-
-  The documention is very rough at this moment and in need of reorganisation and
-  language cleanup. I've basiclly writting the current version by reading the code
-  and documenting what it does, the order in which classes and methods are document
-  is therefore not necessarily the most useful.
-
-- The repository has moved to bitbucket
-
-- Renamed ``modulegraph.modulegraph.AddPackagePath`` to ``addPackagePath``,
-  likewise ``ReplacePackage`` is now ``replacePackage``. The old name is still
-  available, but is deprecated and will be removed before the 1.0 release.
-
-- ``modulegraph.modulegraph`` contains two node types that are unused and
-  have unclear semantics: ``FlatPackage`` and ``ArchiveModule``. These node
-  types are deprecated and will be removed before 1.0 is released.
-
-- Added a simple commandline tool (``modulegraph``) that will print information
-  about the dependency graph of a script.
-
-- Added a module (``zipio``) for dealing with paths that may refer to entries
-  inside zipfiles (such as source paths referring to modules in zipped eggfiles).
-
-  With this addition ``modulegraph.modulegraph.os_listdir`` is deprecated and
-  it will be removed before the 1.0 release.
-
-Bug fixes:
-
-- The ``__cmp__`` method of a Node no longer causes an exception
-  when the compared-to object is not a Node. Patch by Ivan Kozik.
-
-- Issue #1: The initialiser for ``modulegraph.ModuleGraph`` caused an exception
-  when an entry on the path (``sys.path``) doesn't actually exist.
-
-  Fix by "skurylo", testcase by Ronald.
-
-- The code no longer worked with python 2.5, this release fixes that.
-
-- Due to the switch to mercurial setuptools will no longer include
-  all required files. Fixed by adding a MANIFEST.in file
-
-- The method for printing a ``.dot`` representation of a ``ModuleGraph``
-  works again.
-
-
-0.8.1
------
-
-This is a minor feature release
-
-Features:
-
-- ``from __future__ import absolute_import`` is now supported
-
-- Relative imports (``from . import module``) are now supported
-
-- Add support for namespace packages when those are installed
-  using option ``--single-version-externally-managed`` (part
-  of setuptools/distribute)
-
-0.8
----
-
-This is a minor feature release
-
-Features:
-
-- Initial support for Python 3.x
-
-- It is now possible to run the test suite
-  using ``python setup.py test``.
-
-  (The actual test suite is still fairly minimal though)
diff --git a/telemetry/third_party/modulegraph/doc/commandline.rst b/telemetry/third_party/modulegraph/doc/commandline.rst
deleted file mode 100644
index b5a8df5..0000000
--- a/telemetry/third_party/modulegraph/doc/commandline.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-Commandline tools
-=================
-
-The package can be used as a script using "python -mmodulegraph".
-
-This script calculates the module graph for the scripts passed
-on the commandline and by default prints a list of modules
-in the objectgraph, and their type and location.
-
-The script has a number of options to change the output:
-
-* ``-d``: Increase the debug level
-
-* ``-q``: Clear the debug level (emit minimal output)
-
-* ``-m``: The arguments are module names instead of script files
-
-* ``-x name``: Add ``name`` to the list of excludes
-
-* ``-p path``: Add ``path`` to the module search path
-
-* ``-g``: Emit a ``.dot`` file instead of a list of modules
-
-* ``-h``: Emit a ``.html`` file instead of a list of modules
-
-Deprecation warning
--------------------
-
-The package also installs a command-line tool named "modulegraph",
-this command-line tool is deprecated and will be removed in a
-future version.
diff --git a/telemetry/third_party/modulegraph/doc/conf.py b/telemetry/third_party/modulegraph/doc/conf.py
deleted file mode 100644
index c217551..0000000
--- a/telemetry/third_party/modulegraph/doc/conf.py
+++ /dev/null
@@ -1,220 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# modulegraph documentation build configuration file, created by
-# sphinx-quickstart on Tue Sep 28 21:04:40 2010.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-from __future__ import absolute_import
-import sys, os
-
-def get_version():
-    fn = os.path.join(
-        os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
-        'setup.cfg')
-    for ln in open(fn):
-        if ln.startswith('version'):
-            version = ln.split('=')[-1].strip()
-            return version
-
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
-sys.path.insert(0,
-    os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-
-# -- General configuration -----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.ifconfig']
-
-
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'modulegraph'
-copyright = u'2010, Ronald Oussoren'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = get_version()
-# The full version, including alpha/beta/rc tags.
-release = version
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages.  Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-#html_theme = 'default'
-html_theme = 'nature'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'modulegraphdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
-  ('index', 'modulegraph.tex', u'modulegraph Documentation',
-   u'Ronald Oussoren', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
-
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {
-        'python': ('http://docs.python.org/', None),
-        'altgraph': ('http://packages.python.org/altgraph', None),
-}
-
-todo_include_todos = True
diff --git a/telemetry/third_party/modulegraph/doc/find_modules.rst b/telemetry/third_party/modulegraph/doc/find_modules.rst
deleted file mode 100644
index 48f0f97..0000000
--- a/telemetry/third_party/modulegraph/doc/find_modules.rst
+++ /dev/null
@@ -1,58 +0,0 @@
-:mod:`modulegraph.find_modules` --- High-level module dependency finding interface
-==================================================================================
-
-.. module:: modulegraph.find_modules
-   :synopsis: High-level module dependency finding interface
-
-This module provides a high-level interface to the functionality of 
-the modulegraph package.
-
-
-.. function:: find_modules([scripts[, includes[, packages[, excludes[, path[, debug]]]]]])
-
-   High-level interface, takes iterables for: scripts, includes, packages, excludes
-
-   And returns a :class:`modulegraph.modulegraph.ModuleGraph` instance, 
-   python_files, and extensions
-
-   python_files is a list of pure python dependencies as modulegraph.Module objects,
-
-   extensions is a list of platform-specific C extension dependencies as modulegraph.Module objects
-
-
-.. function:: parse_mf_results(mf)
-
-   Return two lists: the first one contains the python files in the graph,
-   the second the C extensions.
-        
-   :param mf: a :class:`modulegraph.modulegraph.ModuleGraph` instance
-
-
-Lower-level functionality
--------------------------
-
-The functionality in this section is much lower level and should probably
-not be used. It's mostly documented as a convenience for maintainers.
-
-
-.. function:: get_implies()
-
-   Return a mapping of implied dependencies. The key is a, possibly dotted,
-   module name and the value a list of dependencies.
-
-   This contains hardcoded list of hard dependencies, for example for C
-   extensions in the standard libary that perform imports in C code, which
-   the generic dependency finder cannot locate.
-
-.. function:: plat_prepare(includes, packages, excludes)
-
-   Updates the lists of includes, packages and excludes for the current
-   platform. This will add items to these lists based on hardcoded platform
-   information.
-
-.. function:: find_needed_modules([mf[, scripts[, includes[, packages[, warn]]]]])
-
-   Feeds the given :class:`ModuleGraph <modulegraph.ModuleGraph>`  with
-   the *scripts*, *includes* and *packages* and returns the resulting
-   graph. This function will create a new graph when *mf* is not specified
-   or ``None``.
diff --git a/telemetry/third_party/modulegraph/doc/index.rst b/telemetry/third_party/modulegraph/doc/index.rst
deleted file mode 100644
index 534b4d3..0000000
--- a/telemetry/third_party/modulegraph/doc/index.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-.. modulegraph documentation master file, created by
-   sphinx-quickstart on Tue Sep 28 21:04:40 2010.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
-
-Modulegraph - Python module dependency graph
-============================================
-
-modulegraph determines a dependency graph between Python modules primarily
-by bytecode analysis for import statements.
-
-modulegraph uses similar methods to :mod:`modulefinder` from the standard library,
-but uses a more flexible internal representation, has more extensive 
-knowledge of special cases, and is extensible.
-
-Contents:
-
-.. toctree::
-   :maxdepth: 1
-
-   changelog
-   license
-   commandline
-   modulegraph
-   find_modules
-   util
-   zipio
-
-Online Resources
-----------------
-
-* `Sourcecode repository on bitbucket <http://bitbucket.org/ronaldoussoren/modulegraph/>`_
-
-* `The issue tracker <http://bitbucket.org/ronaldoussoren/modulegraph/issues>`_
-
-Indices and tables
-------------------
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
diff --git a/telemetry/third_party/modulegraph/doc/license.rst b/telemetry/third_party/modulegraph/doc/license.rst
deleted file mode 100644
index f9c8cc5..0000000
--- a/telemetry/third_party/modulegraph/doc/license.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-License
-=======
-
-Copyright (c) Bob Ippolito
-
-Parts are copyright (c) 2010-2014 Ronald Oussoren
-
-MIT License
-...........
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
-so.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
-FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
diff --git a/telemetry/third_party/modulegraph/doc/modulegraph.rst b/telemetry/third_party/modulegraph/doc/modulegraph.rst
deleted file mode 100644
index 60566e7..0000000
--- a/telemetry/third_party/modulegraph/doc/modulegraph.rst
+++ /dev/null
@@ -1,531 +0,0 @@
-:mod:`modulegraph.modulegraph` --- Find modules used by a script
-================================================================
-
-.. module:: modulegraph.modulegraph
-   :synopsis: Find modules used by a script
-
-This module defines :class:`ModuleGraph`, which is used to find
-the dependencies of scripts using bytecode analysis.
-
-A number of APIs in this module refer to filesystem path. Those paths can refer to
-files inside zipfiles (for example when there are zipped egg files on :data:`sys.path`).
-Filenames referring to entries in a zipfile are not marked any way, if ``"somepath.zip"``
-refers to a zipfile, that is ``"somepath.zip/embedded/file"`` will be used to refer to
-``embedded/file`` inside the zipfile.
-
-The actual graph
-----------------
-
-.. class:: ModuleGraph([path[, excludes[, replace_paths[, implies[, graph[, debug]]]]]])
-
-   Create a new ModuleGraph object. Use the :meth:`run_script` method to add scripts,
-   and their dependencies to the graph.
-
-   :param path: Python search path to use, defaults to :data:`sys.path`
-   :param excludes: Iterable with module names that should not be included as a dependency
-   :param replace_paths: List of pathname rewrites ``(old, new)``. When this argument is
-     supplied the ``co_filename`` attributes of code objects get rewritten before scanning
-     them for dependencies.
-   :param implies: Implied module dependencies, a mapping from a module name to the list
-     of modules it depends on. Use this to tell modulegraph about dependencies that cannot
-     be found by code inspection (such as imports from C code or using the :func:`__import__`
-     function).
-   :param graph: A precreated :class:`Graph <altgraph.Graph.Graph>` object to use, the
-     default is to create a new one.
-   :param debug: The :class:`ObjectGraph <altgraph.ObjectGraph.ObjectGraph>` debug level.
-
-
-.. method:: run_script(pathname[, caller])
-
-   Create, and return,  a node by path (not module name). The *pathname* should
-   refer to a Python source file and will be scanned for dependencies.
-
-   The optional argument *caller* is the the node that calls this script,
-   and is used to add a reference in the graph.
-
-.. method:: import_hook(name[[, caller[, fromlist[, level, [, attr]]]])
-
-   Import a module and analyse its dependencies
-
-   :arg name:     The module name
-   :arg caller:   The node that caused the import to happen
-   :arg fromlist: The list of names to import, this is an empty list for
-      ``import name`` and a list of names for ``from name import a, b, c``.
-   :arg level:    The import level. The value should be ``-1`` for classical Python 2
-     imports, ``0`` for absolute imports and a positive number for relative imports (
-     where the value is the number of leading dots in the imported name).
-   :arg attr:     Attributes for the graph edge.
-
-
-.. method:: implyNodeReference(node, other, edgeData=None)
-
-   Explictly mark that *node* depends on *other*. Other is either
-   a :class:`node <Node>` or the name of a module that will be
-   searched for as if it were an absolute import.
-
-
-.. method:: createReference(fromnode, tonode[, edge_data])
-
-   Create a reference from *fromnode* to *tonode*, with optional edge data.
-
-   The default for *edge_data* is ``"direct"``.
-
-.. method:: getReferences(fromnode)
-
-   Yield all nodes that *fromnode* refers to. That is, all modules imported
-   by *fromnode*.
-
-   Node :data:`None` is the root of the graph, and refers to all notes that were
-   explicitly imported by :meth:`run_script` or :meth:`import_hook`, unless you use
-   an explicit parent with those methods.
-
-   .. versionadded:: 0.11
-
-.. method:: getReferers(tonode, collapse_missing_modules=True)
-
-   Yield all nodes that refer to *tonode*. That is, all modules that import
-   *tonode*.
-
-   If *collapse_missing_modules* is false this includes refererences from
-   :class:`MissingModule` nodes, otherwise :class:`MissingModule` nodes
-   are replaced by the "real" nodes that reference this missing node.
-
-   .. versionadded:: 0.12
-
-.. method:: foldReferences(pkgnode)
-
-   Hide all submodule nodes for package *pkgnode* and add ingoing and outgoing
-   edges to *pkgnode* based on the edges from the submodule nodes.
-
-   This can be used to simplify a module graph: after folding 'email' all
-   references to modules in the 'email' package are references to the package.
-
-   .. versionadded: 0.11
-
-.. method:: findNode(name)
-
-   Find a node by identifier.  If a node by that identifier exists, it will be returned.
-
-   If a lazy node exists by that identifier with no dependencies (excluded), it will be
-   instantiated and returned.
-
-   If a lazy node exists by that identifier with dependencies, it and its
-   dependencies will be instantiated and scanned for additional depende
-
-
-
-.. method:: create_xref([out])
-
-   Write an HTML file to the *out* stream (defaulting to :data:`sys.stdout`).
-
-   The HTML file contains a textual description of the dependency graph.
-
-
-
-.. method:: graphreport([fileobj[, flatpackages]])
-
-   .. todo:: To be documented
-
-
-
-.. method:: report()
-
-   Print a report to stdout, listing the found modules with their
-   paths, as well as modules that are missing, or seem to be missing.
-
-
-Mostly internal methods
-.......................
-
-The methods in this section should be considered as methods for subclassing at best,
-please let us know if you need these methods in your code as they are on track to be
-made private methods before the 1.0 release.
-
-.. warning:: The methods in this section will be refactored in a future release,
-   the current architecture makes it unnecessarily hard to write proper tests.
-
-.. method:: determine_parent(caller)
-
-   Returns the node of the package root voor *caller*. If *caller* is a package
-   this is the node itself, if the node is a module in a package this is the
-   node of for the package and otherwise the *caller* is not a package and
-   the result is :data:`None`.
-
-.. method:: find_head_package(parent, name[, level])
-
-   .. todo:: To be documented
-
-
-.. method:: load_tail(mod, tail)
-
-   This method is called to load the rest of a dotted name after loading the root
-   of a package. This will import all intermediate modules as well (using
-   :meth:`import_module`), and returns the module :class:`node <Node>` for the
-   requested node.
-
-   .. note:: When *tail* is empty this will just return *mod*.
-
-   :arg mod:   A start module (instance of :class:`Node`)
-   :arg tail:  The rest of a dotted name, can be empty
-   :raise ImportError: When the requested (or one of its parents) module cannot be found
-   :returns: the requested module
-
-
-
-.. method:: ensure_fromlist(m, fromlist)
-
-   Yield all submodules that would be imported when importing *fromlist*
-   from *m* (using ``from m import fromlist...``).
-
-   *m* must be a package and not a regular module.
-
-.. method:: find_all_submodules(m)
-
-   Yield the filenames for submodules of in the same package as *m*.
-
-
-
-.. method:: import_module(partname, fqname, parent)
-
-   Perform import of the module with basename *partname* (``path``) and
-   full name *fqname* (``os.path``). Import is performed by *parent*.
-
-   This will create a reference from the parent node to the
-   module node and will load the module node when it is not already
-   loaded.
-
-
-
-.. method:: load_module(fqname, fp, pathname, (suffix, mode, type))
-
-   Load the module named *fqname* from the given *pathame*. The
-   argument *fp* is either :data:`None`, or a stream where the
-   code for the Python module can be loaded (either byte-code or
-   the source code). The *(suffix, mode, type)* tuple are the
-   suffix of the source file, the open mode for the file and the
-   type of module.
-
-   Creates a node of the right class and processes the dependencies
-   of the :class:`node <Node>` by scanning the byte-code for the node.
-
-   Returns the resulting :class:`node <Node>`.
-
-
-
-.. method:: scan_code(code, m)
-
-   Scan the *code* object for module *m* and update the dependencies of
-   *m* using the import statemets found in the code.
-
-   This will automaticly scan the code for nested functions, generator
-   expressions and list comprehensions as well.
-
-
-
-.. method:: load_package(fqname, pathname)
-
-   Load a package directory.
-
-
-
-.. method:: find_module(name, path[, parent])
-
-   Locates a module named *name* that is not yet part of the
-   graph. This method will raise :exc:`ImportError` when
-   the module cannot be found or when it is already part
-   of the graph. The *name* can not be a dotted name.
-
-   The *path* is the search path used, or :data:`None` to
-   use the default path.
-
-   When the *parent* is specified *name* refers to a
-   subpackage of *parent*, and *path* should be the
-   search path of the parent.
-
-   Returns the result of the global function
-   :func:`find_module <modulegraph.modulegraph.find_module>`.
-
-
-.. method:: itergraphreport([name[, flatpackages]])
-
-   .. todo:: To be documented
-
-
-
-.. method:: replace_paths_in_code(co)
-
-   Replace the filenames in code object *co* using the *replace_paths* value that
-   was passed to the contructor. Returns the rewritten code object.
-
-
-
-.. method:: calc_setuptools_nspackages()
-
-   Returns a mapping from package name to a list of paths where that package
-   can be found in ``--single-version-externally-managed`` form.
-
-   This method is used to be able to find those packages: these use
-   a magic ``.pth`` file to ensure that the package is added to :data:`sys.path`,
-   as they do not contain an ``___init__.py`` file.
-
-   Packages in this form are used by system packages and the "pip"
-   installer.
-
-
-Graph nodes
------------
-
-The :class:`ModuleGraph` contains nodes that represent the various types of modules.
-
-.. class:: Alias(value)
-
-   This is a subclass of string that is used to mark module aliases.
-
-
-
-.. class:: Node(identifier)
-
-   Base class for nodes, which provides the common functionality.
-
-   Nodes can by used as mappings for storing arbitrary data in the node.
-
-   Nodes are compared by comparing their *identifier*.
-
-.. data:: debug
-
-   Debug level (integer)
-
-.. data:: graphident
-
-   The node identifier, this is the value of the *identifier* argument
-   to the constructor.
-
-.. data:: identifier
-
-   The node identifier, this is the value of the *identifier* argument
-   to the constructor.
-
-.. data:: filename
-
-   The filename associated with this node.
-
-.. data:: packagepath
-
-   The value of ``__path__`` for this node.
-
-.. data:: code
-
-   The :class:`code object <types.CodeObject>` associated with this node
-
-.. data:: globalnames
-
-   The set of global names that are assigned to in this module. This
-   includes those names imported through startimports of Python modules.
-
-.. data:: startimports
-
-   The set of startimports this module did that could not be resolved,
-   ie. a startimport from a non-Python module.
-
-
-.. method:: __contains__(name)
-
-   Return if there is a value associated with *name*.
-
-   This method is usually accessed as ``name in aNode``.
-
-.. method:: __setitem__(name, value)
-
-   Set the value of *name* to *value*.
-
-   This method is usually accessed as ``aNode[name] = value``.
-
-.. method:: __getitem__(name)
-
-   Returns the value of *name*, raises :exc:`KeyError` when
-   it cannot be found.
-
-   This method is usually accessed as ``value = aNode[name]``.
-
-.. method:: get(name[, default])
-
-   Returns the value of *name*, or the default value when it
-   cannot be found. The *default* is :data:`None` when not specified.
-
-.. method:: infoTuple()
-
-   Returns a tuple with information used in the :func:`repr`
-   output for the node. Subclasses can add additional informations
-   to the result.
-
-
-.. class:: AliasNode (name, node)
-
-   A node that represents an alias from a name to another node.
-
-   The value of attribute *graphident* for this node will be the
-   value of *name*, the other :class:`Node` attributed are
-   references to those attributed in *node*.
-
-.. class:: BadModule(identifier)
-
-   Base class for nodes that should be ignored for some reason
-
-.. class:: ExcludedModule(identifier)
-
-   A module that is explicitly excluded.
-
-.. class:: MissingModule(identifier)
-
-   A module that is imported but cannot be located.
-
-
-
-.. class:: Script(filename)
-
-   A python script.
-
-   .. data:: filename
-
-      The filename for the script
-
-.. class:: BaseModule(name[, filename[, path]])
-
-    The base class for actual modules. The *name* is
-    the possibly dotted module name, *filename* is the
-    filesystem path to the module and *path* is the
-    value of ``__path__`` for the module.
-
-.. data:: graphident
-
-   The name of the module
-
-.. data:: filename
-
-   The filesystem path to the module.
-
-.. data:: path
-
-   The value of ``__path__`` for this module.
-
-.. class:: BuiltinModule(name)
-
-   A built-in module (on in :data:`sys.builtin_module_names`).
-
-.. class:: SourceModule(name)
-
-   A module for which the python source code is available.
-
-.. class:: InvalidSourceModule(name)
-
-   A module for which the python source code is available, but where
-   that source code cannot be compiled (due to syntax errors).
-
-   This is a subclass of :class:`SourceModule`.
-
-   .. versionadded:: 0.12
-
-.. class:: CompiledModule(name)
-
-   A module for which only byte-code is available.
-
-.. class:: Package(name)
-
-   Represents a python package
-
-.. class:: NamespacePackage(name)
-
-   Represents a python namespace package.
-
-   This is a subclass of :class:`Package`.
-
-.. class:: Extension(name)
-
-   A native extension
-
-
-.. warning:: A number of other node types are defined in the module. Those modules aren't
-   used by modulegraph and will be removed in a future version.
-
-
-Edge data
----------
-
-The edges in a module graph by default contain information about the edge, represented
-by an instance of :class:`DependencyInfo`.
-
-.. class:: DependencyInfo(conditional, function, tryexcept, fromlist)
-
-   This class is a :func:`namedtuple <collections.namedtuple>` for representing
-   the information on a dependency between two modules.
-
-   All attributes can be used to deduce if a dependency is essential or not, and
-   are particularly useful when reporting on missing modules (dependencies on
-   :class:`MissingModule`).
-
-   .. data:: fromlist
-
-      A boolean that is true iff the target of the edge is named in the "import"
-      list of a "from" import ("from package import module").
-
-      When the target module is imported multiple times this attribute is false
-      unless all imports are in "import" list of a "from" import.
-
-   .. data:: function
-
-      A boolean that is true iff the import is done inside a function definition,
-      and is false for imports in module scope (or class scope for classes that
-      aren't definined in a function).
-
-   .. data:: tryexcept
-
-      A boolean that is true iff the import that is done in the "try" or "except"
-      block of a try statement (but not in the "else" block).
-
-   .. data:: conditional
-
-      A boolean that is true iff the import is done in either block of an "if"
-      statement.
-
-   When the target of the edge is imported multiple times the :data:`function`,
-   :data:`tryexcept` and :data:`conditional` attributes of all imports are
-   merged: when there is an import where all these attributes are false the
-   attributes are false, otherwise each attribute is set to true if it is
-   true for at least one of the imports.
-
-   For example, when a module is imported both in a try-except statement and
-   furthermore is imported in a function (in two separate statements),
-   both :data:`tryexcept` and :data:`function` will be true.  But if there
-   is a third unconditional toplevel import for that module as well all
-   three attributes are false.
-
-   .. warning::
-
-      All attributes but :data:`fromlist` will be false when the source of
-      a dependency is scanned from a byte-compiled module instead of a python
-      source file. The :data:`fromlist` attribute will stil be set correctly.
-
-Utility functions
------------------
-
-.. function:: find_module(name[, path])
-
-   A version of :func:`imp.find_module` that works with zipped packages (and other
-   :pep:`302` importers).
-
-.. function:: moduleInfoForPath(path)
-
-   Return the module name, readmode and type for the file at *path*, or
-   None if it doesn't seem to be a valid module (based on its name).
-
-.. function:: addPackagePath(packagename, path)
-
-   Add *path* to the value of ``__path__`` for the package named *packagename*.
-
-.. function:: replacePackage(oldname, newname)
-
-   Rename *oldname* to *newname* when it is found by the module finder. This
-   is used as a workaround for the hack that the ``_xmlplus`` package uses
-   to inject itself in the ``xml`` namespace.
-
-
diff --git a/telemetry/third_party/modulegraph/doc/util.rst b/telemetry/third_party/modulegraph/doc/util.rst
deleted file mode 100644
index 86427aa..0000000
--- a/telemetry/third_party/modulegraph/doc/util.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-:mod:`modulegraph.util` --- Utilies functions
-=============================================
-
-.. module:: modulegraph.util
-   :synopsis: Utilitie functions
-
-
-.. function:: imp_find_module(name, path=None)
-
-   This function has the same interface as
-   :func:`imp.find_module`, but also works with
-   dotted names.
-
-.. function:: imp_walk(name)
-
-   yields the namepart and importer information
-   for every part of a dotted module name, and
-   raises :exc:`ImportError` when the *name*
-   cannot be found.
-
-   The result elements are tuples with two
-   elements, the first is a module name,
-   the second is the result for :func:`imp.find_module`
-   for that module (taking into account :pep:`302`
-   importers)
-
-   .. deprecated:: 0.10
-
-.. function:: guess_encoding(fp)
-
-   Returns the encoding of a python source file.
diff --git a/telemetry/third_party/modulegraph/doc/zipio.rst b/telemetry/third_party/modulegraph/doc/zipio.rst
deleted file mode 100644
index dd227b8..0000000
--- a/telemetry/third_party/modulegraph/doc/zipio.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-:mod:`modulegraph.zipio` --- Read-only filesystem access
-========================================================
-
-.. module:: modulegraph.zipio
-   :synopsis: Read-only filesystem access with ZIP support
-
-This module contains a number of functions that mirror functions found
-in :mod:`os` and :mod:`os.path`, but have support for data inside
-zipfiles as well as regular filesystem objects.
-
-The *path* argument of all functions below can refer to an object
-on the filesystem, but can also refer to an entry inside a zipfile. In
-the latter case, a prefix of *path* will be the name of zipfile while
-the rest refers to an object in that zipfile. As an example, when
-``somepath/mydata.zip`` is a zipfile the path ``somepath/mydata.zip/somefile.txt``
-will refer to ``somefile.txt`` inside the zipfile.
-
-.. function:: open(path[, mode])
-
-   Open a file, like :func:`the built-in open function <__builtin__.open>`.
-
-   The *mode* defaults to ``"r"`` and must be either ``"r"`` or ``"rb"``.
-
-.. function:: listdir(path)
-
-   List the contents of a directory, like :func:`os.listdir`.
-
-
-.. function:: isfile(path)
-
-   Returns true if *path* exists and refers to a file.
-
-   Raises IOError when *path* doesn't exist at all.
-
-   Based on :func:`os.path.isfile`
-
-
-.. function:: isdir(path)
-
-   Returns true if *path* exists and refers to a directory.
-
-   Raises IOError when *path* doesn't exist at all.
-
-   Based on :func:`os.path.isdir`
-
-
-.. function:: islink(path)
-
-   Returns true if *path* exists and refers to a symbolic link.
-
-   Raises IOError when *path* doesn't exist at all.
-
-   Based on :func:`os.path.islink`
-
-
-.. function:: readlink(path)
-
-   Returns the contents of a symbolic link, like :func:`os.readlink`.
-
-.. function:: getmtime(path)
-
-   Returns the last modifiction time of a file or directory, like
-   :func:`os.path.getmtime`.
-
-.. function:: getmode(path)
-
-   Returns the UNIX file mode for a file or directory, like the
-   *st_mode* attribute in the result of :func:`os.stat`.
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph.egg-info/PKG-INFO
deleted file mode 100644
index bfd4006..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/PKG-INFO
+++ /dev/null
@@ -1,337 +0,0 @@
-Metadata-Version: 1.1
-Name: modulegraph
-Version: 0.12.1
-Summary: Python module dependency analysis tool
-Home-page: http://bitbucket.org/ronaldoussoren/modulegraph
-Author: Ronald Oussoren
-Author-email: ronaldoussoren@mac.com
-License: MIT
-Download-URL: http://pypi.python.org/pypi/modulegraph
-Description: modulegraph determines a dependency graph between Python modules primarily
-        by bytecode analysis for import statements.
-        
-        modulegraph uses similar methods to modulefinder from the standard library,
-        but uses a more flexible internal representation, has more extensive 
-        knowledge of special cases, and is extensible.
-        
-        
-        Release history
-        ===============
-        
-        0.12.1
-        ------
-        
-        * Issue #25: Complex python files could cause an "maximum recursion depth exceeded"
-          exception due to using stack-based recursion to walk the module AST.
-        
-        
-        0.12
-        ----
-        
-        * Added 'modulegraph.modulegraph.InvalidSourceModule'. This graph node is
-          used for Python source modules that cannot be compiled (for example because
-          they contain syntax errors).
-        
-          This is primarily useful for being able to create a graph for packages
-          that have python 2.x or python 3.x compatibility in separate modules that
-          contain code that isn't valid in the "other" python version.
-        
-        * Added 'modulegraph.modulegraph.InvalidCompiledModule'. This graph node
-          is used for Python bytecode modules that cannot be loaded.
-        
-        * Added 'modulegraph.modulegraph.NamespacePackage'.
-        
-          Patch by bitbucket user htgoebel.
-        
-        * No longer add a MissingModule node to the graph for 'collections.defaultdict'
-          when using 'from collections import defaultdict' ('collections.defaultdict'
-          is an attribute of 'collections', not a submodule).
-        
-        * Fixed typo in ModuleGraph.getReferences()
-        
-        * Added ModuleGraph.getReferers(tonode). This methods yields the
-          nodes that are referencing *tonode* (the reverse of getReferences)
-        
-        * The graph will no longer contain MissingModule nodes when using 'from ... import name' to
-          import a global variable in a python module.
-        
-          There will still be MissingModule nodes for global variables in C extentions, and
-          for 'from missing import name' when 'missing' is itself a MissingModule.
-        
-        * Issue #18: Don't assume that a PEP 302 loader object has a ``path`` attribute. That
-          attribute is not documented and is not always present.
-        
-        0.11.2
-        ------
-        
-        *
-        
-        0.11.1
-        ------
-        
-        * Issue #145: Don't exclude the platform specific 'path' modules (like ntpath)
-        
-        0.11
-        ----
-        
-        This is a feature release
-        
-        Features
-        ........
-        
-        * Hardcode knowlegde about the compatibility aliases in the email
-          module (for python 2.5 upto 3.0).
-        
-          This makes it possible to remove a heavy-handed recipe from py2app.
-        
-        * Added ``modegraph.zipio.getmode`` to fetch the Unix file mode
-          for a file.
-        
-        * Added some handy methods to ``modulegraph.modulegraph.ModuleGraph``.
-        
-        0.10.5
-        ------
-        
-        This is a bugfix release
-        
-        * Don't look at the file extension to determine the file type
-          in modulegraph.find_modules.parse_mf_results, but use the
-          class of the item.
-        
-        * Issue #13: Improved handing of bad relative imports
-          ("from .foo import bar"), these tended to raise confusing errors and
-          are now handled like any other failed import.
-        
-        0.10.4
-        ------
-        
-        This is a bugfix release
-        
-        * There were no 'classifiers' in the package metadata due to a bug
-          in setup.py.
-        
-        0.10.3
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
-          a py2app module didn't have a file name ending in '.py'.
-        
-        0.10.2
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * Issue #12: modulegraph would sometimes find the wrong package *__init__*
-          module due to using the wrong search method. One easy way to reproduce the
-          problem was to have a toplevel module named *__init__*.
-        
-          Reported by Kentzo.
-        
-        0.10.1
-        ------
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref
-          and --graph options of py2app) didn't work with python 3 due to use of
-          APIs that aren't available in that version of python.
-        
-          Reported by Andrew Barnert.
-        
-        
-        0.10
-        ----
-        
-        This is a minor feature release
-        
-        Features
-        ........
-        
-        * ``modulegraph.find_modules.find_needed_modules`` claimed to automaticly
-          include subpackages for the "packages" argument as well, but that code
-          didn't work at all.
-        
-        * Issue #9: The modulegraph script is deprecated, use
-          "python -mmodulegraph" instead.
-        
-        * Issue #10: Ensure that the result of "zipio.open" can be used
-          in a with statement (that is, ``with zipio.open(...) as fp``.
-        
-        * No longer use "2to3" to support Python 3.
-        
-          Because of this modulegraph now supports Python 2.6
-          and later.
-        
-        * Slightly improved HTML output, which makes it easier
-          to manipulate the generated HTML using JavaScript.
-        
-          Patch by anatoly techtonik.
-        
-        * Ensure modulegraph works with changes introduced after
-          Python 3.3b1.
-        
-        * Implement support for PEP 420 ("Implicit namespace packages")
-          in Python 3.3.
-        
-        * ``modulegraph.util.imp_walk`` is deprecated and will be
-          removed in the next release of this package.
-        
-        Bugfixes
-        ........
-        
-        * The module graph was incomplete, and generated incorrect warnings
-          along the way, when a subpackage contained import statements for
-          submodules.
-        
-          An example of this is ``sqlalchemy.util``, the ``__init__.py`` file
-          for this package contains imports of modules in that modules using
-          the classic relative import syntax (that is ``import compat`` to
-          import ``sqlalchemy.util.compat``). Until this release modulegraph
-          searched the wrong path to locate these modules (and hence failed
-          to find them).
-        
-        
-        0.9.2
-        -----
-        
-        This is a bugfix release
-        
-        Bugfixes
-        ........
-        
-        * The 'packages' option to modulegraph.find_modules.find_modules ignored
-          the search path argument but always used the default search path.
-        
-        * The 'imp_find_modules' function in modulegraph.util has an argument 'path',
-          this was a string in previous release and can now also be a sequence.
-        
-        * Don't crash when a module on the 'includes' list doesn't exist, but warn
-          just like for missing 'packages' (modulegraph.find_modules.find_modules)
-        
-        0.9.1
-        -----
-        
-        This is a bugfix release
-        
-        Bug fixes
-        .........
-        
-        - Fixed the name of nodes imports in packages where the first element of
-          a dotted name can be found but the rest cannot. This used to create
-          a MissingModule node for the dotted name in the global namespace instead
-          of relative to the package.
-        
-          That is, given a package "pkg" with submodule "sub" if the "__init__.py"
-          of "pkg" contains "import sub.nomod" we now create a MissingModule node
-          for "pkg.sub.nomod" instead of "sub.nomod".
-        
-          This fixes an issue with including the crcmod package in application
-          bundles, first reported on the pythonmac-sig mailinglist by
-          Brendan Simon.
-        
-        0.9
-        ---
-        
-        This is a minor feature release
-        
-        
-        Features:
-        
-        - Documentation is now generated using `sphinx <http://pypi.python.org/pypi/sphinx>`_
-          and can be viewed at <http://packages.python.org/modulegraph>.
-        
-          The documention is very rough at this moment and in need of reorganisation and
-          language cleanup. I've basiclly writting the current version by reading the code
-          and documenting what it does, the order in which classes and methods are document
-          is therefore not necessarily the most useful.
-        
-        - The repository has moved to bitbucket
-        
-        - Renamed ``modulegraph.modulegraph.AddPackagePath`` to ``addPackagePath``,
-          likewise ``ReplacePackage`` is now ``replacePackage``. The old name is still
-          available, but is deprecated and will be removed before the 1.0 release.
-        
-        - ``modulegraph.modulegraph`` contains two node types that are unused and
-          have unclear semantics: ``FlatPackage`` and ``ArchiveModule``. These node
-          types are deprecated and will be removed before 1.0 is released.
-        
-        - Added a simple commandline tool (``modulegraph``) that will print information
-          about the dependency graph of a script.
-        
-        - Added a module (``zipio``) for dealing with paths that may refer to entries
-          inside zipfiles (such as source paths referring to modules in zipped eggfiles).
-        
-          With this addition ``modulegraph.modulegraph.os_listdir`` is deprecated and
-          it will be removed before the 1.0 release.
-        
-        Bug fixes:
-        
-        - The ``__cmp__`` method of a Node no longer causes an exception
-          when the compared-to object is not a Node. Patch by Ivan Kozik.
-        
-        - Issue #1: The initialiser for ``modulegraph.ModuleGraph`` caused an exception
-          when an entry on the path (``sys.path``) doesn't actually exist.
-        
-          Fix by "skurylo", testcase by Ronald.
-        
-        - The code no longer worked with python 2.5, this release fixes that.
-        
-        - Due to the switch to mercurial setuptools will no longer include
-          all required files. Fixed by adding a MANIFEST.in file
-        
-        - The method for printing a ``.dot`` representation of a ``ModuleGraph``
-          works again.
-        
-        
-        0.8.1
-        -----
-        
-        This is a minor feature release
-        
-        Features:
-        
-        - ``from __future__ import absolute_import`` is now supported
-        
-        - Relative imports (``from . import module``) are now supported
-        
-        - Add support for namespace packages when those are installed
-          using option ``--single-version-externally-managed`` (part
-          of setuptools/distribute)
-        
-        0.8
-        ---
-        
-        This is a minor feature release
-        
-        Features:
-        
-        - Initial support for Python 3.x
-        
-        - It is now possible to run the test suite
-          using ``python setup.py test``.
-        
-          (The actual test suite is still fairly minimal though)
-        
-Keywords: import,,dependencies
-Platform: any
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Software Development :: Build Tools
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph.egg-info/SOURCES.txt
deleted file mode 100644
index 3409094..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,280 +0,0 @@
-MANIFEST.in
-README.txt
-setup.cfg
-setup.py
-doc/Makefile
-doc/changelog.rst
-doc/commandline.rst
-doc/conf.py
-doc/find_modules.rst
-doc/index.rst
-doc/license.rst
-doc/modulegraph.rst
-doc/util.rst
-doc/zipio.rst
-doc/_build/doctrees/changelog.doctree
-doc/_build/doctrees/commandline.doctree
-doc/_build/doctrees/environment.pickle
-doc/_build/doctrees/find_modules.doctree
-doc/_build/doctrees/index.doctree
-doc/_build/doctrees/license.doctree
-doc/_build/doctrees/modulegraph.doctree
-doc/_build/doctrees/util.doctree
-doc/_build/doctrees/zipio.doctree
-doc/_build/html/.buildinfo
-doc/_build/html/changelog.html
-doc/_build/html/commandline.html
-doc/_build/html/find_modules.html
-doc/_build/html/genindex.html
-doc/_build/html/index.html
-doc/_build/html/license.html
-doc/_build/html/modulegraph.html
-doc/_build/html/objects.inv
-doc/_build/html/py-modindex.html
-doc/_build/html/search.html
-doc/_build/html/searchindex.js
-doc/_build/html/util.html
-doc/_build/html/zipio.html
-doc/_build/html/_sources/changelog.txt
-doc/_build/html/_sources/commandline.txt
-doc/_build/html/_sources/find_modules.txt
-doc/_build/html/_sources/index.txt
-doc/_build/html/_sources/license.txt
-doc/_build/html/_sources/modulegraph.txt
-doc/_build/html/_sources/util.txt
-doc/_build/html/_sources/zipio.txt
-doc/_build/html/_static/ajax-loader.gif
-doc/_build/html/_static/basic.css
-doc/_build/html/_static/comment-bright.png
-doc/_build/html/_static/comment-close.png
-doc/_build/html/_static/comment.png
-doc/_build/html/_static/doctools.js
-doc/_build/html/_static/down-pressed.png
-doc/_build/html/_static/down.png
-doc/_build/html/_static/file.png
-doc/_build/html/_static/jquery-1.11.1.js
-doc/_build/html/_static/jquery.js
-doc/_build/html/_static/minus.png
-doc/_build/html/_static/nature.css
-doc/_build/html/_static/plus.png
-doc/_build/html/_static/pygments.css
-doc/_build/html/_static/searchtools.js
-doc/_build/html/_static/underscore-1.3.1.js
-doc/_build/html/_static/underscore.js
-doc/_build/html/_static/up-pressed.png
-doc/_build/html/_static/up.png
-doc/_build/html/_static/websupport.js
-modulegraph/__init__.py
-modulegraph/__main__.py
-modulegraph/_compat.py
-modulegraph/find_modules.py
-modulegraph/modulegraph.py
-modulegraph/util.py
-modulegraph/zipio.py
-modulegraph.egg-info/PKG-INFO
-modulegraph.egg-info/SOURCES.txt
-modulegraph.egg-info/dependency_links.txt
-modulegraph.egg-info/entry_points.txt
-modulegraph.egg-info/requires.txt
-modulegraph.egg-info/top_level.txt
-modulegraph.egg-info/zip-safe
-modulegraph_tests/__init__.py
-modulegraph_tests/test_basic.py
-modulegraph_tests/test_edge_data.py
-modulegraph_tests/test_explicit_packages.py
-modulegraph_tests/test_implies.py
-modulegraph_tests/test_import_from_init.py
-modulegraph_tests/test_imports.py
-modulegraph_tests/test_modulegraph.py
-modulegraph_tests/test_pep420_nspkg.py
-modulegraph_tests/test_pycompat_pkg.py
-modulegraph_tests/test_relimport2.py
-modulegraph_tests/test_setuptools_nspkg.py
-modulegraph_tests/test_util.py
-modulegraph_tests/test_zipio.py
-modulegraph_tests/testdata/script
-modulegraph_tests/testdata/syspath.egg
-modulegraph_tests/testdata/syspath.zip
-modulegraph_tests/testdata/test.egg
-modulegraph_tests/testdata/test.txt
-modulegraph_tests/testdata/zipped.egg
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6-nspkg.pth
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/namedpkg/slave.py
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6-nspkg.pth
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg/parent.py
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5-nspkg.pth
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5-nspkg.pth
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg/parent.py
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5-nspkg.pth
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/namedpkg/slave.py
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5-nspkg.pth
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg/parent.py
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/src/install.py
-modulegraph_tests/testdata/nspkg/src/child/setup.py
-modulegraph_tests/testdata/nspkg/src/child/namedpkg/__init__.py
-modulegraph_tests/testdata/nspkg/src/child/namedpkg/slave.py
-modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/top_level.txt
-modulegraph_tests/testdata/nspkg/src/parent/setup.py
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg/__init__.py
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg/parent.py
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/PKG-INFO
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/SOURCES.txt
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/dependency_links.txt
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/namespace_packages.txt
-modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/top_level.txt
-modulegraph_tests/testdata/subdir/file1.txt
-modulegraph_tests/testdata/subdir/file2.txt
-modulegraph_tests/testdata/syspath/myext.pyd
-modulegraph_tests/testdata/syspath/mymodule.py
-modulegraph_tests/testdata/syspath/mymodule3.py
-modulegraph_tests/testdata/syspath/mypkg/__init__.py
-modulegraph_tests/testpkg-compatmodule/pkg/__init__.py
-modulegraph_tests/testpkg-compatmodule/pkg/api.py
-modulegraph_tests/testpkg-compatmodule/pkg/api2.py
-modulegraph_tests/testpkg-compatmodule/pkg/api3.py
-modulegraph_tests/testpkg-edgedata/function_class_existing.py
-modulegraph_tests/testpkg-edgedata/function_conditional_existing.py
-modulegraph_tests/testpkg-edgedata/function_conditional_import2_existing.py
-modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py
-modulegraph_tests/testpkg-edgedata/function_existing.py
-modulegraph_tests/testpkg-edgedata/function_import2_existing.py
-modulegraph_tests/testpkg-edgedata/function_import_existing.py
-modulegraph_tests/testpkg-edgedata/script.py
-modulegraph_tests/testpkg-edgedata/script_from_import.py
-modulegraph_tests/testpkg-edgedata/script_multi_import.py
-modulegraph_tests/testpkg-edgedata/toplevel_class_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_conditional_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_conditional_import2_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_conditional_import_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_import2_existing.py
-modulegraph_tests/testpkg-edgedata/toplevel_import_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/__init__.py
-modulegraph_tests/testpkg-edgedata/pkg/function_class_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_conditional_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_import2_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/function_import_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_class_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import2_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_import2_existing.py
-modulegraph_tests/testpkg-edgedata/pkg/toplevel_import_existing.py
-modulegraph_tests/testpkg-import-from-init/script.py
-modulegraph_tests/testpkg-import-from-init/pkg/__init__.py
-modulegraph_tests/testpkg-import-from-init/pkg/subpkg/__init__.py
-modulegraph_tests/testpkg-import-from-init/pkg/subpkg/_collections.py
-modulegraph_tests/testpkg-import-from-init/pkg/subpkg/compat.py
-modulegraph_tests/testpkg-import-from-init/pkg2/__init__.py
-modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/__init__.py
-modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/_collections.py
-modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/compat.py
-modulegraph_tests/testpkg-packages/main_script.py
-modulegraph_tests/testpkg-packages/pkg/__init__.py
-modulegraph_tests/testpkg-packages/pkg/sub3.py
-modulegraph_tests/testpkg-packages/pkg/sub1/__init__.py
-modulegraph_tests/testpkg-packages/pkg/sub1/modA.py
-modulegraph_tests/testpkg-packages/pkg/sub2/__init__.py
-modulegraph_tests/testpkg-packages/pkg/sub2/mod.py
-modulegraph_tests/testpkg-pep420-namespace/path1/package/sub2.py
-modulegraph_tests/testpkg-pep420-namespace/path2/package/sub1.py
-modulegraph_tests/testpkg-pep420-namespace/path2/package/nspkg/mod.py
-modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/__init__.py
-modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/sub.py
-modulegraph_tests/testpkg-regr1/main_script.py
-modulegraph_tests/testpkg-regr1/pkg/__init__.py
-modulegraph_tests/testpkg-regr1/pkg/a.py
-modulegraph_tests/testpkg-regr1/pkg/b.py
-modulegraph_tests/testpkg-regr2/main_script.py
-modulegraph_tests/testpkg-regr2/pkg/__init__.py
-modulegraph_tests/testpkg-regr2/pkg/base.py
-modulegraph_tests/testpkg-regr2/pkg/pkg.py
-modulegraph_tests/testpkg-regr3/script.py
-modulegraph_tests/testpkg-regr3/mypkg/__init__.py
-modulegraph_tests/testpkg-regr3/mypkg/distutils/__init__.py
-modulegraph_tests/testpkg-regr3/mypkg/distutils/ccompiler.py
-modulegraph_tests/testpkg-regr4/script.py
-modulegraph_tests/testpkg-regr4/pkg/__init__.py
-modulegraph_tests/testpkg-regr4/pkg/core/__init__.py
-modulegraph_tests/testpkg-regr4/pkg/core/callables.py
-modulegraph_tests/testpkg-regr4/pkg/core/listener.py
-modulegraph_tests/testpkg-regr4/pkg/core/listenerimpl.py
-modulegraph_tests/testpkg-regr5/__init__.py
-modulegraph_tests/testpkg-regr5/script.py
-modulegraph_tests/testpkg-regr6/module.py
-modulegraph_tests/testpkg-regr6/script.py
-modulegraph_tests/testpkg-relimport/mod.py
-modulegraph_tests/testpkg-relimport/script.py
-modulegraph_tests/testpkg-relimport/pkg/__init__.py
-modulegraph_tests/testpkg-relimport/pkg/mod.py
-modulegraph_tests/testpkg-relimport/pkg/oldstyle.py
-modulegraph_tests/testpkg-relimport/pkg/relative.py
-modulegraph_tests/testpkg-relimport/pkg/relimport.py
-modulegraph_tests/testpkg-relimport/pkg/toplevel.py
-modulegraph_tests/testpkg-relimport/pkg/sub2/__init__.py
-modulegraph_tests/testpkg-relimport/pkg/sub2/mod.py
-modulegraph_tests/testpkg-relimport/pkg/subpkg/__init__.py
-modulegraph_tests/testpkg-relimport/pkg/subpkg/mod2.py
-modulegraph_tests/testpkg-relimport/pkg/subpkg/relative.py
-modulegraph_tests/testpkg-relimport/pkg/subpkg/relative2.py
-modulegraph_tests/testpkg-relimport2/toplevel.py
-modulegraph_tests/testpkg-relimport2/pkg/__init__.py
-modulegraph_tests/testpkg-relimport2/pkg/mod1.py
-modulegraph_tests/testpkg-relimport2/pkg/mod2.py
-modulegraph_tests/testpkg-relimport2/pkg/mod3.py
-modulegraph_tests/testpkg-relimport2/pkg/sub/__init__.py
-modulegraph_tests/testpkg-setuptools-namespace/setup.py
-modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/__init__.py
-modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/module.py
-modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/__init__.py
-modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/sub.py
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/__init__.py
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/module.py
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/PKG-INFO
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/SOURCES.txt
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/dependency_links.txt
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/namespace_packages.txt
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/not-zip-safe
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/top_level.txt
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/__init__.py
-modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/sub.py
-scripts/extract_implies.py
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/entry_points.txt b/telemetry/third_party/modulegraph/modulegraph.egg-info/entry_points.txt
deleted file mode 100644
index 9fc3791..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/entry_points.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-[console_scripts]
-modulegraph = modulegraph.__main__:main
-
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/requires.txt b/telemetry/third_party/modulegraph/modulegraph.egg-info/requires.txt
deleted file mode 100644
index dde6882..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/requires.txt
+++ /dev/null
@@ -1 +0,0 @@
-altgraph >= 0.12
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph.egg-info/top_level.txt
deleted file mode 100644
index e0e1b8f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-modulegraph
diff --git a/telemetry/third_party/modulegraph/modulegraph.egg-info/zip-safe b/telemetry/third_party/modulegraph/modulegraph.egg-info/zip-safe
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph.egg-info/zip-safe
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph/__init__.py b/telemetry/third_party/modulegraph/modulegraph/__init__.py
index 4147b6f..aa070c2 100644
--- a/telemetry/third_party/modulegraph/modulegraph/__init__.py
+++ b/telemetry/third_party/modulegraph/modulegraph/__init__.py
@@ -1,3 +1 @@
-from __future__ import absolute_import
-import pkg_resources
-__version__ = pkg_resources.require('modulegraph')[0].version
+__version__ = "0.19.2"
diff --git a/telemetry/third_party/modulegraph/modulegraph/__main__.py b/telemetry/third_party/modulegraph/modulegraph/__main__.py
index 6ba1eb4..48ef147 100644
--- a/telemetry/third_party/modulegraph/modulegraph/__main__.py
+++ b/telemetry/third_party/modulegraph/modulegraph/__main__.py
@@ -1,76 +1,117 @@
 from __future__ import print_function
-from __future__ import absolute_import
-import sys
+
+import argparse
 import os
-import optparse
-import textwrap
+import sys
+
 from .modulegraph import ModuleGraph
 
-def main():
-    # Parse command line
-    usage = textwrap.dedent('''\
-        Usage:
-            modulegraph [options] scriptfile ...
 
-        Valid options:
-        * -d: Increase debug level
-        * -q: Clear debug level
+def parse_arguments():
+    parser = argparse.ArgumentParser(
+        conflict_handler="resolve",
+        prog="%s -mmodulegraph" % (os.path.basename(sys.executable)),
+    )
+    parser.add_argument(
+        "-d", action="count", dest="debug", default=1, help="Increase debug level"
+    )
+    parser.add_argument(
+        "-q", action="store_const", dest="debug", const=0, help="Clear debug level"
+    )
+    parser.add_argument(
+        "-m",
+        "--modules",
+        action="store_true",
+        dest="domods",
+        default=False,
+        help="arguments are module names, not script files",
+    )
+    parser.add_argument(
+        "-x",
+        metavar="NAME",
+        action="append",
+        dest="excludes",
+        default=[],
+        help="Add NAME to the excludes list",
+    )
+    parser.add_argument(
+        "-p",
+        action="append",
+        metavar="PATH",
+        dest="addpath",
+        default=[],
+        help="Add PATH to the module search path",
+    )
+    parser.add_argument(
+        "-g",
+        "--dot",
+        action="store_const",
+        dest="output",
+        const="dot",
+        help="Output a .dot graph",
+    )
+    parser.add_argument(
+        "-h",
+        "--html",
+        action="store_const",
+        dest="output",
+        const="html",
+        help="Output a HTML file",
+    )
+    parser.add_argument(
+        "scripts", metavar="SCRIPT", nargs="+", help="scripts to analyse"
+    )
 
-        * -m: arguments are module names, not script files
-        * -x name: Add 'name' to the excludes list
-        * -p name: Add 'name' to the module search path
+    opts = parser.parse_args()
+    return opts
 
-        * -g: Output a .dot graph
-        * -h: Output a html file
-    ''')
-    parser = optparse.OptionParser(usage=usage, add_help_option=False)
-    parser.add_option('-d', action='count', dest='debug', default=1)
-    parser.add_option('-q', action='store_const', dest='debug', const=0)
 
-    parser.add_option('-m', action='store_true', dest='domods', default=False)
-    parser.add_option('-x', action='append', dest='excludes', default=[])
-    parser.add_option('-p', action='append', dest='addpath', default=[])
-
-    parser.add_option('-g', action='store_const', dest='output', const='dot')
-    parser.add_option('-h', action='store_const', dest='output', const='html')
-    opts, args = parser.parse_args()
-
-    if not args:
-        print("No script specified", file=sys.stderr)
-        print(usage, file=sys.stderr)
-        sys.exit(1)
-
-    script = args[0]
-
+def create_graph(scripts, domods, debuglevel, excludes, path_extras):
     # Set the path based on sys.path and the script directory
     path = sys.path[:]
-    path[0] = os.path.dirname(script)
-    path = opts.addpath + path
-    if opts.debug > 1:
+
+    if domods:
+        del path[0]
+    else:
+        path[0] = os.path.dirname(scripts[0])
+
+    path = path_extras + path
+    if debuglevel > 1:
         print("path:", file=sys.stderr)
         for item in path:
             print("   ", repr(item), file=sys.stderr)
 
     # Create the module finder and turn its crank
-    mf = ModuleGraph(path, excludes=opts.excludes, debug=opts.debug)
-    for arg in args:
-        if opts.domods:
-            if arg[-2:] == '.*':
+    mf = ModuleGraph(path, excludes=excludes, debug=debuglevel)
+    for arg in scripts:
+        if domods:
+            if arg[-2:] == ".*":
                 mf.import_hook(arg[:-2], None, ["*"])
             else:
                 mf.import_hook(arg)
         else:
             mf.run_script(arg)
-    if opts.output == 'dot':
+    return mf
+
+
+def output_graph(output_format, mf):
+    if output_format == "dot":
         mf.graphreport()
-    elif opts.output == 'html':
+    elif output_format == "html":
         mf.create_xref()
     else:
         mf.report()
-    sys.exit(0)
 
 
-if __name__ == '__main__':
+def main():
+    opts = parse_arguments()
+    mf = create_graph(
+        opts.scripts, opts.domods, opts.debug, opts.excludes, opts.addpath
+    )
+    output_graph(opts.output, mf)
+
+
+if __name__ == "__main__":  # pragma: no cover
     try:
         main()
     except KeyboardInterrupt:
diff --git a/telemetry/third_party/modulegraph/modulegraph/_compat.py b/telemetry/third_party/modulegraph/modulegraph/_compat.py
deleted file mode 100644
index d96019b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph/_compat.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from __future__ import absolute_import
-import sys
-
-if sys.version_info[0] == 2:
-    def Bchr(value):
-        return chr(value)
-
-else:
-    def Bchr(value):
-        return value
diff --git a/telemetry/third_party/modulegraph/modulegraph/find_modules.py b/telemetry/third_party/modulegraph/modulegraph/find_modules.py
index 8817793..870d9f4 100644
--- a/telemetry/third_party/modulegraph/modulegraph/find_modules.py
+++ b/telemetry/third_party/modulegraph/modulegraph/find_modules.py
@@ -9,54 +9,51 @@
 """
 from __future__ import absolute_import
 
-import sys
-import os
 import imp
+import os
+import sys
 import warnings
 
-import modulegraph.modulegraph as modulegraph
-from modulegraph.modulegraph import Alias, Script, Extension
-from modulegraph.util import imp_find_module
+from . import modulegraph
+from .modulegraph import Alias, Extension, Script
+from .util import imp_find_module
 
-__all__ = [
-    'find_modules', 'parse_mf_results'
-]
+__all__ = ["find_modules", "parse_mf_results"]
+
+_PLATFORM_MODULES = {"posix", "nt", "os2", "mac", "ce", "riscos"}
+
 
 def get_implies():
     result = {
-        # imports done from builtin modules in C code (untrackable by modulegraph)
-        "_curses":      ["curses"],
-        "posix":        ["resource"],
-        "gc":           ["time"],
-        "time":         ["_strptime"],
-        "datetime":     ["time"],
-        "MacOS":        ["macresource"],
-        "cPickle":      ["copy_reg", "cStringIO"],
-        "parser":       ["copy_reg"],
-        "codecs":       ["encodings"],
-        "cStringIO":    ["copy_reg"],
-        "_sre":         ["copy", "string", "sre"],
-        "zipimport":    ["zlib"],
-
+        # imports done from builtin modules in C code
+        # (untrackable by modulegraph)
+        "_curses": ["curses"],
+        "posix": ["resource"],
+        "gc": ["time"],
+        "time": ["_strptime"],
+        "datetime": ["time"],
+        "MacOS": ["macresource"],
+        "cPickle": ["copy_reg", "cStringIO"],
+        "parser": ["copy_reg"],
+        "codecs": ["encodings"],
+        "cStringIO": ["copy_reg"],
+        "_sre": ["copy", "string", "sre"],
+        "zipimport": ["zlib"],
         # Python 3.2:
-        "_datetime":    ["time", "_strptime"],
-        "_json":        ["json.decoder"],
-        "_pickle":      ["codecs", "copyreg", "_compat_pickle"],
+        "_datetime": ["time", "_strptime"],
+        "_json": ["json.decoder"],
+        "_pickle": ["codecs", "copyreg", "_compat_pickle"],
         "_posixsubprocess": ["gc"],
-        "_ssl":         ["socket"],
-
+        "_ssl": ["socket"],
         # Python 3.3:
-        "_elementtree": ["copy", "xml.etree.ElementPath" ],
-
+        "_elementtree": ["copy", "xml.etree.ElementPath"],
         # mactoolboxglue can do a bunch more of these
         # that are far harder to predict, these should be tracked
         # manually for now.
-
         # this isn't C, but it uses __import__
-        "anydbm":       ["dbhash", "gdbm", "dbm", "dumbdbm", "whichdb"],
+        "anydbm": ["dbhash", "gdbm", "dbm", "dumbdbm", "whichdb"],
         # package aliases
-        "wxPython.wx":  Alias('wx'),
-
+        "wxPython.wx": Alias("wx"),
     }
 
     if sys.version_info[0] == 3:
@@ -67,47 +64,50 @@
         result["_frozen_importlib"] = None
 
     if sys.version_info[0] == 2 and sys.version_info[1] >= 5:
-        result.update({
-            "email.base64MIME":         Alias("email.base64mime"),
-            "email.Charset":            Alias("email.charset"),
-            "email.Encoders":           Alias("email.encoders"),
-            "email.Errors":             Alias("email.errors"),
-            "email.Feedparser":         Alias("email.feedParser"),
-            "email.Generator":          Alias("email.generator"),
-            "email.Header":             Alias("email.header"),
-            "email.Iterators":          Alias("email.iterators"),
-            "email.Message":            Alias("email.message"),
-            "email.Parser":             Alias("email.parser"),
-            "email.quopriMIME":         Alias("email.quoprimime"),
-            "email.Utils":              Alias("email.utils"),
-            "email.MIMEAudio":          Alias("email.mime.audio"),
-            "email.MIMEBase":           Alias("email.mime.base"),
-            "email.MIMEImage":          Alias("email.mime.image"),
-            "email.MIMEMessage":        Alias("email.mime.message"),
-            "email.MIMEMultipart":      Alias("email.mime.multipart"),
-            "email.MIMENonMultipart":   Alias("email.mime.nonmultipart"),
-            "email.MIMEText":           Alias("email.mime.text"),
-        })
+        result.update(
+            {
+                "email.base64MIME": Alias("email.base64mime"),
+                "email.Charset": Alias("email.charset"),
+                "email.Encoders": Alias("email.encoders"),
+                "email.Errors": Alias("email.errors"),
+                "email.Feedparser": Alias("email.feedParser"),
+                "email.Generator": Alias("email.generator"),
+                "email.Header": Alias("email.header"),
+                "email.Iterators": Alias("email.iterators"),
+                "email.Message": Alias("email.message"),
+                "email.Parser": Alias("email.parser"),
+                "email.quopriMIME": Alias("email.quoprimime"),
+                "email.Utils": Alias("email.utils"),
+                "email.MIMEAudio": Alias("email.mime.audio"),
+                "email.MIMEBase": Alias("email.mime.base"),
+                "email.MIMEImage": Alias("email.mime.image"),
+                "email.MIMEMessage": Alias("email.mime.message"),
+                "email.MIMEMultipart": Alias("email.mime.multipart"),
+                "email.MIMENonMultipart": Alias("email.mime.nonmultipart"),
+                "email.MIMEText": Alias("email.mime.text"),
+            }
+        )
 
     if sys.version_info[:2] >= (2, 5):
         result["_elementtree"] = ["pyexpat"]
 
         import xml.etree
+
         files = os.listdir(xml.etree.__path__[0])
         for fn in files:
-            if fn.endswith('.py') and fn != "__init__.py":
-                result["_elementtree"].append("xml.etree.%s"%(fn[:-3],))
+            if fn.endswith(".py") and fn != "__init__.py":
+                result["_elementtree"].append("xml.etree.%s" % (fn[:-3],))
 
     if sys.version_info[:2] >= (2, 6):
-        result['future_builtins'] = ['itertools']
+        result["future_builtins"] = ["itertools"]
 
     # os.path is an alias for a platform specific submodule,
     # ensure that the graph shows this.
-    result['os.path'] = Alias(os.path.__name__)
-
+    result["os.path"] = Alias(os.path.__name__)
 
     return result
 
+
 def parse_mf_results(mf):
     """
     Return two lists: the first one contains the python files in the graph,
@@ -115,11 +115,6 @@
 
     :param mf: a :class:`modulegraph.modulegraph.ModuleGraph` instance
     """
-    #for name, imports in get_hidden_imports().items():
-    #    if name in mf.modules.keys():
-    #        for mod in imports:
-    #            mf.import_hook(mod)
-
     # Retrieve modules from modulegraph
     py_files = []
     extensions = []
@@ -130,7 +125,7 @@
         if item.identifier == "__main__":
             continue
         src = item.filename
-        if src and src != '-':
+        if src and src != "-":
             if isinstance(item, Script):
                 # Scripts are python files
                 py_files.append(item)
@@ -151,96 +146,78 @@
     # used by Python itself
     includes.update(["warnings", "unicodedata", "weakref"])
 
-    #if os.uname()[0] != 'java':
-        # Jython specific imports in the stdlib:
-        #excludes.update([
-        #    'java.lang',
-        #    'org.python.core',
-        #])
+    if not sys.platform.startswith("irix"):
+        excludes.update(["AL", "sgi", "vms_lib"])
 
-    if not sys.platform.startswith('irix'):
-        excludes.update([
-            'AL',
-            'sgi',
-            'vms_lib',
-        ])
+    if sys.platform not in ("mac", "darwin"):
+        excludes.update(
+            [
+                "Audio_mac",
+                "Carbon.File",
+                "Carbon.Folder",
+                "Carbon.Folders",
+                "EasyDialogs",
+                "MacOS",
+                "macfs",
+                "macostools",
+                "_scproxy",
+            ]
+        )
 
-    if not sys.platform in ('mac', 'darwin'):
-        # XXX - this doesn't look nearly complete
-        excludes.update([
-            'Audio_mac',
-            'Carbon.File',
-            'Carbon.Folder',
-            'Carbon.Folders',
-            'EasyDialogs',
-            'MacOS',
-            'macfs',
-            'macostools',
-            #'macpath',
-            '_scproxy',
-        ])
-
-    if not sys.platform == 'win32':
+    if not sys.platform == "win32":
         # only win32
-        excludes.update([
-            #'ntpath',
-            'nturl2path',
-            'win32api',
-            'win32con',
-            'win32event',
-            'win32evtlogutil',
-            'win32evtlog',
-            'win32file',
-            'win32gui',
-            'win32pipe',
-            'win32process',
-            'win32security',
-            'pywintypes',
-            'winsound',
-            'win32',
-            '_winreg',
-            '_winapi',
-            'msvcrt',
-            'winreg',
-            '_subprocess',
-         ])
+        excludes.update(
+            [
+                "nturl2path",
+                "win32api",
+                "win32con",
+                "win32event",
+                "win32evtlogutil",
+                "win32evtlog",
+                "win32file",
+                "win32gui",
+                "win32pipe",
+                "win32process",
+                "win32security",
+                "pywintypes",
+                "winsound",
+                "win32",
+                "_winreg",
+                "_winapi",
+                "msvcrt",
+                "winreg",
+                "_subprocess",
+            ]
+        )
 
-    if not sys.platform == 'riscos':
-        excludes.update([
-             'riscosenviron',
-             #'riscospath',
-             'rourl2path',
-          ])
+    if not sys.platform == "riscos":
+        excludes.update(["riscosenviron", "rourl2path"])
 
-    if not sys.platform == 'dos' or sys.platform.startswith('ms-dos'):
-        excludes.update([
-            'dos',
-        ])
+    if not sys.platform == "dos" or sys.platform.startswith("ms-dos"):
+        excludes.update(["dos"])
 
-    if not sys.platform == 'os2emx':
-        excludes.update([
-            #'os2emxpath',
-            '_emx_link',
-        ])
+    if not sys.platform == "os2emx":
+        excludes.update(["_emx_link"])
 
-    excludes.update({'posix', 'nt', 'os2', 'mac', 'ce', 'riscos'} - set(sys.builtin_module_names))
+    excludes.update(_PLATFORM_MODULES - set(sys.builtin_module_names))
 
     # Carbon.Res depends on this, but the module hasn't been present
     # for a while...
-    excludes.add('OverrideFrom23')
-    excludes.add('OverrideFrom23._Res')
+    excludes.add("OverrideFrom23")
+    excludes.add("OverrideFrom23._Res")
 
     # import trickery in the dummy_threading module (stdlib)
-    excludes.add('_dummy_threading')
+    excludes.add("_dummy_threading")
 
     try:
-        imp_find_module('poll')
+        imp_find_module("poll")
     except ImportError:
-        excludes.update([
-            'poll',
-        ])
+        excludes.update(["poll"])
 
-def find_needed_modules(mf=None, scripts=(), includes=(), packages=(), warn=warnings.warn):
+
+def find_needed_modules(
+    mf=None, scripts=(), includes=(), packages=(), warn=warnings.warn
+):
     if mf is None:
         mf = modulegraph.ModuleGraph()
     # feed Modulefinder with everything, and return it.
@@ -250,23 +227,22 @@
 
     for mod in includes:
         try:
-            if mod[-2:] == '.*':
-                mf.import_hook(mod[:-2], None, ['*'])
+            if mod[-2:] == ".*":
+                mf.import_hook(mod[:-2], None, ["*"])
             else:
                 mf.import_hook(mod)
         except ImportError:
-            warn("No module named %s"%(mod,))
+            warn("No module named %s" % (mod,))
 
     for f in packages:
         # If modulegraph has seen a reference to the package, then
         # we prefer to believe that (imp_find_module doesn't seem to locate
         # sub-packages)
         m = mf.findNode(f)
-        if m is not None:
+        if m is not None and m.packagepath is not None:
             path = m.packagepath[0]
         else:
             # Find path of package
-            # TODO: use imp_find_module_or_importer
             try:
                 path = imp_find_module(f, mf.path)[1]
             except ImportError:
@@ -278,44 +254,50 @@
         # first trim the path (of the head package),
         # then convert directory name in package name,
         # finally push into modulegraph.
-        # FIXME:
-        # 1) Needs to be adjusted for namespace packages in python 3.3
-        # 2) Code is fairly dodgy and needs better tests
         for (dirpath, dirnames, filenames) in os.walk(path):
-            if '__init__.py' in filenames and dirpath.startswith(path):
-                package = f + '.' + dirpath[len(path)+1:].replace(os.sep, '.')
-                if package.endswith('.'):
+            if "__init__.py" in filenames and dirpath.startswith(path):
+                package = (
+                    f
+                    + "."
+                    + dirpath[len(path) + 1 :].replace(os.sep, ".")  # noqa: E203
+                )
+                if package.endswith("."):
                     package = package[:-1]
                 m = mf.import_hook(package, None, ["*"])
             else:
                 # Exclude subtrees that aren't packages
                 dirnames[:] = []
 
-
     return mf
 
+
 #
 # resource constants
 #
-PY_SUFFIXES = ['.py', '.pyw', '.pyo', '.pyc']
+
+
+PY_SUFFIXES = [".py", ".pyw", ".pyo", ".pyc"]
 C_SUFFIXES = [
-    _triple[0] for _triple in imp.get_suffixes()
-    if _triple[2] == imp.C_EXTENSION
+    _triple[0] for _triple in imp.get_suffixes() if _triple[2] == imp.C_EXTENSION
 ]
 
+
 #
 # side-effects
 #
 
+
 def _replacePackages():
     REPLACEPACKAGES = {
-        '_xmlplus':     'xml',
+        "_xmlplus": "xml",
     }
     for k, v in REPLACEPACKAGES.items():
         modulegraph.replacePackage(k, v)
 
+
 _replacePackages()
 
+
 def find_modules(scripts=(), includes=(), packages=(), excludes=(), path=None, debug=0):
     """
     High-level interface, takes iterables for:
@@ -324,8 +306,9 @@
     And returns a :class:`modulegraph.modulegraph.ModuleGraph` instance,
     python_files, and extensions
 
-    python_files is a list of pure python dependencies as modulegraph.Module objects,
-    extensions is a list of platform-specific C extension dependencies as modulegraph.Module objects
+    python_files is a list of pure python dependencies as modulegraph.Module
+    objects, extensions is a list of platform-specific C extension dependencies
+    as modulegraph.Module objects
     """
     scripts = set(scripts)
     includes = set(includes)
@@ -340,27 +323,3 @@
     )
     find_needed_modules(mf, scripts, includes, packages)
     return mf
-
-def test():
-    if '-g' in sys.argv[1:]:
-        sys.argv.remove('-g')
-        dograph = True
-    else:
-        dograph = False
-    if '-x' in sys.argv[1:]:
-        sys.argv.remove('-x')
-        doxref = True
-    else:
-        doxref= False
-
-    scripts = sys.argv[1:] or [__file__]
-    mf = find_modules(scripts=scripts)
-    if doxref:
-        mf.create_xref()
-    elif dograph:
-        mf.graphreport()
-    else:
-        mf.report()
-
-if __name__ == '__main__':
-    test()
diff --git a/telemetry/third_party/modulegraph/modulegraph/modulegraph.py b/telemetry/third_party/modulegraph/modulegraph/modulegraph.py
index 0441c4d..7c60707 100644
--- a/telemetry/third_party/modulegraph/modulegraph/modulegraph.py
+++ b/telemetry/third_party/modulegraph/modulegraph/modulegraph.py
@@ -3,44 +3,41 @@
 
 Based on the stdlib modulefinder by Thomas Heller and Just van Rossum,
 but uses a graph data structure and 2.3 features
-
-XXX: Verify all calls to import_hook (and variants) to ensure that
-imports are done in the right way.
 """
 from __future__ import absolute_import, print_function
 
-import pkg_resources
-
+import ast
+import codecs
 import dis
 import imp
 import marshal
 import os
-import sys
-import struct
-import zipimport
 import re
+import struct
+import sys
+import warnings
+import zipimport
 from collections import deque, namedtuple
-import ast
 
-from altgraph.ObjectGraph import ObjectGraph
+import pkg_resources
 from altgraph import GraphError
+from altgraph.ObjectGraph import ObjectGraph
 
-from itertools import count
-
-from modulegraph import util
-from modulegraph import zipio
-from six.moves import map
+from . import util, zipio
 
 if sys.version_info[0] == 2:
-    from StringIO import StringIO as BytesIO
+    from urllib import pathname2url
+
     from StringIO import StringIO
-    from  six.moves.urllib.request import pathname2url
+    from StringIO import StringIO as BytesIO
+
     def _Bchr(value):
         return chr(value)
 
+
 else:
-    from urllib.request  import pathname2url
     from io import BytesIO, StringIO
+    from urllib.request import pathname2url
 
     def _Bchr(value):
         return value
@@ -53,6 +50,7 @@
     _READ_MODE = "r"
 
 
+BOM = codecs.BOM_UTF8.decode("utf-8")
 
 
 # Modulegraph does a good job at simulating Python's, but it can not
@@ -68,13 +66,39 @@
 #
 # The value is a list of such prefixes as the prefix varies with versions of
 # setuptools.
-_SETUPTOOLS_NAMESPACEPKG_PTHs=(
-    "import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('",
-    "import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('",
-    "import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('",
+_SETUPTOOLS_NAMESPACEPKG_PTHs = (
+    # setuptools 31.0.0
+    (
+        "import sys, types, os;has_mfs = sys.version_info > (3, 5);"
+        "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('"
+    ),
+    # distribute 0.6.10
+    (
+        "import sys,types,os; p = os.path.join("
+        "sys._getframe(1).f_locals['sitedir'], *('"
+    ),
+    # setuptools 0.6c9, distribute 0.6.12
+    (
+        "import sys,new,os; p = os.path.join(sys._getframe("
+        "1).f_locals['sitedir'], *('"
+    ),
+    # setuptools 28.1.0
+    (
+        "import sys, types, os;p = os.path.join("
+        "sys._getframe(1).f_locals['sitedir'], *('"
+    ),
+    # setuptools 28.7.0
+    (
+        "import sys, types, os;pep420 = sys.version_info > (3, 3);"
+        "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('"
+    ),
 )
 
 
+class InvalidRelativeImportError(ImportError):
+    pass
+
+
 def _namespace_package_path(fqname, pathnames, path=None):
     """
     Return the __path__ for the python package in *fqname*.
@@ -87,17 +111,18 @@
     path = list(pathnames)
 
     for dist in working_set:
-        if dist.has_metadata('namespace_packages.txt'):
-            namespaces = dist.get_metadata(
-                    'namespace_packages.txt').splitlines()
+        if dist.has_metadata("namespace_packages.txt"):
+            namespaces = dist.get_metadata("namespace_packages.txt").splitlines()
             if fqname in namespaces:
-                nspath = os.path.join(dist.location, *fqname.split('.'))
+                nspath = os.path.join(dist.location, *fqname.split("."))
                 if nspath not in path:
                     path.append(nspath)
 
     return path
 
-_strs = re.compile(r'''^\s*["']([A-Za-z0-9_]+)["'],?\s*''') # "<- emacs happy
+
+_strs = re.compile(r"""^\s*["']([A-Za-z0-9_]+)["'],?\s*""")  # "<- emacs happy
+
 
 def _eval_str_tuple(value):
     """
@@ -107,7 +132,7 @@
     This only works with a tuple where the members are
     python identifiers.
     """
-    if not (value.startswith('(') and value.endswith(')')):
+    if not (value.startswith("(") and value.endswith(")")):
         raise ValueError(value)
 
     orig_value = value
@@ -120,37 +145,67 @@
             raise ValueError(orig_value)
 
         result.append(m.group(1))
-        value = value[len(m.group(0)):]
+        value = value[len(m.group(0)) :]  # noqa: E203
 
     return tuple(result)
 
+
 def _path_from_importerror(exc, default):
     # This is a hack, but sadly enough the necessary information
     # isn't available otherwise.
-    m = re.match('^No module named (\S+)$', str(exc))
+    m = re.match(r"^No module named (\S+)$", str(exc))
     if m is not None:
         return m.group(1)
 
     return default
 
+
 def os_listdir(path):
     """
     Deprecated name
     """
-    warnings.warn("Use zipio.listdir instead of os_listdir",
-            DeprecationWarning)
+    warnings.warn("Use zipio.listdir instead of os_listdir", DeprecationWarning)
     return zipio.listdir(path)
 
 
 def _code_to_file(co):
-    """ Convert code object to a .pyc pseudo-file """
-    return BytesIO(
-            imp.get_magic() + b'\0\0\0\0' + marshal.dumps(co))
+    """Convert code object to a .pyc pseudo-file"""
+    return BytesIO(imp.get_magic() + b"\0\0\0\0" + marshal.dumps(co))
 
 
 def find_module(name, path=None):
     """
-    A version of imp.find_module that works with zipped packages.
+    Get a 3-tuple detailing the physical location of the Python module with
+    the passed name if that module is found *or* raise `ImportError` otherwise.
+
+    This low-level function is a variant on the standard `imp.find_module()`
+    function with additional support for:
+
+    * Multiple search paths. The passed list of absolute paths will be
+      iteratively searched for the first directory containing a file
+      corresponding to this module.
+    * Compressed (e.g., zipped) packages.
+
+    For efficiency, the high-level `ModuleGraph.find_module()` method wraps
+    this function with graph-based module caching.
+
+    Parameters
+    ----------
+    name : str
+        Fully-qualified name of the Python module to be found.
+    path : list
+        List of the absolute paths of all directories to search for this module
+        *or* `None` if the default path list `sys.path` is to be searched.
+
+    Returns
+    ----------
+    (file_handle, filename, metadata)
+        3-tuple detailing the physical location of this module, where:
+        * `file_handle` is an open read-only file handle from which the
+            contents of this module may be read.
+        * `filename` is the absolute path of this file.
+        * `metadata` is itself a 3-tuple `(file_suffix, mode, imp_type)`.  See
+          `load_module()` for details.
     """
     if path is None:
         path = sys.path
@@ -160,10 +215,12 @@
     # - In setuptools 0.7 and later there's _pkgutil.ImpImporter
     # - In earlier setuptools versions you pkg_resources.ImpWrapper
     #
-    # XXX: This is a bit of a hack, should check if we can just rely on
+    # This is a bit of a hack, should check if we can just rely on
     # PEP302's get_code() method with all recent versions of pkgutil and/or
     # setuptools (setuptools 0.6.latest, setuptools trunk and python2.[45])
     #
+    # For python 3.4 this code should be replaced by code calling
+    # importlib.util.find_spec().
     # For python 3.3 this code should be replaced by code using importlib,
     # for python 3.2 and 2.7 this should be cleaned up a lot.
     try:
@@ -174,14 +231,19 @@
         except ImportError:
             ImpImporter = pkg_resources.ImpWrapper
 
-    namespace_path =[]
+    try:
+        from importlib.machinery import ExtensionFileLoader
+    except ImportError:
+        ExtensionFileLoader = None
+
+    namespace_path = []
     fp = None
     for entry in path:
         importer = pkg_resources.get_importer(entry)
         if importer is None:
             continue
 
-        if sys.version_info[:2] >= (3, 3) and hasattr(importer, 'find_loader'):
+        if sys.version_info[:2] >= (3, 3) and hasattr(importer, "find_loader"):
             loader, portions = importer.find_loader(name)
 
         else:
@@ -190,44 +252,56 @@
 
         namespace_path.extend(portions)
 
-        if loader is None: continue
+        if loader is None:
+            continue
 
-        if isinstance(importer, ImpImporter):
+        if ExtensionFileLoader is not None and isinstance(loader, ExtensionFileLoader):
+            filename = loader.path
+
+            for _sfx, _mode, _type in imp.get_suffixes():
+                if _type == imp.C_EXTENSION and filename.endswith(_sfx):
+                    description = (_sfx, "rb", imp.C_EXTENSION)
+                    break
+            else:
+                raise RuntimeError("Don't know how to handle %r" % (importer,))
+
+            return (None, filename, description)
+
+        elif isinstance(importer, ImpImporter):
             filename = loader.filename
-            if filename.endswith('.pyc') or filename.endswith('.pyo'):
-                fp = open(filename, 'rb')
-                description = ('.pyc', 'rb', imp.PY_COMPILED)
+            if filename.endswith(".pyc") or filename.endswith(".pyo"):
+                fp = open(filename, "rb")
+                description = (".pyc", "rb", imp.PY_COMPILED)
                 return (fp, filename, description)
 
-            elif filename.endswith('.py'):
+            elif filename.endswith(".py"):
                 if sys.version_info[0] == 2:
                     fp = open(filename, _READ_MODE)
                 else:
-                    with open(filename, 'rb') as fp:
+                    with open(filename, "rb") as fp:
                         encoding = util.guess_encoding(fp)
 
                     fp = open(filename, _READ_MODE, encoding=encoding)
-                description = ('.py', _READ_MODE, imp.PY_SOURCE)
+                description = (".py", _READ_MODE, imp.PY_SOURCE)
                 return (fp, filename, description)
 
             else:
                 for _sfx, _mode, _type in imp.get_suffixes():
                     if _type == imp.C_EXTENSION and filename.endswith(_sfx):
-                        description = (_sfx, 'rb', imp.C_EXTENSION)
+                        description = (_sfx, "rb", imp.C_EXTENSION)
                         break
                 else:
-                    description = ('', '', imp.PKG_DIRECTORY)
+                    description = ("", "", imp.PKG_DIRECTORY)
 
                 return (None, filename, description)
 
-        if hasattr(loader, 'path'):
-            if loader.path.endswith('.pyc') or loader.path.endswith('.pyo'):
-                fp = open(loader.path, 'rb')
-                description = ('.pyc', 'rb', imp.PY_COMPILED)
+        if hasattr(loader, "path"):
+            if loader.path.endswith(".pyc") or loader.path.endswith(".pyo"):
+                fp = open(loader.path, "rb")
+                description = (".pyc", "rb", imp.PY_COMPILED)
                 return (fp, loader.path, description)
 
-
-        if hasattr(loader, 'get_source'):
+        if hasattr(loader, "get_source"):
             source = loader.get_source(name)
             fp = StringIO(source)
             co = None
@@ -236,7 +310,7 @@
             source = None
 
         if source is None:
-            if hasattr(loader, 'get_code'):
+            if hasattr(loader, "get_code"):
                 co = loader.get_code(name)
                 fp = _code_to_file(co)
 
@@ -244,12 +318,12 @@
                 fp = None
                 co = None
 
-        pathname = os.path.join(entry, *name.split('.'))
+        pathname = os.path.join(entry, *name.split("."))
 
         if isinstance(loader, zipimport.zipimporter):
             # Check if this happens to be a wrapper module introduced by
             # setuptools, if it is we return the actual extension.
-            zn = '/'.join(name.split('.'))
+            zn = "/".join(name.split("."))
             for _sfx, _mode, _type in imp.get_suffixes():
                 if _type == imp.C_EXTENSION:
                     p = loader.prefix + zn + _sfx
@@ -259,16 +333,16 @@
                         loader_files = loader._files
 
                     if p in loader_files:
-                        description = (_sfx, 'rb', imp.C_EXTENSION)
+                        description = (_sfx, "rb", imp.C_EXTENSION)
                         return (None, pathname + _sfx, description)
 
-        if hasattr(loader, 'is_package') and loader.is_package(name):
-            return (None, pathname, ('', '', imp.PKG_DIRECTORY))
+        if hasattr(loader, "is_package") and loader.is_package(name):
+            return (None, pathname, ("", "", imp.PKG_DIRECTORY))
 
         if co is None:
-            if hasattr(loader, 'path'):
+            if hasattr(loader, "path"):
                 filename = loader.path
-            elif hasattr(loader, 'get_filename'):
+            elif hasattr(loader, "get_filename"):
                 filename = loader.get_filename(name)
                 if source is not None:
                     if filename.endswith(".pyc") or filename.endswith(".pyo"):
@@ -276,74 +350,91 @@
             else:
                 filename = None
 
-            if filename is not None and (filename.endswith('.py') or filename.endswith('.pyw')):
-                return (fp, filename, ('.py', 'rU', imp.PY_SOURCE))
+            if filename is not None and (
+                filename.endswith(".py") or filename.endswith(".pyw")
+            ):
+                return (fp, filename, (".py", "rU", imp.PY_SOURCE))
             else:
                 if fp is not None:
                     fp.close()
-                return (None, filename, (os.path.splitext(filename)[-1], 'rb', imp.C_EXTENSION))
+                return (
+                    None,
+                    filename,
+                    (os.path.splitext(filename)[-1], "rb", imp.C_EXTENSION),
+                )
 
         else:
-            if hasattr(loader, 'path'):
-                return (fp, loader.path, ('.pyc', 'rb', imp.PY_COMPILED))
+            if hasattr(loader, "path"):
+                return (fp, loader.path, (".pyc", "rb", imp.PY_COMPILED))
             else:
-                return (fp, pathname + '.pyc', ('.pyc', 'rb', imp.PY_COMPILED))
+                return (fp, pathname + ".pyc", (".pyc", "rb", imp.PY_COMPILED))
 
     if namespace_path:
         if fp is not None:
             fp.close()
-        return (None, namespace_path[0], ('', namespace_path, imp.PKG_DIRECTORY))
+        return (None, namespace_path[0], ("", namespace_path, imp.PKG_DIRECTORY))
 
     raise ImportError(name)
 
+
 def moduleInfoForPath(path):
     for (ext, readmode, typ) in imp.get_suffixes():
         if path.endswith(ext):
-            return os.path.basename(path)[:-len(ext)], readmode, typ
+            return os.path.basename(path)[: -len(ext)], readmode, typ
     return None
 
-# A Public interface
-import warnings
+
 def AddPackagePath(packagename, path):
-    warnings.warn("Use addPackagePath instead of AddPackagePath",
-            DeprecationWarning)
+    warnings.warn("Use addPackagePath instead of AddPackagePath", DeprecationWarning)
 
     addPackagePath(packagename, path)
 
+
 def addPackagePath(packagename, path):
     paths = _packagePathMap.get(packagename, [])
     paths.append(path)
     _packagePathMap[packagename] = paths
 
+
 _replacePackageMap = {}
 
+
 # This ReplacePackage mechanism allows modulefinder to work around the
 # way the _xmlplus package injects itself under the name "xml" into
 # sys.modules at runtime by calling ReplacePackage("_xmlplus", "xml")
 # before running ModuleGraph.
 def ReplacePackage(oldname, newname):
-    warnings.warn("use replacePackage instead of ReplacePackage",
-            DeprecationWarning)
+    warnings.warn("use replacePackage instead of ReplacePackage", DeprecationWarning)
     replacePackage(oldname, newname)
 
+
 def replacePackage(oldname, newname):
     _replacePackageMap[oldname] = newname
 
 
-class DependencyInfo (namedtuple("DependencyInfo", ["conditional", "function", "tryexcept", "fromlist"])):
+class DependencyInfo(
+    namedtuple("DependencyInfo", ["conditional", "function", "tryexcept", "fromlist"])
+):
     __slots__ = ()
 
     def _merged(self, other):
-        if (not self.conditional and not self.function and not self.tryexcept) \
-            or (not other.conditional and not other.function and not other.tryexcept):
-                return DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=self.fromlist and other.fromlist)
+        if (not self.conditional and not self.function and not self.tryexcept) or (
+            not other.conditional and not other.function and not other.tryexcept
+        ):
+            return DependencyInfo(
+                conditional=False,
+                function=False,
+                tryexcept=False,
+                fromlist=self.fromlist and other.fromlist,
+            )
 
         else:
             return DependencyInfo(
-                    conditional=self.conditional or other.conditional,
-                    function=self.function or other.function,
-                    tryexcept=self.tryexcept or other.tryexcept,
-                    fromlist=self.fromlist and other.fromlist)
+                conditional=self.conditional or other.conditional,
+                function=self.function or other.function,
+                tryexcept=self.tryexcept or other.tryexcept,
+                fromlist=self.fromlist and other.fromlist,
+            )
 
 
 class Node(object):
@@ -377,15 +468,15 @@
 
     def __cmp__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return NotImplemented
 
-        return cmp(self.graphident, otherIdent)
+        return cmp(self.graphident, otherIdent)  # noqa: F821
 
     def __eq__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return False
 
@@ -393,7 +484,7 @@
 
     def __ne__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return True
 
@@ -401,7 +492,7 @@
 
     def __lt__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return NotImplemented
 
@@ -409,7 +500,7 @@
 
     def __le__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return NotImplemented
 
@@ -417,7 +508,7 @@
 
     def __gt__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return NotImplemented
 
@@ -425,13 +516,12 @@
 
     def __ge__(self, other):
         try:
-            otherIdent = getattr(other, 'graphident')
+            otherIdent = other.graphident
         except AttributeError:
             return NotImplemented
 
         return self.graphident >= otherIdent
 
-
     def __hash__(self):
         return hash(self.graphident)
 
@@ -439,29 +529,56 @@
         return (self.identifier,)
 
     def __repr__(self):
-        return '%s%r' % (type(self).__name__, self.infoTuple())
+        return "%s%r" % (type(self).__name__, self.infoTuple())
+
 
 class Alias(str):
     pass
 
+
 class AliasNode(Node):
     def __init__(self, name, node):
         super(AliasNode, self).__init__(name)
-        for k in 'identifier', 'packagepath', '_namespace', 'globalnames', 'starimports':
+        for k in (
+            "identifier",
+            "packagepath",
+            "_namespace",
+            "globalnames",
+            "starimports",
+        ):
             setattr(self, k, getattr(node, k, None))
 
     def infoTuple(self):
         return (self.graphident, self.identifier)
 
+
 class BadModule(Node):
     pass
 
+
 class ExcludedModule(BadModule):
     pass
 
+
 class MissingModule(BadModule):
     pass
 
+
+class InvalidRelativeImport(BadModule):
+    def __init__(self, relative_path, from_name):
+        identifier = relative_path
+        if relative_path.endswith("."):
+            identifier += from_name
+        else:
+            identifier += "." + from_name
+        super(InvalidRelativeImport, self).__init__(identifier)
+        self.relative_path = relative_path
+        self.from_name = from_name
+
+    def infoTuple(self):
+        return (self.relative_path, self.from_name)
+
+
 class Script(Node):
     def __init__(self, filename):
         super(Script, self).__init__(filename)
@@ -470,6 +587,7 @@
     def infoTuple(self):
         return (self.filename,)
 
+
 class BaseModule(Node):
     def __init__(self, name, filename=None, path=None):
         super(BaseModule, self).__init__(name)
@@ -477,45 +595,75 @@
         self.packagepath = path
 
     def infoTuple(self):
-        return tuple([f for f in
-                      (self.identifier, self.filename, self.packagepath) if f])
+        return tuple(filter(None, (self.identifier, self.filename, self.packagepath)))
+
 
 class BuiltinModule(BaseModule):
     pass
 
+
+class RuntimeModule(MissingModule):
+    """
+    Graph node representing a Python module dynamically defined at runtime.
+
+    Most modules are statically defined at creation time in external Python
+    files. Some modules, however, are dynamically defined at runtime (e.g.,
+    `six.moves`, dynamically defined by the statically defined `six` module).
+
+    This node represents such a module. To ensure that the parent module of
+    this module is also imported and added to the graph, this node is typically
+    added to the graph by calling the `ModuleGraph.add_module()` method.
+    """
+
+    pass
+
+
 class SourceModule(BaseModule):
     pass
 
+
 class InvalidSourceModule(SourceModule):
     pass
 
+
 class CompiledModule(BaseModule):
     pass
 
+
 class InvalidCompiledModule(BaseModule):
     pass
 
+
 class Package(BaseModule):
     pass
 
+
 class NamespacePackage(Package):
     pass
 
+
 class Extension(BaseModule):
     pass
 
-class FlatPackage(BaseModule): # nocoverage
+
+class FlatPackage(BaseModule):
     def __init__(self, *args, **kwds):
-        warnings.warn("This class will be removed in a future version of modulegraph",
-            DeprecationWarning)
+        warnings.warn(
+            "This class will be removed in a future version of modulegraph",
+            DeprecationWarning,
+        )
         super(FlatPackage, *args, **kwds)
 
-class ArchiveModule(BaseModule): # nocoverage
+
+class ArchiveModule(BaseModule):
     def __init__(self, *args, **kwds):
-        warnings.warn("This class will be removed in a future version of modulegraph",
-            DeprecationWarning)
+        warnings.warn(
+            "This class will be removed in a future version of modulegraph",
+            DeprecationWarning,
+        )
         super(FlatPackage, *args, **kwds)
 
+
 # HTML templates for ModuleGraph generator
 header = """\
 <html>
@@ -545,6 +693,7 @@
   </body>
 </html>"""
 
+
 def _ast_names(names):
     result = []
     for nm in names:
@@ -556,19 +705,21 @@
 
 
 if sys.version_info[0] == 2:
-    DEFAULT_IMPORT_LEVEL= -1
+    DEFAULT_IMPORT_LEVEL = -1
 else:
-    DEFAULT_IMPORT_LEVEL= 0
+    DEFAULT_IMPORT_LEVEL = 0
 
-class _Visitor (ast.NodeVisitor):
-    def __init__(self, graph, module):
-        self._graph = graph
+
+class _Visitor(ast.NodeVisitor):
+    def __init__(self, module):
         self._module = module
         self._level = DEFAULT_IMPORT_LEVEL
         self._in_if = [False]
         self._in_def = [False]
         self._in_tryexcept = [False]
 
+        self.imports = []
+
     @property
     def in_if(self):
         return self._in_if[-1]
@@ -584,29 +735,31 @@
     def _process_import(self, name, fromlist, level):
 
         if sys.version_info[0] == 2:
-            if name == '__future__' and 'absolute_import' in (fromlist or ()):
+            if name == "__future__" and "absolute_import" in (fromlist or ()):
                 self._level = 0
 
         have_star = False
         if fromlist is not None:
             fromlist = set(fromlist)
-            if '*' in fromlist:
-                fromlist.remove('*')
+            if "*" in fromlist:
+                fromlist.remove("*")
                 have_star = True
 
-        imported_module = self._graph._safe_import_hook(name,
-            self._module, fromlist, level, attr=DependencyInfo(
-                conditional=self.in_if,
-                tryexcept=self.in_tryexcept,
-                function=self.in_def,
-                fromlist=False,
-            ))[0]
-        if have_star:
-            self._module.globalnames.update(imported_module.globalnames)
-            self._module.starimports.update(imported_module.starimports)
-            if imported_module.code is None:
-                self._module.starimports.add(name)
-
+        self.imports.append(
+            (
+                name,
+                have_star,
+                (name, self._module, fromlist, level),
+                {
+                    "attr": DependencyInfo(
+                        conditional=self.in_if,
+                        tryexcept=self.in_tryexcept,
+                        function=self.in_def,
+                        fromlist=False,
+                    )
+                },
+            )
+        )
 
     def visit_Import(self, node):
         for nm in _ast_names(node.names):
@@ -614,7 +767,7 @@
 
     def visit_ImportFrom(self, node):
         level = node.level if node.level != 0 else self._level
-        self._process_import(node.module or '', _ast_names(node.names), level)
+        self._process_import(node.module or "", _ast_names(node.names), level)
 
     def visit_If(self, node):
         self._in_if.append(True)
@@ -626,12 +779,9 @@
         self.generic_visit(node)
         self._in_def.pop()
 
-    def visit_Try(self, node):
-        self._in_tryexcept.append(True)
-        self.generic_visit(node)
-        self._in_tryexcept.pop()
+    visit_AsyncFunctionDef = visit_FunctionDef
 
-    def visit_ExceptHandler(self, node):
+    def visit_Try(self, node):
         self._in_tryexcept.append(True)
         self.generic_visit(node)
         self._in_tryexcept.pop()
@@ -669,11 +819,18 @@
     visit_YieldFrom = visit_Expression
     visit_Await = visit_Expression
     visit_Call = visit_Expression
-
+    visit_Await = visit_Expression
 
 
 class ModuleGraph(ObjectGraph):
-    def __init__(self, path=None, excludes=(), replace_paths=(), implies=(), graph=None, debug=0):
+    """
+    Directed graph whose nodes represent modules and edges represent
+    dependencies between these modules.
+    """
+
+    def __init__(
+        self, path=None, excludes=(), replace_paths=(), implies=(), graph=None, debug=0
+    ):
         super(ModuleGraph, self).__init__(graph=graph, debug=debug)
         if path is None:
             path = sys.path
@@ -711,6 +868,7 @@
 
         if sys.version_info[:2] >= (3, 3):
             import importlib.machinery
+
             ImpImporter = importlib.machinery.FileFinder
 
         for entry in self.path:
@@ -723,23 +881,26 @@
                     continue
 
                 for fn in ldir:
-                    if fn.endswith('-nspkg.pth'):
-                        fp = open(os.path.join(entry, fn), 'rU')
+                    if fn.endswith("-nspkg.pth"):
+                        fp = open(os.path.join(entry, fn))
                         try:
                             for ln in fp:
                                 for pfx in _SETUPTOOLS_NAMESPACEPKG_PTHs:
                                     if ln.startswith(pfx):
                                         try:
-                                            start = len(pfx)-2
-                                            stop = ln.index(')', start)+1
+                                            start = len(pfx) - 2
+                                            stop = ln.index(")", start) + 1
                                         except ValueError:
                                             continue
 
                                         pkg = _eval_str_tuple(ln[start:stop])
                                         identifier = ".".join(pkg)
                                         subdir = os.path.join(entry, *pkg)
-                                        if os.path.exists(os.path.join(subdir, '__init__.py')):
-                                            # There is a real __init__.py, ignore the setuptools hack
+                                        if os.path.exists(
+                                            os.path.join(subdir, "__init__.py")
+                                        ):
+                                            # There is a real __init__.py,
+                                            # ignore the setuptools hack
                                             continue
 
                                         if identifier in pkgmap:
@@ -754,10 +915,29 @@
 
     def implyNodeReference(self, node, other, edge_data=None):
         """
-        Imply that one node depends on another.
-        other may be a module name or another node.
+        Create a reference from the passed source node to the passed other node,
+        implying the former to depend upon the latter.
 
-        For use by extension modules and tricky import code
+        While the source node *must* be an existing graph node, the target node
+        may be either an existing graph node *or* a fully-qualified module name.
+        In the latter case, the module with that name and all parent packages of
+        that module will be imported *without* raising exceptions and for each
+        newly imported module or package:
+
+        * A new graph node will be created for that module or package.
+        * A reference from the passed source node to that module or package will
+          be created.
+
+        This method allows dependencies between Python objects *not* importable
+        with standard techniques (e.g., module aliases, C extensions).
+
+        Parameters
+        ----------
+        node : str
+            Graph node for this reference's source module or package.
+        other : {Node, str}
+            Either a graph node *or* fully-qualified name for this reference's
+            target module or package.
         """
         if isinstance(other, Node):
             self._updateReference(node, other, edge_data)
@@ -770,7 +950,6 @@
             for other in others:
                 self._updateReference(node, other, edge_data)
 
-
     def getReferences(self, fromnode):
         """
         Yield all nodes that 'fromnode' dependes on (that is,
@@ -798,13 +977,12 @@
                 yield n
 
     def hasEdge(self, fromnode, tonode):
-        """ Return True iff there is an edge from 'fromnode' to 'tonode' """
+        """Return True iff there is an edge from 'fromnode' to 'tonode'"""
         fromnode = self.findNode(fromnode)
         tonode = self.findNode(tonode)
 
         return self.graph.edge_by_node(fromnode, tonode) is not None
 
-
     def foldReferences(self, packagenode):
         """
         Create edges to/from 'packagenode' based on the
@@ -814,51 +992,48 @@
         pkg = self.findNode(packagenode)
 
         for n in self.nodes():
-            if not n.identifier.startswith(pkg.identifier + '.'):
+            if not n.identifier.startswith(pkg.identifier + "."):
                 continue
 
-            iter_out, iter_inc = n.get_edges()
+            iter_out, iter_inc = self.get_edges(n)
             for other in iter_out:
-                if other.identifier.startswith(pkg.identifier + '.'):
+                if other.identifier.startswith(pkg.identifier + "."):
                     continue
 
                 if not self.hasEdge(pkg, other):
                     # Ignore circular dependencies
-                    self._updateReference(pkg, other, 'pkg-internal-import')
+                    self._updateReference(pkg, other, "pkg-internal-import")
 
-            for other in iter_in:
-                if other.identifier.startswith(pkg.identifier + '.'):
+            for other in iter_inc:
+                if other.identifier.startswith(pkg.identifier + "."):
                     # Ignore circular dependencies
                     continue
 
                 if not self.hasEdge(other, pkg):
-                    self._updateReference(other, pkg, 'pkg-import')
+                    self._updateReference(other, pkg, "pkg-import")
 
             self.graph.hide_node(n)
 
-    # TODO: unfoldReferences(pkg) that restore the submodule nodes and
-    #       removes 'pkg-import' and 'pkg-internal-import' edges. Care should
-    #       be taken to ensure that references are correct if multiple packages
-    #       are folded and then one of them in unfolded
-
-
     def _updateReference(self, fromnode, tonode, edge_data):
         try:
             ed = self.edgeData(fromnode, tonode)
-        except (KeyError, GraphError): # XXX: Why 'GraphError'
+        except (KeyError, GraphError):
             return self.createReference(fromnode, tonode, edge_data)
 
-        if not (isinstance(ed, DependencyInfo) and isinstance(edge_data, DependencyInfo)):
+        if not (
+            isinstance(ed, DependencyInfo) and isinstance(edge_data, DependencyInfo)
+        ):
             self.updateEdgeData(fromnode, tonode, edge_data)
         else:
             self.updateEdgeData(fromnode, tonode, ed._merged(edge_data))
 
-
-    def createReference(self, fromnode, tonode, edge_data='direct'):
+    def createReference(self, fromnode, tonode, edge_data="direct"):
         """
         Create a reference from fromnode to tonode
         """
-        return super(ModuleGraph, self).createReference(fromnode, tonode, edge_data=edge_data)
+        return super(ModuleGraph, self).createReference(
+            fromnode, tonode, edge_data=edge_data
+        )
 
     def findNode(self, name):
         """
@@ -896,10 +1071,10 @@
             pathnames = self.nspackages.pop(name)
             m = self.createNode(NamespacePackage, name)
 
-            # FIXME: The filename must be set to a string to ensure that py2app
+            # The filename must be set to a string to ensure that py2app
             # works, it is not clear yet why that is. Setting to None would be
             # cleaner.
-            m.filename = '-'
+            m.filename = "-"
             m.packagepath = _namespace_package_path(name, pathnames, self.path)
 
             # As per comment at top of file, simulate runtime packagepath additions.
@@ -920,26 +1095,32 @@
             return m
 
         if sys.version_info[0] != 2:
-            with open(pathname, 'rb') as fp:
+            with open(pathname, "rb") as fp:
                 encoding = util.guess_encoding(fp)
 
             with open(pathname, _READ_MODE, encoding=encoding) as fp:
-                contents = fp.read() + '\n'
+                contents = fp.read() + "\n"
+
+            if contents.startswith(BOM):
+                # Ignore BOM at start of input
+                contents = contents[1:]
 
         else:
             with open(pathname, _READ_MODE) as fp:
-                contents = fp.read() + '\n'
+                contents = fp.read() + "\n"
 
-        co = compile(contents, pathname, 'exec', ast.PyCF_ONLY_AST, True)
+        co = compile(contents, pathname, "exec", ast.PyCF_ONLY_AST, True)
         m = self.createNode(Script, pathname)
         self._updateReference(caller, m, None)
         self._scan_code(co, m)
-        m.code = compile(co, pathname, 'exec', 0, True)
+        m.code = compile(co, pathname, "exec", 0, True)
         if self.replace_paths:
             m.code = self._replace_paths_in_code(m.code)
         return m
 
-    def import_hook(self, name, caller=None, fromlist=None, level=DEFAULT_IMPORT_LEVEL, attr=None):
+    def import_hook(
+        self, name, caller=None, fromlist=None, level=DEFAULT_IMPORT_LEVEL, attr=None
+    ):
         """
         Import a module
 
@@ -970,16 +1151,13 @@
             if isinstance(caller, Package):
                 parent = caller
 
-            elif '.' in pname:
-                pname = pname[:pname.rfind('.')]
+            elif "." in pname:
+                pname = pname[: pname.rfind(".")]
                 parent = self.findNode(pname)
 
             elif caller.packagepath:
-                # XXX: I have no idea why this line
-                # is necessary.
                 parent = self.findNode(pname)
 
-
         self.msgout(4, "determine_parent ->", parent)
         return parent
 
@@ -989,14 +1167,14 @@
         package for the name
         """
         self.msgin(4, "find_head_package", parent, name, level)
-        if '.' in name:
-            head, tail = name.split('.', 1)
+        if "." in name:
+            head, tail = name.split(".", 1)
         else:
-            head, tail = name, ''
+            head, tail = name, ""
 
         if level == -1:
             if parent:
-                qname = parent.identifier + '.' + head
+                qname = parent.identifier + "." + head
             else:
                 qname = head
 
@@ -1009,28 +1187,36 @@
         else:
             if parent is None:
                 self.msg(2, "Relative import outside of package")
-                raise ImportError("Relative import outside of package (name=%r, parent=%r, level=%r)"%(name, parent, level))
+                raise InvalidRelativeImportError(
+                    "Relative import outside of package (name=%r, parent=%r, level=%r)"
+                    % (name, parent, level)
+                )
 
-            for i in range(level-1):
-                if '.' not in parent.identifier:
+            for _i in range(level - 1):
+                if "." not in parent.identifier:
                     self.msg(2, "Relative import outside of package")
-                    raise ImportError("Relative import outside of package (name=%r, parent=%r, level=%r)"%(name, parent, level))
+                    raise InvalidRelativeImportError(
+                        "Relative import outside of package (name=%r, parent=%r, level=%r)"
+                        % (name, parent, level)
+                    )
 
-                p_fqdn = parent.identifier.rsplit('.', 1)[0]
+                p_fqdn = parent.identifier.rsplit(".", 1)[0]
                 new_parent = self.findNode(p_fqdn)
                 if new_parent is None:
                     self.msg(2, "Relative import outside of package")
-                    raise ImportError("Relative import outside of package (name=%r, parent=%r, level=%r)"%(name, parent, level))
+                    raise InvalidRelativeImportError(
+                        "Relative import outside of package (name=%r, parent=%r, level=%r)"
+                        % (name, parent, level)
+                    )
 
                 assert new_parent is not parent, (new_parent, parent)
                 parent = new_parent
 
             if head:
-                qname = parent.identifier + '.' + head
+                qname = parent.identifier + "." + head
             else:
                 qname = parent.identifier
 
-
         q = self._import_module(head, qname, parent)
         if q:
             self.msgout(4, "find_head_package ->", (q, tail))
@@ -1049,34 +1235,31 @@
         self.msgin(4, "load_tail", mod, tail)
         result = mod
         while tail:
-            i = tail.find('.')
-            if i < 0: i = len(tail)
-            head, tail = tail[:i], tail[i+1:]
+            i = tail.find(".")
+            if i < 0:
+                i = len(tail)
+            head, tail = tail[:i], tail[i + 1 :]  # noqa: E203
             mname = "%s.%s" % (result.identifier, head)
             result = self._import_module(head, mname, result)
             if result is None:
                 result = self.createNode(MissingModule, mname)
-                #self.msgout(4, "raise ImportError: No module named", mname)
-                #raise ImportError("No module named " + mname)
         self.msgout(4, "load_tail ->", result)
         return result
 
     def _ensure_fromlist(self, m, fromlist):
         fromlist = set(fromlist)
         self.msg(4, "ensure_fromlist", m, fromlist)
-        if '*' in fromlist:
+        if "*" in fromlist:
             fromlist.update(self._find_all_submodules(m))
-            fromlist.remove('*')
+            fromlist.remove("*")
         for sub in fromlist:
             submod = m.get(sub)
             if submod is None:
                 if sub in m.globalnames:
                     # Name is a global in the module
                     continue
-                # XXX: ^^^ need something simular for names imported
-                #      by 'm'.
 
-                fullname = m.identifier + '.' + sub
+                fullname = m.identifier + "." + sub
                 submod = self._import_module(sub, fullname, m)
                 if submod is None:
                     raise ImportError("No module named " + fullname)
@@ -1088,7 +1271,6 @@
         # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"].
         # But we must also collect Python extension modules - although
         # we cannot separate normal dlls from Python extensions.
-        suffixes = [triple[0] for triple in imp.get_suffixes()]
         for path in m.packagepath:
             try:
                 names = zipio.listdir(path)
@@ -1096,20 +1278,128 @@
                 self.msg(2, "can't list directory", path)
                 continue
             for info in (moduleInfoForPath(p) for p in names):
-                if info is None: continue
-                if info[0] != '__init__':
+                if info is None:
+                    continue
+                if info[0] != "__init__":
                     yield info[0]
 
+    def alias_module(self, src_module_name, trg_module_name):
+        """
+        Alias the source module to the target module with the passed names.
+
+        This method ensures that the next call to findNode() given the target
+        module name will resolve this alias. This includes importing and adding
+        a graph node for the source module if needed as well as adding a
+        reference from the target to source module.
+
+        Parameters
+        ----------
+        src_module_name : str
+            Fully-qualified name of the existing **source module** (i.e., the
+            module being aliased).
+        trg_module_name : str
+            Fully-qualified name of the non-existent **target module** (i.e.,
+            the alias to be created).
+        """
+        self.msg(3, 'alias_module "%s" -> "%s"' % (src_module_name, trg_module_name))
+        # print('alias_module "%s" -> "%s"' % (src_module_name, trg_module_name))
+        assert isinstance(src_module_name, str), '"%s" not a module name.' % str(
+            src_module_name
+        )
+        assert isinstance(trg_module_name, str), '"%s" not a module name.' % str(
+            trg_module_name
+        )
+
+        # If the target module has already been added to the graph as either a
+        # non-alias or as a different alias, raise an exception.
+        trg_module = self.findNode(trg_module_name)
+        if trg_module is not None and not (
+            isinstance(trg_module, AliasNode)
+            and trg_module.identifier == src_module_name
+        ):
+            raise ValueError(
+                'Target module "%s" already imported as "%s".'
+                % (trg_module_name, trg_module)
+            )
+
+        # See findNode() for details.
+        self.lazynodes[trg_module_name] = Alias(src_module_name)
+
+    def add_module(self, module):
+        """
+        Add the passed module node to the graph if not already added.
+
+        If that module has a parent module or package with a previously added
+        node, this method also adds a reference from this module node to its
+        parent node and adds this module node to its parent node's namespace.
+
+        This high-level method wraps the low-level `addNode()` method, but is
+        typically *only* called by graph hooks adding runtime module nodes. For
+        all other node types, the `import_module()` method should be called.
+
+        Parameters
+        ----------
+        module : BaseModule
+            Graph node for the module to be added.
+        """
+        self.msg(3, "import_module_runtime", module)
+
+        # If no node exists for this module, add such a node.
+        module_added = self.findNode(module.identifier)
+        if module_added is None:
+            self.addNode(module)
+        else:
+            assert module == module_added, "New module %r != previous %r" % (
+                module,
+                module_added,
+            )
+
+        # If this module has a previously added parent, reference this module to
+        # its parent and add this module to its parent's namespace.
+        parent_name, _, module_basename = module.identifier.rpartition(".")
+        if parent_name:
+            parent = self.findNode(parent_name)
+            if parent is None:
+                self.msg(4, "import_module_runtime parent not found:", parent_name)
+            else:
+                self.createReference(module, parent)
+                parent[module_basename] = module
+
     def _import_module(self, partname, fqname, parent):
-        # XXX: Review me for use with absolute imports.
+        """
+        Import the Python module with the passed name from the parent package
+        signified by the passed graph node.
+
+        Parameters
+        ----------
+        partname : str
+            Unqualified name of the module to be imported (e.g., `text`).
+        fqname : str
+            Fully-qualified name of this module (e.g., `email.mime.text`).
+        parent : Package
+            Graph node for the package providing this module *or* `None` if
+            this module is a top-level module.
+
+        Returns
+        ----------
+        Node
+            Graph node created for this module.
+        """
         self.msgin(3, "import_module", partname, fqname, parent)
         m = self.findNode(fqname)
         if m is not None:
             self.msgout(3, "import_module ->", m)
             if parent:
-                self._updateReference(m, parent, edge_data=DependencyInfo(
-                    conditional=False, fromlist=False, function=False, tryexcept=False
-                ))
+                self._updateReference(
+                    m,
+                    parent,
+                    edge_data=DependencyInfo(
+                        conditional=False,
+                        fromlist=False,
+                        function=False,
+                        tryexcept=False,
+                    ),
+                )
             return m
 
         if parent and parent.packagepath is None:
@@ -1121,8 +1411,7 @@
             if parent is not None and parent.packagepath:
                 searchpath = parent.packagepath
 
-            fp, pathname, stuff = self._find_module(partname,
-                searchpath, parent)
+            fp, pathname, stuff = self._find_module(partname, searchpath, parent)
 
         except ImportError:
             self.msgout(3, "import_module ->", None)
@@ -1136,10 +1425,14 @@
                 fp.close()
 
         if parent:
-            self.msgout(4, "create reference", m, "->", parent)
-            self._updateReference(m, parent, edge_data=DependencyInfo(
-                conditional=False, fromlist=False, function=False, tryexcept=False
-            ))
+            self.msg(4, "create reference", m, "->", parent)
+            self._updateReference(
+                m,
+                parent,
+                edge_data=DependencyInfo(
+                    conditional=False, fromlist=False, function=False, tryexcept=False
+                ),
+            )
             parent[partname] = m
 
         self.msgout(3, "import_module ->", m)
@@ -1162,13 +1455,16 @@
         if typ == imp.PY_SOURCE:
             contents = fp.read()
             if isinstance(contents, bytes):
-                contents += b'\n'
+                contents += b"\n"
             else:
-                contents += '\n'
+                contents += "\n"
 
             try:
-                co = compile(contents, pathname, 'exec', ast.PyCF_ONLY_AST, True)
-                #co = compile(contents, pathname, 'exec', 0, True)
+                co = compile(contents, pathname, "exec", ast.PyCF_ONLY_AST, True)
+                if sys.version_info[:2] == (3, 5):
+                    # In Python 3.5 some syntax problems with async
+                    # functions are only reported when compiling to bytecode
+                    compile(co, "-", "exec", 0, True)
             except SyntaxError:
                 co = None
                 cls = InvalidSourceModule
@@ -1177,17 +1473,28 @@
                 cls = SourceModule
 
         elif typ == imp.PY_COMPILED:
-            if fp.read(4) != imp.get_magic():
-                self.msgout(2, "raise ImportError: Bad magic number", pathname)
+            data = fp.read(4)
+            magic = imp.get_magic()
+
+            if data != magic:
+                self.msg(2, "raise ImportError: Bad magic number", pathname)
                 co = None
                 cls = InvalidCompiledModule
 
             else:
-                fp.read(4)
+                if sys.version_info[:2] >= (3, 7):
+                    fp.read(12)
+                elif sys.version_info[:2] >= (3, 4):
+                    fp.read(8)
+                else:
+                    fp.read(4)
+
                 try:
                     co = marshal.loads(fp.read())
                     cls = CompiledModule
-                except Exception:
+                except Exception as exc:
+                    raise
+                    self.msgout(2, "raise ImportError: Cannot load code", pathname, exc)
                     co = None
                     cls = InvalidCompiledModule
 
@@ -1205,32 +1512,146 @@
             self._scan_code(co, m)
 
             if isinstance(co, ast.AST):
-                co = compile(co, pathname, 'exec', 0, True)
+                try:
+                    co = compile(co, pathname, "exec", 0, True)
+                except RecursionError:
+                    self.msg(
+                        0, "Skip compiling %r due to recursion error" % (pathname,)
+                    )
+                    m.code = None
+                    self.msgout(2, "load_module ->", m)
+                    return m
+
             if self.replace_paths:
                 co = self._replace_paths_in_code(co)
             m.code = co
 
-
         self.msgout(2, "load_module ->", m)
         return m
 
-    def _safe_import_hook(self, name, caller, fromlist, level=DEFAULT_IMPORT_LEVEL, attr=None):
+    def _safe_import_hook(
+        self, name, caller, fromlist, level=DEFAULT_IMPORT_LEVEL, attr=None
+    ):
         # wrapper for self.import_hook() that won't raise ImportError
+
+        # List of graph nodes created for the modules imported by this call.
+        mods = None
+
+        # True if this is a Python 2-style implicit relative import of a
+        # SWIG-generated C extension.
+        is_swig_import = False
+
+        # Attempt to import the module with Python's standard module importers.
         try:
             mods = self.import_hook(name, caller, level=level, attr=attr)
-        except ImportError as msg:
-            self.msg(2, "ImportError:", str(msg))
-            m = self.createNode(MissingModule, _path_from_importerror(msg, name))
-            self._updateReference(caller, m, edge_data=attr)
+        # Failing that, defer to custom module importers handling non-standard
+        # import schemes (e.g., SWIG, six).
 
-        else:
+        except InvalidRelativeImportError:
+            self.msgout(2, "Invalid relative import", level, name, fromlist)
+            result = []
+            for sub in fromlist or "*":
+                m = self.createNode(InvalidRelativeImport, "." * level + name, sub)
+                self._updateReference(caller, m, edge_data=attr)
+                result.append(m)
+
+            return result
+
+        except ImportError as msg:
+            # If this is an absolute top-level import under Python 3 and if the
+            # name to be imported is the caller's name prefixed by "_", this
+            # could be a SWIG-generated Python 2-style implicit relative import.
+            # SWIG-generated files contain functions named swig_import_helper()
+            # importing dynamic libraries residing in the same directory. For
+            # example, a SWIG-generated caller module "csr.py" might resemble:
+            #
+            #     # This file was automatically generated by SWIG (http://www.swig.org).
+            #     ...
+            #     def swig_import_helper():
+            #         ...
+            #         try:
+            #             fp, pathname, description = imp.find_module('_csr',
+            #                   [dirname(__file__)])
+            #         except ImportError:
+            #             import _csr
+            #             return _csr
+            #
+            # While there exists no reasonable means for modulegraph to parse
+            # the call to imp.find_module(), the subsequent implicit relative
+            # import is trivially parsable. This import is prohibited under
+            # Python 3, however, and thus parsed only if the caller's file is
+            # parsable plaintext (as indicated by a filetype of ".py") and the
+            # first line of this file is the above SWIG header comment.
+            #
+            # The constraint that this library's name be the caller's name
+            # prefixed by '_' is explicitly mandated by SWIG and thus a
+            # reliable indicator of "SWIG-ness". The SWIG documentation states:
+            # "When linking the module, the name of the output file has to match
+            #  the name of the module prefixed by an underscore."
+            #
+            # A MissingModule is not a SWIG import candidate.
+            if (
+                caller is not None
+                and type(caller) is not MissingModule
+                and fromlist is None
+                and level == 0
+                and caller.filename.endswith(".py")
+                and name == "_" + caller.identifier.rpartition(".")[2]
+                and sys.version_info[0] == 3
+            ):
+                self.msg(
+                    4,
+                    "SWIG import candidate (name=%r, caller=%r, level=%r)"
+                    % (name, caller, level),
+                )
+
+                with open(caller.filename, "rb") as caller_file:
+                    encoding = util.guess_encoding(caller_file)
+                with open(
+                    caller.filename, _READ_MODE, encoding=encoding
+                ) as caller_file:
+                    first_line = caller_file.readline()
+                    self.msg(5, "SWIG import candidate shebang: %r" % (first_line))
+                    if "automatically generated by SWIG" in first_line:
+                        is_swig_import = True
+
+                        # Convert this Python 2-style implicit relative import
+                        # into a Python 3-style explicit relative import for
+                        # the duration of this function call by overwriting
+                        # the original parameters passed to this call.
+                        fromlist = [name]
+                        name = ""
+                        level = 1
+                        self.msg(
+                            2,
+                            "SWIG import (caller=%r, fromlist=%r, level=%r)"
+                            % (caller, fromlist, level),
+                        )
+
+                        # Import the caller module importing this library.
+                        try:
+                            mods = self.import_hook(
+                                name, caller, level=level, attr=attr
+                            )
+                        except ImportError as msg:
+                            self.msg(2, "SWIG ImportError:", str(msg))
+
+            # If this module remains unimportable, add a MissingModule node.
+            if mods is None:
+                self.msg(2, "ImportError:", str(msg))
+
+                m = self.createNode(MissingModule, _path_from_importerror(msg, name))
+                self._updateReference(caller, m, edge_data=attr)
+
+        # If this module was successfully imported, get its graph node.
+        if mods is not None:
             assert len(mods) == 1
             m = list(mods)[0]
 
         subs = [m]
         if isinstance(attr, DependencyInfo):
             attr = attr._replace(fromlist=True)
-        for sub in (fromlist or ()):
+        for sub in fromlist or ():
             # If this name is in the module namespace already,
             # then add the entry to the list of substitutions
             if sub in m:
@@ -1245,25 +1666,44 @@
                 # Global variable in the module, ignore
                 continue
 
-
             # See if we can load it
             #    fullname = name + '.' + sub
-            fullname = m.identifier + '.' + sub
-            #else:
-            #    print("XXX", repr(name), repr(sub), repr(caller), repr(m))
+            fullname = m.identifier + "." + sub
             sm = self.findNode(fullname)
             if sm is None:
                 try:
-                    sm = self.import_hook(name, caller, fromlist=[sub], level=level, attr=attr)
+                    sm = self.import_hook(
+                        name, caller, fromlist=[sub], level=level, attr=attr
+                    )
                 except ImportError as msg:
                     self.msg(2, "ImportError:", str(msg))
-                    #sm = self.createNode(MissingModule, _path_from_importerror(msg, fullname))
                     sm = self.createNode(MissingModule, fullname)
                 else:
                     sm = self.findNode(fullname)
                     if sm is None:
                         sm = self.createNode(MissingModule, fullname)
 
+                    # If this is a SWIG C extension, instruct downstream
+                    # freezers (py2app, PyInstaller) to freeze this extension
+                    # under its unqualified rather than qualified name (e.g.,
+                    # as "_csr" rather than "scipy.sparse.sparsetools._csr"),
+                    # permitting the implicit relative import in its parent
+                    # SWIG module to successfully find this extension.
+                    if is_swig_import:
+                        # If a graph node with that name already exists, avoid
+                        # collisions by emitting an error instead.
+                        if self.findNode(sub):
+                            self.msg(
+                                2,
+                                "SWIG import error: %r basename %r "
+                                "already exists" % (fullname, sub),
+                            )
+                        else:
+                            self.msg(
+                                4, "SWIG import renamed from %r to %r" % (fullname, sub)
+                            )
+                            sm.identifier = sub
+
             m[sub] = sm
             if sm is not None:
                 self._updateReference(m, sm, edge_data=attr)
@@ -1274,118 +1714,205 @@
 
     def _scan_code(self, co, m):
         if isinstance(co, ast.AST):
-            #return self._scan_bytecode(compile(co, '-', 'exec', 0, True), m)
             self._scan_ast(co, m)
-            self._scan_bytecode_stores(
-                    compile(co, '-', 'exec', 0, True), m)
+            try:
+                self._scan_bytecode_stores(compile(co, "-", "exec", 0, True), m)
+            except RecursionError:
+                self.msg(
+                    0, "RecursionError while compiling code, skip scanning bytecode"
+                )
 
         else:
             self._scan_bytecode(co, m)
 
     def _scan_ast(self, co, m):
-        visitor = _Visitor(self, m)
+        visitor = _Visitor(m)
         visitor.visit(co)
 
-    def _scan_bytecode_stores(self, co, m,
-            STORE_NAME=_Bchr(dis.opname.index('STORE_NAME')),
-            STORE_GLOBAL=_Bchr(dis.opname.index('STORE_GLOBAL')),
-            HAVE_ARGUMENT=_Bchr(dis.HAVE_ARGUMENT),
-            unpack=struct.unpack):
+        for name, have_star, args, kwds in visitor.imports:
+            imported_module = self._safe_import_hook(*args, **kwds)[0]
+            if have_star:
+                m.globalnames.update(imported_module.globalnames)
+                m.starimports.update(imported_module.starimports)
+                if imported_module.code is None:
+                    m.starimports.add(name)
 
-        extended_import = bool(sys.version_info[:2] >= (2, 5))
+    if sys.version_info[:2] >= (3, 4):
+        # On Python 3.4 or later the dis module has a much nicer interface
+        # for working with bytecode, use that instead of peeking into the
+        # raw bytecode.
+        # Note: This nicely sidesteps any issues caused by moving from bytecode
+        # to wordcode in python 3.6.
 
-        code = co.co_code
-        constants = co.co_consts
-        n = len(code)
-        i = 0
+        def _scan_bytecode_stores(self, co, m):
+            constants = co.co_consts
+            for inst in dis.get_instructions(co):
+                if inst.opname in ("STORE_NAME", "STORE_GLOBAL"):
+                    name = co.co_names[inst.arg]
+                    m.globalnames.add(name)
 
-        while i < n:
-            c = code[i]
-            i += 1
-            if c >= HAVE_ARGUMENT:
-                i = i+2
+            cotype = type(co)
+            for c in constants:
+                if isinstance(c, cotype):
+                    self._scan_bytecode_stores(c, m)
 
-            if c == STORE_NAME or c == STORE_GLOBAL:
-                # keep track of all global names that are assigned to
-                oparg = unpack('<H', code[i - 2:i])[0]
-                name = co.co_names[oparg]
-                m.globalnames.add(name)
+        def _scan_bytecode(self, co, m):
+            constants = co.co_consts
 
-        cotype = type(co)
-        for c in constants:
-            if isinstance(c, cotype):
-                self._scan_bytecode_stores(c, m)
+            level = None
+            fromlist = None
 
-    def _scan_bytecode(self, co, m,
-            HAVE_ARGUMENT=_Bchr(dis.HAVE_ARGUMENT),
-            LOAD_CONST=_Bchr(dis.opname.index('LOAD_CONST')),
-            IMPORT_NAME=_Bchr(dis.opname.index('IMPORT_NAME')),
-            IMPORT_FROM=_Bchr(dis.opname.index('IMPORT_FROM')),
-            STORE_NAME=_Bchr(dis.opname.index('STORE_NAME')),
-            STORE_GLOBAL=_Bchr(dis.opname.index('STORE_GLOBAL')),
-            unpack=struct.unpack):
+            prev_insts = []
 
-        # Python >=2.5: LOAD_CONST flags, LOAD_CONST names, IMPORT_NAME name
-        # Python < 2.5: LOAD_CONST names, IMPORT_NAME name
-        extended_import = bool(sys.version_info[:2] >= (2, 5))
+            for inst in dis.get_instructions(co):
+                if inst.opname == "IMPORT_NAME":
+                    assert prev_insts[-2].opname == "LOAD_CONST"
+                    assert prev_insts[-1].opname == "LOAD_CONST"
 
-        code = co.co_code
-        constants = co.co_consts
-        n = len(code)
-        i = 0
+                    level = co.co_consts[prev_insts[-2].arg]
+                    fromlist = co.co_consts[prev_insts[-1].arg]
 
-        level = None
-        fromlist = None
+                    assert fromlist is None or type(fromlist) is tuple
+                    name = co.co_names[inst.arg]
+                    have_star = False
+                    if fromlist is not None:
+                        fromlist = set(fromlist)
+                        if "*" in fromlist:
+                            fromlist.remove("*")
+                            have_star = True
 
-        while i < n:
-            c = code[i]
-            i += 1
-            if c >= HAVE_ARGUMENT:
-                i = i+2
+                    imported_module = self._safe_import_hook(name, m, fromlist, level)[
+                        0
+                    ]
 
-            if c == IMPORT_NAME:
-                if extended_import:
-                    assert code[i-9] == LOAD_CONST
-                    assert code[i-6] == LOAD_CONST
-                    arg1, arg2 = unpack('<xHxH', code[i-9:i-3])
-                    level = co.co_consts[arg1]
-                    fromlist = co.co_consts[arg2]
-                else:
-                    assert code[-6] == LOAD_CONST
-                    arg1, = unpack('<xH', code[i-6:i-3])
-                    level = -1
-                    fromlist = co.co_consts[arg1]
+                    if have_star:
+                        m.globalnames.update(imported_module.globalnames)
+                        m.starimports.update(imported_module.starimports)
+                        if imported_module.code is None:
+                            m.starimports.add(name)
 
-                assert fromlist is None or isinstance(fromlist, tuple)
-                oparg, = unpack('<H', code[i - 2:i])
-                name = co.co_names[oparg]
-                have_star = False
-                if fromlist is not None:
-                    fromlist = set(fromlist)
-                    if '*' in fromlist:
-                        fromlist.remove('*')
-                        have_star = True
+                elif inst.opname in ("STORE_NAME", "STORE_GLOBAL"):
+                    # keep track of all global names that are assigned to
+                    name = co.co_names[inst.arg]
+                    m.globalnames.add(name)
 
-                #self.msgin(2, "Before import hook", repr(name), repr(m), repr(fromlist), repr(level))
+                prev_insts.append(inst)
+                del prev_insts[:-2]
 
-                imported_module = self._safe_import_hook(name, m, fromlist, level)[0]
+            cotype = type(co)
+            for c in constants:
+                if isinstance(c, cotype):
+                    self._scan_bytecode(c, m)
 
-                if have_star:
-                    m.globalnames.update(imported_module.globalnames)
-                    m.starimports.update(imported_module.starimports)
-                    if imported_module.code is None:
-                        m.starimports.add(name)
+    else:
+        # Before 3.4: Peek into raw bytecode.
 
-            elif c == STORE_NAME or c == STORE_GLOBAL:
-                # keep track of all global names that are assigned to
-                oparg = unpack('<H', code[i - 2:i])[0]
-                name = co.co_names[oparg]
-                m.globalnames.add(name)
+        def _scan_bytecode_stores(
+            self,
+            co,
+            m,
+            STORE_NAME=_Bchr(dis.opname.index("STORE_NAME")),  # noqa: M511,B008
+            STORE_GLOBAL=_Bchr(dis.opname.index("STORE_GLOBAL")),  # noqa: M511,B008
+            HAVE_ARGUMENT=_Bchr(dis.HAVE_ARGUMENT),  # noqa: M511,B008
+            unpack=struct.unpack,
+        ):
 
-        cotype = type(co)
-        for c in constants:
-            if isinstance(c, cotype):
-                self._scan_bytecode(c, m)
+            code = co.co_code
+            constants = co.co_consts
+            n = len(code)
+            i = 0
+
+            while i < n:
+                c = code[i]
+                i += 1
+                if c >= HAVE_ARGUMENT:
+                    i = i + 2
+
+                if c == STORE_NAME or c == STORE_GLOBAL:
+                    # keep track of all global names that are assigned to
+                    oparg = unpack("<H", code[i - 2 : i])[0]  # noqa: E203
+                    name = co.co_names[oparg]
+                    m.globalnames.add(name)
+
+            cotype = type(co)
+            for c in constants:
+                if isinstance(c, cotype):
+                    self._scan_bytecode_stores(c, m)
+
+        def _scan_bytecode(
+            self,
+            co,
+            m,
+            HAVE_ARGUMENT=_Bchr(dis.HAVE_ARGUMENT),  # noqa: M511,B008
+            LOAD_CONST=_Bchr(dis.opname.index("LOAD_CONST")),  # noqa: M511,B008
+            IMPORT_NAME=_Bchr(dis.opname.index("IMPORT_NAME")),  # noqa: M511,B008
+            IMPORT_FROM=_Bchr(dis.opname.index("IMPORT_FROM")),  # noqa: M511,B008
+            STORE_NAME=_Bchr(dis.opname.index("STORE_NAME")),  # noqa: M511,B008
+            STORE_GLOBAL=_Bchr(dis.opname.index("STORE_GLOBAL")),  # noqa: M511,B008
+            unpack=struct.unpack,
+        ):
+
+            # Python >=2.5: LOAD_CONST flags, LOAD_CONST names, IMPORT_NAME name
+            # Python < 2.5: LOAD_CONST names, IMPORT_NAME name
+            extended_import = bool(sys.version_info[:2] >= (2, 5))
+
+            code = co.co_code
+            constants = co.co_consts
+            n = len(code)
+            i = 0
+
+            level = None
+            fromlist = None
+
+            while i < n:
+                c = code[i]
+                i += 1
+                if c >= HAVE_ARGUMENT:
+                    i = i + 2
+
+                if c == IMPORT_NAME:
+                    if extended_import:
+                        assert code[i - 9] == LOAD_CONST
+                        assert code[i - 6] == LOAD_CONST
+                        arg1, arg2 = unpack("<xHxH", code[i - 9 : i - 3])  # noqa: E203
+                        level = co.co_consts[arg1]
+                        fromlist = co.co_consts[arg2]
+                    else:
+                        assert code[-6] == LOAD_CONST
+                        (arg1,) = unpack("<xH", code[i - 6 : i - 3])  # noqa: E203
+                        level = -1
+                        fromlist = co.co_consts[arg1]
+
+                    assert fromlist is None or type(fromlist) is tuple
+                    (oparg,) = unpack("<H", code[i - 2 : i])  # noqa: E203
+                    name = co.co_names[oparg]
+                    have_star = False
+                    if fromlist is not None:
+                        fromlist = set(fromlist)
+                        if "*" in fromlist:
+                            fromlist.remove("*")
+                            have_star = True
+
+                    imported_module = self._safe_import_hook(name, m, fromlist, level)[
+                        0
+                    ]
+
+                    if have_star:
+                        m.globalnames.update(imported_module.globalnames)
+                        m.starimports.update(imported_module.starimports)
+                        if imported_module.code is None:
+                            m.starimports.add(name)
+
+                elif c == STORE_NAME or c == STORE_GLOBAL:
+                    # keep track of all global names that are assigned to
+                    oparg = unpack("<H", code[i - 2 : i])[0]  # noqa: E203
+                    name = co.co_names[oparg]
+                    m.globalnames.add(name)
+
+            cotype = type(co)
+            for c in constants:
+                if isinstance(c, cotype):
+                    self._scan_bytecode(c, m)
 
     def _load_package(self, fqname, pathname, pkgpath):
         """
@@ -1400,7 +1927,7 @@
         if ns_pkgpath or pkgpath:
             # this is a namespace package
             m = self.createNode(NamespacePackage, fqname)
-            m.filename = '-'
+            m.filename = "-"
             m.packagepath = ns_pkgpath
         else:
             m = self.createNode(Package, fqname)
@@ -1410,17 +1937,15 @@
         # As per comment at top of file, simulate runtime packagepath additions.
         m.packagepath = m.packagepath + _packagePathMap.get(fqname, [])
 
-
-
         try:
-            self.msg(2, "find __init__ for %s"%(m.packagepath,))
+            self.msg(2, "find __init__ for %s" % (m.packagepath,))
             fp, buf, stuff = self._find_module("__init__", m.packagepath, parent=m)
         except ImportError:
             pass
 
         else:
             try:
-                self.msg(2, "load __init__ for %s"%(m.packagepath,))
+                self.msg(2, "load __init__ for %s" % (m.packagepath,))
                 self._load_module(fqname, fp, buf, stuff)
             finally:
                 if fp is not None:
@@ -1429,15 +1954,40 @@
         return m
 
     def _find_module(self, name, path, parent=None):
+        """
+        Get a 3-tuple detailing the physical location of the Python module with
+        the passed name if that module is found *or* raise `ImportError`
+        otherwise.
+
+        This high-level method wraps the low-level `modulegraph.find_module()`
+        function with additional support for graph-based module caching.
+
+        Parameters
+        ----------
+        name : str
+            Fully-qualified name of the Python module to be found.
+        path : list
+            List of the absolute paths of all directories to search for this
+            module *or* `None` if the default path list `self.path` is to be
+            searched.
+        parent : Node
+            Optional parent module of this module if this module is a submodule
+            of another module *or* `None` if this module is a top-level module.
+
+        Returns
+        ----------
+        (file_handle, filename, metadata)
+            See `modulegraph.find_module()` for details.
+        """
         if parent is not None:
             # assert path is not None
-            fullname = parent.identifier + '.' + name
+            fullname = parent.identifier + "." + name
         else:
             fullname = name
 
         node = self.findNode(fullname)
         if node is not None:
-            self.msgout(3, "find_module -> already included?", node)
+            self.msg(3, "find_module -> already included?", node)
             raise ImportError(name)
 
         if path is None:
@@ -1452,7 +2002,7 @@
                 buf = os.path.realpath(buf)
 
             return (fp, buf, stuff)
-        except:
+        except:  # noqa: E722, B001
             fp.close()
             raise
 
@@ -1470,24 +2020,24 @@
                 mods.append((name, mod))
         scripts.sort()
         mods.sort()
-        scriptnames = [name for name, m in scripts]
+        scriptnames = [sn for sn, m in scripts]
         scripts.extend(mods)
         mods = scripts
 
-        title = "modulegraph cross reference for "  + ', '.join(scriptnames)
+        title = "modulegraph cross reference for " + ", ".join(scriptnames)
         print(header % {"TITLE": title}, file=out)
 
         def sorted_namelist(mods):
-            lst = sorted([os.path.basename(mod.identifier) for mod in mods if mod])
+            lst = [os.path.basename(mod.identifier) for mod in mods if mod]
+            lst.sort()
             return lst
+
         for name, m in mods:
             content = ""
             if isinstance(m, BuiltinModule):
-                content = contpl % {"NAME": name,
-                                    "TYPE": "<i>(builtin module)</i>"}
+                content = contpl % {"NAME": name, "TYPE": "<i>(builtin module)</i>"}
             elif isinstance(m, Extension):
-                content = contpl % {"NAME": name,\
-                                    "TYPE": "<tt>%s</tt>" % m.filename}
+                content = contpl % {"NAME": name, "TYPE": "<tt>%s</tt>" % m.filename}
             else:
                 url = pathname2url(m.filename or "")
                 content = contpl_linked % {"NAME": name, "URL": url}
@@ -1502,12 +2052,10 @@
                 for n in ince:
                     links += """  <a href="#%s">%s</a>\n""" % (n, n)
                 content += imports % {"HEAD": "imported by", "LINKS": links}
-            print(entry % {"NAME": name,"CONTENT": content}, file=out)
+            print(entry % {"NAME": name, "CONTENT": content}, file=out)
         print(footer, file=out)
 
-
-    def itergraphreport(self, name='G', flatpackages=()):
-        # XXX: Can this be implemented using Dot()?
+    def itergraphreport(self, name="G", flatpackages=()):
         nodes = list(map(self.graph.describe_node, self.graph.iterdfs(self)))
         describe_edge = self.graph.describe_edge
         edges = deque()
@@ -1517,44 +2065,37 @@
         inpackages = {}
         mainedges = set()
 
-        # XXX - implement
         flatpackages = dict(flatpackages)
 
         def nodevisitor(node, data, outgoing, incoming):
             if not isinstance(data, Node):
-                return {'label': str(node)}
-            #if isinstance(d, (ExcludedModule, MissingModule, BadModule)):
-            #    return None
-            s = '<f0> ' + type(data).__name__
+                return {"label": str(node)}
+            s = "<f0> " + type(data).__name__
             for i, v in enumerate(data.infoTuple()[:1], 1):
-                s += '| <f%d> %s' % (i, v)
-            return {'label':s, 'shape':'record'}
-
+                s += "| <f%d> %s" % (i, v)
+            return {"label": s, "shape": "record"}
 
         def edgevisitor(edge, data, head, tail):
-            # XXX: This method nonsense, the edge
-            # data is never initialized.
-            if data == 'orphan':
-                return {'style':'dashed'}
-            elif data == 'pkgref':
-                return {'style':'dotted'}
+            if data == "orphan":
+                return {"style": "dashed"}
+            elif data == "pkgref":
+                return {"style": "dotted"}
             return {}
 
-        yield 'digraph %s {\n' % (name,)
-        attr = dict(rankdir='LR', concentrate='true')
-        cpatt  = '%s="%s"'
+        yield "digraph %s {\n" % (name,)
+        attr = {"rankdir": "LR", "concentrate": "true"}
+        cpatt = '%s="%s"'
         for item in attr.items():
-            yield '\t%s;\n' % (cpatt % item,)
+            yield "\t%s;\n" % (cpatt % item,)
 
         # find all packages (subgraphs)
-        for (node, data, outgoing, incoming) in nodes:
-            nodetoident[node] = getattr(data, 'identifier', None)
+        for (node, data, _outgoing, _incoming) in nodes:
+            nodetoident[node] = getattr(data, "identifier", None)
             if isinstance(data, Package):
                 packageidents[data.identifier] = node
                 inpackages[node] = {node}
                 packagenodes.add(node)
 
-
         # create sets for subgraph, write out descriptions
         for (node, data, outgoing, incoming) in nodes:
             # update edges
@@ -1564,10 +2105,12 @@
             # describe node
             yield '\t"%s" [%s];\n' % (
                 node,
-                ','.join([
-                    (cpatt % item) for item in
-                    nodevisitor(node, data, outgoing, incoming).items()
-                ]),
+                ",".join(
+                    [
+                        (cpatt % item)
+                        for item in nodevisitor(node, data, outgoing, incoming).items()
+                    ]
+                ),
             )
 
             inside = inpackages.get(node)
@@ -1576,11 +2119,10 @@
             ident = nodetoident[node]
             if ident is None:
                 continue
-            pkgnode = packageidents.get(ident[:ident.rfind('.')])
+            pkgnode = packageidents.get(ident[: ident.rfind(".")])
             if pkgnode is not None:
                 inside.add(pkgnode)
 
-
         graph = []
         subgraphs = {}
         for key in packagenodes:
@@ -1597,14 +2139,14 @@
                 usepkgs = sorted(tailpkgs)
                 if len(usepkgs) != 1 or usepkgs[0] != tail:
                     edges.append((edge, data, head, usepkgs[0]))
-                    edges.append((edge, 'pkgref', usepkgs[-1], tail))
+                    edges.append((edge, "pkgref", usepkgs[-1], tail))
                     continue
             if common:
                 common = common.pop()
                 if tail == common:
                     edges.append((edge, data, tail, head))
                 elif head == common:
-                    subgraphs[common].append((edge, 'pkgref', head, tail))
+                    subgraphs[common].append((edge, "pkgref", head, tail))
                 else:
                     edges.append((edge, data, common, head))
                     edges.append((edge, data, common, tail))
@@ -1620,21 +2162,20 @@
                 yield edgestr % (
                     head,
                     tail,
-                    ','.join([(cpatt % item) for item in attribs.items()]),
+                    ",".join([(cpatt % item) for item in attribs.items()]),
                 )
 
         for g, edges in subgraphs.items():
             yield '\tsubgraph "cluster_%s" {\n' % (g,)
             yield '\t\tlabel="%s";\n' % (nodetoident[g],)
-            for s in do_graph(edges, '\t\t'):
+            for s in do_graph(edges, "\t\t"):
                 yield s
-            yield '\t}\n'
+            yield "\t}\n"
 
-        for s in do_graph(graph, '\t'):
+        for s in do_graph(graph, "\t"):
             yield s
 
-        yield '}\n'
-
+        yield "}\n"
 
     def graphreport(self, fileobj=None, flatpackages=()):
         if fileobj is None:
@@ -1648,18 +2189,16 @@
         print()
         print("%-15s %-25s %s" % ("Class", "Name", "File"))
         print("%-15s %-25s %s" % ("-----", "----", "----"))
-        # Print modules found
-        sorted = sorted([(os.path.basename(mod.identifier), mod) for mod in self.flatten()])
-        for (name, m) in sorted:
-            print("%-15s %-25s %s" % (type(m).__name__, name, m.filename or ""))
+        for m in sorted(self.flatten(), key=lambda n: n.identifier):
+            print("%-15s %-25s %s" % (type(m).__name__, m.identifier, m.filename or ""))
 
     def _replace_paths_in_code(self, co):
         new_filename = original_filename = os.path.normpath(co.co_filename)
         for f, r in self.replace_paths:
-            f = os.path.join(f, '')
-            r = os.path.join(r, '')
+            f = os.path.join(f, "")
+            r = os.path.join(r, "")
             if original_filename.startswith(f):
-                new_filename = r + original_filename[len(f):]
+                new_filename = r + original_filename[len(f) :]  # noqa: E203
                 break
 
         else:
@@ -1672,15 +2211,57 @@
 
         code_func = type(co)
 
-        if hasattr(co, 'co_kwonlyargcount'):
-            return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
-                         co.co_flags, co.co_code, tuple(consts), co.co_names,
-                         co.co_varnames, new_filename, co.co_name,
-                         co.co_firstlineno, co.co_lnotab,
-                         co.co_freevars, co.co_cellvars)
+        if hasattr(co, "co_posonlyargcount"):
+            return code_func(
+                co.co_argcount,
+                co.co_posonlyargcount,
+                co.co_kwonlyargcount,
+                co.co_nlocals,
+                co.co_stacksize,
+                co.co_flags,
+                co.co_code,
+                tuple(consts),
+                co.co_names,
+                co.co_varnames,
+                new_filename,
+                co.co_name,
+                co.co_firstlineno,
+                co.co_lnotab,
+                co.co_freevars,
+                co.co_cellvars,
+            )
+        elif hasattr(co, "co_kwonlyargcount"):
+            return code_func(
+                co.co_argcount,
+                co.co_kwonlyargcount,
+                co.co_nlocals,
+                co.co_stacksize,
+                co.co_flags,
+                co.co_code,
+                tuple(consts),
+                co.co_names,
+                co.co_varnames,
+                new_filename,
+                co.co_name,
+                co.co_firstlineno,
+                co.co_lnotab,
+                co.co_freevars,
+                co.co_cellvars,
+            )
         else:
-            return code_func(co.co_argcount, co.co_nlocals, co.co_stacksize,
-                         co.co_flags, co.co_code, tuple(consts), co.co_names,
-                         co.co_varnames, new_filename, co.co_name,
-                         co.co_firstlineno, co.co_lnotab,
-                         co.co_freevars, co.co_cellvars)
+            return code_func(
+                co.co_argcount,
+                co.co_nlocals,
+                co.co_stacksize,
+                co.co_flags,
+                co.co_code,
+                tuple(consts),
+                co.co_names,
+                co.co_varnames,
+                new_filename,
+                co.co_name,
+                co.co_firstlineno,
+                co.co_lnotab,
+                co.co_freevars,
+                co.co_cellvars,
+            )
diff --git a/telemetry/third_party/modulegraph/modulegraph/util.py b/telemetry/third_party/modulegraph/modulegraph/util.py
index f5fad18..7dc1186 100644
--- a/telemetry/third_party/modulegraph/modulegraph/util.py
+++ b/telemetry/third_party/modulegraph/modulegraph/util.py
@@ -1,14 +1,12 @@
 from __future__ import absolute_import
 
-import os
 import imp
-import sys
-import re
 import marshal
+import os
+import re
+import sys
 import warnings
 
-#2to3: modernize tried to convert unicode to six.text_type but the type should
-# be handled already. Leaving this untouched.
 try:
     unicode
 except NameError:
@@ -16,19 +14,18 @@
 
 
 if sys.version_info[0] == 2:
-    from StringIO import StringIO as BytesIO
     from StringIO import StringIO
+    from StringIO import StringIO as BytesIO
 
 else:
     from io import BytesIO, StringIO
 
 
-
 def imp_find_module(name, path=None):
     """
     same as imp.find_module, but handles dotted names
     """
-    names = name.split('.')
+    names = name.split(".")
     if path is not None:
         if isinstance(path, (str, unicode)):
             path = [os.path.realpath(path)]
@@ -39,6 +36,7 @@
         path = [result[1]]
     return result
 
+
 def _check_importer_for_path(name, path_item):
     try:
         importer = sys.path_importer_cache[path_item]
@@ -53,7 +51,6 @@
             importer = None
         sys.path_importer_cache.setdefault(path_item, importer)
 
-
     if importer is None:
         try:
             return imp.find_module(name, [path_item])
@@ -61,6 +58,7 @@
             return None
     return importer.find_module(name)
 
+
 def imp_walk(name):
     """
     yields namepart, tuple_or_importer for each path item
@@ -74,20 +72,24 @@
         return
     paths = sys.path
     res = None
-    for namepart in name.split('.'):
+    for namepart in name.split("."):
         for path_item in paths:
             res = _check_importer_for_path(namepart, path_item)
-            if hasattr(res, 'load_module'):
-                if res.path.endswith('.py') or res.path.endswith('.pyw'):
+            if hasattr(res, "load_module"):
+                if res.path.endswith(".py") or res.path.endswith(".pyw"):
                     fp = StringIO(res.get_source(namepart))
-                    res = (fp, res.path, ('.py', 'rU', imp.PY_SOURCE))
-                elif res.path.endswith('.pyc') or res.path.endswith('.pyo'):
-                    co  = res.get_code(namepart)
-                    fp = BytesIO(imp.get_magic() + b'\0\0\0\0' + marshal.dumps(co))
-                    res = (fp, res.path, ('.pyc', 'rb', imp.PY_COMPILED))
+                    res = (fp, res.path, (".py", "rU", imp.PY_SOURCE))
+                elif res.path.endswith(".pyc") or res.path.endswith(".pyo"):
+                    co = res.get_code(namepart)
+                    fp = BytesIO(imp.get_magic() + b"\0\0\0\0" + marshal.dumps(co))
+                    res = (fp, res.path, (".pyc", "rb", imp.PY_COMPILED))
 
                 else:
-                    res = (None, loader.path, (os.path.splitext(loader.path)[-1], 'rb', imp.C_EXTENSION))
+                    res = (
+                        None,
+                        res.path,
+                        (os.path.splitext(res.path)[-1], "rb", imp.C_EXTENSION),
+                    )
 
                 break
             elif isinstance(res, tuple):
@@ -100,22 +102,23 @@
     else:
         return
 
-    raise ImportError('No module named %s' % (name,))
+    raise ImportError("No module named %s" % (name,))
 
 
-cookie_re = re.compile(b"coding[:=]\s*([-\w.]+)")
+cookie_re = re.compile(br"coding[:=]\s*([-\w.]+)")
 if sys.version_info[0] == 2:
-    default_encoding = 'ascii'
+    default_encoding = "ascii"
 else:
-    default_encoding = 'utf-8'
+    default_encoding = "utf-8"
+
 
 def guess_encoding(fp):
 
-    for i in range(2):
+    for _i in range(2):
         ln = fp.readline()
 
         m = cookie_re.search(ln)
         if m is not None:
-            return m.group(1).decode('ascii')
+            return m.group(1).decode("ascii")
 
     return default_encoding
diff --git a/telemetry/third_party/modulegraph/modulegraph/zipio.py b/telemetry/third_party/modulegraph/modulegraph/zipio.py
index a316a94..4649312 100644
--- a/telemetry/third_party/modulegraph/modulegraph/zipio.py
+++ b/telemetry/third_party/modulegraph/modulegraph/zipio.py
@@ -1,41 +1,31 @@
 """
 A helper module that can work with paths
 that can refer to data inside a zipfile
-
-XXX: Need to determine if isdir("zipfile.zip")
-should return True or False. Currently returns
-True, but that might do the wrong thing with
-data-files that are zipfiles.
 """
-from __future__ import absolute_import
-import os as _os
-import zipfile as _zipfile
 import errno as _errno
-import time as _time
-import sys as _sys
+import os as _os
 import stat as _stat
+import sys as _sys
+import time as _time
+import zipfile as _zipfile
 
 _DFLT_DIR_MODE = (
-      _stat.S_IFDIR
-    | _stat.S_IXOTH
+    _stat.S_IXOTH
     | _stat.S_IXGRP
     | _stat.S_IXUSR
     | _stat.S_IROTH
     | _stat.S_IRGRP
-    | _stat.S_IRUSR)
+    | _stat.S_IRUSR
+)
 
-_DFLT_FILE_MODE = (
-      _stat.S_IFREG
-    | _stat.S_IROTH
-    | _stat.S_IRGRP
-    | _stat.S_IRUSR)
+_DFLT_FILE_MODE = _stat.S_IROTH | _stat.S_IRGRP | _stat.S_IRUSR
 
 
 if _sys.version_info[0] == 2:
-    from  StringIO import StringIO as _BaseStringIO
-    from  StringIO import StringIO as _BaseBytesIO
+    from StringIO import StringIO as _BaseBytesIO
+    from StringIO import StringIO as _BaseStringIO
 
-    class _StringIO (_BaseStringIO):
+    class _StringIO(_BaseStringIO):
         def __enter__(self):
             return self
 
@@ -43,7 +33,7 @@
             self.close()
             return False
 
-    class _BytesIO (_BaseBytesIO):
+    class _BytesIO(_BaseBytesIO):
         def __enter__(self):
             return self
 
@@ -51,11 +41,10 @@
             self.close()
             return False
 
+
 else:
-    from io import StringIO as _StringIO
     from io import BytesIO as _BytesIO
-
-
+    from io import StringIO as _StringIO
 
 
 def _locate(path):
@@ -73,26 +62,23 @@
                 break
 
         if path == root:
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         if not _os.path.isfile(path):
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         rest.reverse()
-        return path, '/'.join(rest).strip('/')
+        return path, "/".join(rest).strip("/")
+
 
 _open = open
-def open(path, mode='r'):
-    if 'w' in mode or 'a' in mode:
-        raise IOError(
-            _errno.EINVAL, path, "Write access not supported")
-    elif 'r+' in mode:
-        raise IOError(
-            _errno.EINVAL, path, "Write access not supported")
+
+
+def open(path, mode="r"):
+    if "w" in mode or "a" in mode:
+        raise IOError(_errno.EINVAL, path, "Write access not supported")
+    elif "r+" in mode:
+        raise IOError(_errno.EINVAL, path, "Write access not supported")
 
     full_path = path
     path, rest = _locate(path)
@@ -101,31 +87,28 @@
 
     else:
         try:
-            zf = _zipfile.ZipFile(path, 'r')
+            zf = _zipfile.ZipFile(path, "r")
 
         except _zipfile.error:
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         try:
             data = zf.read(rest)
         except (_zipfile.error, KeyError):
             zf.close()
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
         zf.close()
 
-        if mode == 'rb':
+        if mode == "rb":
             return _BytesIO(data)
 
         else:
             if _sys.version_info[0] == 3:
-                data = data.decode('ascii')
+                data = data.decode("ascii")
 
             return _StringIO(data)
 
+
 def listdir(path):
     full_path = path
     path, rest = _locate(path)
@@ -134,12 +117,10 @@
 
     else:
         try:
-            zf = _zipfile.ZipFile(path, 'r')
+            zf = _zipfile.ZipFile(path, "r")
 
         except _zipfile.error:
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         result = set()
         seen = False
@@ -147,18 +128,18 @@
             for nm in zf.namelist():
                 if rest is None:
                     seen = True
-                    value = nm.split('/')[0]
+                    value = nm.split("/")[0]
                     if value:
                         result.add(value)
 
                 elif nm.startswith(rest):
                     if nm == rest:
                         seen = True
-                        value = ''
+                        value = ""
                         pass
-                    elif nm[len(rest)] == '/':
+                    elif nm[len(rest)] == "/":
                         seen = True
-                        value = nm[len(rest)+1:].split('/')[0]
+                        value = nm[len(rest) + 1 :].split("/")[0]  # noqa: E203
                     else:
                         value = None
 
@@ -166,27 +147,24 @@
                         result.add(value)
         except _zipfile.error:
             zf.close()
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         zf.close()
 
         if not seen:
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         return list(result)
 
+
 def isfile(path):
     full_path = path
     path, rest = _locate(path)
     if not rest:
-        ok =  _os.path.isfile(path)
+        ok = _os.path.isfile(path)
         if ok:
             try:
-                zf = _zipfile.ZipFile(path, 'r')
+                zf = _zipfile.ZipFile(path, "r")
                 return False
             except (_zipfile.error, IOError):
                 return True
@@ -194,8 +172,8 @@
 
     zf = None
     try:
-        zf = _zipfile.ZipFile(path, 'r')
-        info = zf.getinfo(rest)
+        zf = _zipfile.ZipFile(path, "r")
+        zf.getinfo(rest)
         zf.close()
         return True
     except (KeyError, _zipfile.error):
@@ -204,34 +182,30 @@
 
         # Check if this is a directory
         try:
-            info = zf.getinfo(rest + '/')
+            zf.getinfo(rest + "/")
         except KeyError:
             pass
         else:
             return False
 
-        rest = rest + '/'
+        rest = rest + "/"
         for nm in zf.namelist():
             if nm.startswith(rest):
                 # Directory
                 return False
 
         # No trace in zipfile
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
-
-
+        raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
 
 def isdir(path):
     full_path = path
     path, rest = _locate(path)
     if not rest:
-        ok =  _os.path.isdir(path)
+        ok = _os.path.isdir(path)
         if not ok:
             try:
-                zf = _zipfile.ZipFile(path, 'r')
+                zf = _zipfile.ZipFile(path, "r")
             except (_zipfile.error, IOError):
                 return False
             return True
@@ -242,21 +216,19 @@
         try:
             zf = _zipfile.ZipFile(path)
         except _zipfile.error:
-            raise IOError(
-                _errno.ENOENT, full_path,
-                "No such file or directory")
+            raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
         try:
-            info = zf.getinfo(rest)
+            zf.getinfo(rest)
         except KeyError:
             pass
         else:
             # File found
             return False
 
-        rest = rest + '/'
+        rest = rest + "/"
         try:
-            info = zf.getinfo(rest)
+            zf.getinfo(rest)
         except KeyError:
             pass
         else:
@@ -267,9 +239,7 @@
             if nm.startswith(rest):
                 return True
 
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
+        raise IOError(_errno.ENOENT, full_path, "No such file or directory")
     finally:
         if zf is not None:
             zf.close()
@@ -284,23 +254,19 @@
     try:
         zf = _zipfile.ZipFile(path)
     except _zipfile.error:
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
+        raise IOError(_errno.ENOENT, full_path, "No such file or directory")
     try:
-
-
         try:
-            info = zf.getinfo(rest)
+            zf.getinfo(rest)
         except KeyError:
             pass
         else:
             # File
             return False
 
-        rest += '/'
+        rest += "/"
         try:
-            info = zf.getinfo(rest)
+            zf.getinfo(rest)
         except KeyError:
             pass
         else:
@@ -312,9 +278,7 @@
                 # Directory without listing
                 return False
 
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
+        raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
     finally:
         zf.close()
@@ -325,17 +289,16 @@
     path, rest = _locate(path)
     if rest:
         # No symlinks inside zipfiles
-        raise OSError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
+        raise OSError(_errno.ENOENT, full_path, "No such file or directory")
 
     return _os.readlink(path)
 
+
 def getmode(path):
     full_path = path
     path, rest = _locate(path)
     if not rest:
-        return _os.stat(path).st_mode
+        return _stat.S_IMODE(_os.stat(path).st_mode)
 
     zf = None
     try:
@@ -349,36 +312,31 @@
 
         if info is None:
             try:
-                info = zf.getinfo(rest + '/')
+                info = zf.getinfo(rest + "/")
             except KeyError:
                 pass
 
         if info is None:
-            rest = rest + '/'
+            rest = rest + "/"
             for nm in zf.namelist():
                 if nm.startswith(rest):
                     break
             else:
-                raise IOError(
-                    _errno.ENOENT, full_path,
-                    "No such file or directory")
+                raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
             # Directory exists, but has no entry of its own.
             return _DFLT_DIR_MODE
 
         # The mode is stored without file-type in external_attr.
         if (info.external_attr >> 16) != 0:
-            return _stat.S_IFREG | (info.external_attr >> 16)
+            return _stat.S_IMODE(info.external_attr >> 16)
         else:
             return _DFLT_FILE_MODE
 
-
-    except KeyError:
+    finally:
         if zf is not None:
             zf.close()
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
+
 
 def getmtime(path):
     full_path = path
@@ -398,19 +356,17 @@
 
         if info is None:
             try:
-                info = zf.getinfo(rest + '/')
+                info = zf.getinfo(rest + "/")
             except KeyError:
                 pass
 
         if info is None:
-            rest = rest + '/'
+            rest = rest + "/"
             for nm in zf.namelist():
                 if nm.startswith(rest):
                     break
             else:
-                raise IOError(
-                    _errno.ENOENT, full_path,
-                    "No such file or directory")
+                raise IOError(_errno.ENOENT, full_path, "No such file or directory")
 
             # Directory exists, but has no entry of its
             # own, fake mtime by using the timestamp of
@@ -419,9 +375,6 @@
 
         return _time.mktime(info.date_time + (0, 0, -1))
 
-    except KeyError:
+    finally:
         if zf is not None:
             zf.close()
-        raise IOError(
-            _errno.ENOENT, full_path,
-            "No such file or directory")
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/__init__.py
deleted file mode 100644
index 3e9f9ed..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" modulegraph tests """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_basic.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_basic.py
deleted file mode 100644
index 167942c..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_basic.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from __future__ import absolute_import
-import unittest
-
-import os, shutil
-
-from modulegraph import modulegraph
-
-class DummyModule(object):
-    packagepath = None
-    def __init__(self, ppath):
-        self.packagepath = ppath
-
-class FindAllSubmodulesTestCase(unittest.TestCase):
-    def testNone(self):
-        mg = modulegraph.ModuleGraph()
-        # empty packagepath
-        m = DummyModule(None)
-        sub_ms = []
-        for sm in mg._find_all_submodules(m):
-            sub_ms.append(sm)
-        self.assertEqual(sub_ms, [])
-
-    def testSimple(self):
-        mg = modulegraph.ModuleGraph()
-        # a string does not break anything although it is split into its characters
-        # BUG: "/hi/there" will read "/"
-        m = DummyModule("xyz")
-        sub_ms = []
-        for sm in mg._find_all_submodules(m):
-            sub_ms.append(sm)
-        self.assertEqual(sub_ms, [])
-
-    def testSlashes(self):
-        # a string does not break anything although it is split into its characters
-        # BUG: "/xyz" will read "/" so this one already triggers missing itertools
-        mg = modulegraph.ModuleGraph()
-        m = DummyModule("/xyz")
-        sub_ms = []
-        for sm in mg._find_all_submodules(m):
-            sub_ms.append(sm)
-        self.assertEqual(sub_ms, [])
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_edge_data.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_edge_data.py
deleted file mode 100644
index 6acf41b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_edge_data.py
+++ /dev/null
@@ -1,418 +0,0 @@
-from __future__ import absolute_import
-import os
-import sys
-if sys.version_info[:2] <= (2, 6):
-    import unittest2 as unittest
-else:
-    import unittest
-
-from modulegraph import modulegraph
-
-
-# XXX: Todo: simular tests with bytecompiled modules
-
-
-class TestEdgeData (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def test_regular_import(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-edgedata')
-        mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        script_name = os.path.join(root, 'script.py')
-        mf.run_script(script_name)
-
-        script_node = mf.findNode(script_name)
-        self.assertIsInstance(script_node, modulegraph.Script)
-
-
-        node = mf.findNode('toplevel_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_class_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_class_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_conditional_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('toplevel_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_class_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_class_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_conditional_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_conditional_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('function_conditional_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_conditional_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_conditional_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_conditional_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('function_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=False))
-
-
-    def test_multi_import(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-edgedata')
-        mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        script_name = os.path.join(root, 'script_multi_import.py')
-        mf.run_script(script_name)
-
-        script_node = mf.findNode(script_name)
-        self.assertIsInstance(script_node, modulegraph.Script)
-
-
-        node = mf.findNode('os.path')
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=False))
-
-        node = mf.findNode('os')
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('sys')
-        ed = mf.edgeData(script_node, node)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('platform')
-        ed = mf.edgeData(script_node, node)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=False))
-
-        node = mf.findNode('email')
-        ed = mf.edgeData(script_node, node)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=False))
-
-    def test_from_imports(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-edgedata')
-        mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        script_name = os.path.join(root, 'script_from_import.py')
-        mf.run_script(script_name)
-
-        script_node = mf.findNode(script_name)
-        self.assertIsInstance(script_node, modulegraph.Script)
-
-
-        node = mf.findNode('pkg.toplevel_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_class_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_class_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_conditional_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.toplevel_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=False, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_class_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_class_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=False, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_conditional_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=True, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_import_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_import_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_import2_existing')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=True))
-
-        node = mf.findNode('pkg.function_import2_nonexisting')
-        self.assertIsInstance(node, modulegraph.MissingModule)
-        ed = mf.edgeData(script_node, node)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(conditional=False, function=True, tryexcept=True, fromlist=True))
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_explicit_packages.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_explicit_packages.py
deleted file mode 100644
index a964e4f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_explicit_packages.py
+++ /dev/null
@@ -1,51 +0,0 @@
-from __future__ import absolute_import
-import unittest
-
-import os, shutil, sys
-
-from modulegraph import find_modules
-from modulegraph import modulegraph
-
-
-class PackagesTestCase (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, object, types, message=None):
-            self.assertTrue(isinstance(object, types),
-                    message or '%r is not an instance of %r'%(object, types))
-
-    def testIncludePackage(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-packages')
-
-        mf = find_modules.find_modules(
-                path=[root]+sys.path,
-                scripts=[os.path.join(root, "main_script.py")],
-                packages=['pkg'],
-                debug=1)
-
-        node = mf.findNode('pkg')
-        self.assertIsInstance(node, modulegraph.Package)
-
-        node = mf.findNode('pkg.sub3')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-    def testIncludePackageWithExclude(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-packages')
-
-        mf = find_modules.find_modules(
-                path=[root]+sys.path,
-                scripts=[os.path.join(root, "main_script.py")],
-                packages=['pkg'],
-                excludes=['pkg.sub3'])
-
-        node = mf.findNode('pkg')
-        self.assertIsInstance(node, modulegraph.Package)
-
-        node = mf.findNode('pkg.sub3')
-        self.assertIsInstance(node, modulegraph.ExcludedModule)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_implies.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_implies.py
deleted file mode 100644
index d8e35f6..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_implies.py
+++ /dev/null
@@ -1,79 +0,0 @@
-from __future__ import absolute_import
-import unittest
-
-import os, shutil, sys
-
-from modulegraph import modulegraph
-
-class ImpliesTestCase(unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, object, types, message=None):
-            self.assertTrue(isinstance(object, types),
-                    message or '%r is not an instance of %r'%(object, types))
-
-    def testBasicImplies(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-relimport')
-
-        # First check that 'syslog' isn't accidently in the graph:
-        mg = modulegraph.ModuleGraph(path=[root]+sys.path)
-        mg.run_script(os.path.join(root, 'script.py'))
-        node = mg.findNode('mod')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = mg.findNode('syslog')
-        self.assertEqual(node, None)
-
-        # Now check that adding an implied dependency actually adds
-        # 'syslog' to the graph:
-        mg = modulegraph.ModuleGraph(path=[root]+sys.path, implies={
-            'mod': ['syslog']})
-        self.assertEqual(node, None)
-        mg.run_script(os.path.join(root, 'script.py'))
-        node = mg.findNode('mod')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = mg.findNode('syslog')
-        self.assertIsInstance(node, modulegraph.Extension)
-
-        # Check that the edges are correct:
-        self.assertTrue(mg.findNode('mod') in mg.get_edges(node)[1])
-        self.assertTrue(node in mg.get_edges(mg.findNode('mod'))[0])
-
-    def testPackagedImplies(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-relimport')
-
-        # First check that 'syslog' isn't accidently in the graph:
-        mg = modulegraph.ModuleGraph(path=[root]+sys.path)
-        mg.run_script(os.path.join(root, 'script.py'))
-        node = mg.findNode('mod')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = mg.findNode('syslog')
-        self.assertEqual(node, None)
-
-
-        # Now check that adding an implied dependency actually adds
-        # 'syslog' to the graph:
-        mg = modulegraph.ModuleGraph(path=[root]+sys.path, implies={
-            'pkg.relative': ['syslog']})
-        node = mg.findNode('syslog')
-        self.assertEqual(node, None)
-
-        mg.run_script(os.path.join(root, 'script.py'))
-        node = mg.findNode('pkg.relative')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = mg.findNode('syslog')
-        self.assertIsInstance(node, modulegraph.Extension)
-
-        # Check that the edges are correct:
-        self.assertTrue(mg.findNode('pkg.relative') in mg.get_edges(node)[1])
-        self.assertTrue(node in mg.get_edges(mg.findNode('pkg.relative'))[0])
-
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_import_from_init.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_import_from_init.py
deleted file mode 100644
index b041c7f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_import_from_init.py
+++ /dev/null
@@ -1,130 +0,0 @@
-from __future__ import print_function
-from __future__ import absolute_import
-import sys
-if sys.version_info[:2] <= (2, 6):
-    import unittest2 as unittest
-else:
-    import unittest
-import textwrap
-import subprocess
-import os
-from modulegraph import modulegraph
-
-class TestNativeImport (unittest.TestCase):
-    # The tests check that Python's import statement
-    # works as these tests expect.
-
-    def importModule(self, name):
-        if '.' in name:
-            script = textwrap.dedent("""\
-                try:
-                    import %s
-                except ImportError:
-                    import %s
-                print (%s.__name__)
-            """) %(name, name.rsplit('.', 1)[0], name)
-        else:
-            script = textwrap.dedent("""\
-                import %s
-                print (%s.__name__)
-            """) %(name, name)
-
-        p = subprocess.Popen([sys.executable, '-c', script],
-                stdout=subprocess.PIPE,
-                stderr=subprocess.STDOUT,
-                cwd=os.path.join(
-                    os.path.dirname(os.path.abspath(__file__)),
-                    'testpkg-import-from-init'),
-        )
-        data = p.communicate()[0]
-        if sys.version_info[0] != 2:
-            data = data.decode('UTF-8')
-        data = data.strip()
-
-        if data.endswith(' refs]'):
-            # with --with-pydebug builds
-            data = data.rsplit('\n', 1)[0].strip()
-
-        sts = p.wait()
-
-        if sts != 0:
-            print (data)
-        self.assertEqual(sts, 0)
-        return data
-
-
-    @unittest.skipUnless(sys.version_info[0] == 2, "Python 2.x test")
-    def testRootPkg(self):
-        m = self.importModule('pkg')
-        self.assertEqual(m, 'pkg')
-
-    @unittest.skipUnless(sys.version_info[0] == 2, "Python 2.x test")
-    def testSubPackage(self):
-        m = self.importModule('pkg.subpkg')
-        self.assertEqual(m, 'pkg.subpkg')
-
-    def testRootPkgRelImport(self):
-        m = self.importModule('pkg2')
-        self.assertEqual(m, 'pkg2')
-
-    def testSubPackageRelImport(self):
-        m = self.importModule('pkg2.subpkg')
-        self.assertEqual(m, 'pkg2.subpkg')
-
-
-class TestModuleGraphImport (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-import-from-init')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        #self.mf.debug = 999
-        self.mf.run_script(os.path.join(root, 'script.py'))
-
-
-    @unittest.skipUnless(sys.version_info[0] == 2, "Python 2.x test")
-    def testRootPkg(self):
-        node = self.mf.findNode('pkg')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertEqual(node.identifier, 'pkg')
-
-    @unittest.skipUnless(sys.version_info[0] == 2, "Python 2.x test")
-    def testSubPackage(self):
-        node = self.mf.findNode('pkg.subpkg')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertEqual(node.identifier, 'pkg.subpkg')
-
-        node = self.mf.findNode('pkg.subpkg.compat')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.subpkg.compat')
-
-        node = self.mf.findNode('pkg.subpkg._collections')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.subpkg._collections')
-
-    def testRootPkgRelImport(self):
-        node = self.mf.findNode('pkg2')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertEqual(node.identifier, 'pkg2')
-
-    def testSubPackageRelImport(self):
-        node = self.mf.findNode('pkg2.subpkg')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertEqual(node.identifier, 'pkg2.subpkg')
-
-        node = self.mf.findNode('pkg2.subpkg.compat')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg2.subpkg.compat')
-
-        node = self.mf.findNode('pkg2.subpkg._collections')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg2.subpkg._collections')
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_imports.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_imports.py
deleted file mode 100644
index c18339c..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_imports.py
+++ /dev/null
@@ -1,475 +0,0 @@
-"""
-Test for import machinery
-"""
-from __future__ import print_function
-from __future__ import absolute_import
-import unittest
-import sys
-import textwrap
-import subprocess
-import os
-from modulegraph import modulegraph
-
-class TestNativeImport (unittest.TestCase):
-    # The tests check that Python's import statement
-    # works as these tests expect.
-
-    def importModule(self, name):
-        if '.' in name:
-            script = textwrap.dedent("""\
-                try:
-                    import %s
-                except ImportError:
-                    import %s
-                print (%s.__name__)
-            """) %(name, name.rsplit('.', 1)[0], name)
-        else:
-            script = textwrap.dedent("""\
-                import %s
-                print (%s.__name__)
-            """) %(name, name)
-
-        p = subprocess.Popen([sys.executable, '-c', script],
-                stdout=subprocess.PIPE,
-                stderr=subprocess.STDOUT,
-                cwd=os.path.join(
-                    os.path.dirname(os.path.abspath(__file__)),
-                    'testpkg-relimport'),
-        )
-        data = p.communicate()[0]
-        if sys.version_info[0] != 2:
-            data = data.decode('UTF-8')
-        data = data.strip()
-
-        if data.endswith(' refs]'):
-            # with --with-pydebug builds
-            data = data.rsplit('\n', 1)[0].strip()
-
-        sts = p.wait()
-
-        if sts != 0:
-            print (data)
-        self.assertEqual(sts, 0)
-        return data
-
-
-    def testRootModule(self):
-        m = self.importModule('mod')
-        self.assertEqual(m, 'mod')
-
-    def testRootPkg(self):
-        m = self.importModule('pkg')
-        self.assertEqual(m, 'pkg')
-
-    def testSubModule(self):
-        m = self.importModule('pkg.mod')
-        self.assertEqual(m, 'pkg.mod')
-
-    if sys.version_info[0] == 2:
-        def testOldStyle(self):
-            m = self.importModule('pkg.oldstyle.mod')
-            self.assertEqual(m, 'pkg.mod')
-    else:
-        # python3 always has __future__.absolute_import
-        def testOldStyle(self):
-            m = self.importModule('pkg.oldstyle.mod')
-            self.assertEqual(m, 'mod')
-
-    def testNewStyle(self):
-        m = self.importModule('pkg.toplevel.mod')
-        self.assertEqual(m, 'mod')
-
-    def testRelativeImport(self):
-        m = self.importModule('pkg.relative.mod')
-        self.assertEqual(m, 'pkg.mod')
-
-        m = self.importModule('pkg.subpkg.relative.mod')
-        self.assertEqual(m, 'pkg.mod')
-
-        m = self.importModule('pkg.subpkg.mod2.mod')
-        self.assertEqual(m, 'pkg.sub2.mod')
-
-        m = self.importModule('pkg.subpkg.relative2')
-        self.assertEqual(m, 'pkg.subpkg.relative2')
-
-class TestModuleGraphImport (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-relimport')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        #self.mf.debug = 999
-        self.script_name = os.path.join(root, 'script.py')
-        self.mf.run_script(self.script_name)
-
-    def testGraphStructure(self):
-
-        # 1. Script to imported modules
-        n = self.mf.findNode(self.script_name)
-        self.assertIsInstance(n, modulegraph.Script)
-
-        imported = ('mod', 'pkg', 'pkg.mod', 'pkg.oldstyle',
-            'pkg.relative', 'pkg.toplevel', 'pkg.subpkg.relative',
-            'pkg.subpkg.relative2', 'pkg.subpkg.mod2')
-
-        for nm in imported:
-            n2 = self.mf.findNode(nm)
-            ed = self.mf.edgeData(n, n2)
-            self.assertIsInstance(ed, modulegraph.DependencyInfo)
-            self.assertEqual(ed, modulegraph.DependencyInfo(
-                fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        refs = self.mf.getReferences(n)
-        self.assertEqual(set(refs), set(self.mf.findNode(nm) for nm in imported))
-
-        refs = list(self.mf.getReferers(n))
-        # The script is a toplevel item and is therefore referred to from the graph root (aka 'None')
-        self.assertEqual(refs, [None])
-
-
-        # 2. 'mod'
-        n = self.mf.findNode('mod')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = list(self.mf.getReferences(n))
-        self.assertEqual(refs, [])
-
-        #refs = list(self.mf.getReferers(n))
-        #self.assertEquals(refs, [])
-
-        # 3. 'pkg'
-        n = self.mf.findNode('pkg')
-        self.assertIsInstance(n, modulegraph.Package)
-        refs = list(self.mf.getReferences(n))
-        self.maxDiff = None
-        self.assertEqual(refs, [n])
-
-        #refs = list(self.mf.getReferers(n))
-        #self.assertEquals(refs, [])
-
-        # 4. pkg.mod
-        n = self.mf.findNode('pkg.mod')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('pkg')})
-        ed = self.mf.edgeData(n, self.mf.findNode('pkg'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-
-        # 5. pkg.oldstyle
-        n = self.mf.findNode('pkg.oldstyle')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        if sys.version_info[0] == 2:
-            n2 = self.mf.findNode('pkg.mod')
-        else:
-            n2 = self.mf.findNode('mod')
-        self.assertEqual(refs, {self.mf.findNode('pkg'), n2})
-        ed = self.mf.edgeData(n, n2)
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-
-        # 6. pkg.relative
-        n = self.mf.findNode('pkg.relative')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('__future__'), self.mf.findNode('pkg'), self.mf.findNode('pkg.mod')})
-
-        ed = self.mf.edgeData(n, self.mf.findNode('pkg.mod'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=True, conditional=False, function=False, tryexcept=False))
-
-        ed = self.mf.edgeData(n, self.mf.findNode('__future__'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        #ed = self.mf.edgeData(n, self.mf.findNode('__future__.absolute_import'))
-        #self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        #self.assertEqual(ed, modulegraph.DependencyInfo(
-            #fromlist=True, conditional=False, function=False, tryexcept=False))
-
-        # 7. pkg.toplevel
-        n = self.mf.findNode('pkg.toplevel')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('__future__'), self.mf.findNode('pkg'), self.mf.findNode('mod')})
-
-        ed = self.mf.edgeData(n, self.mf.findNode('mod'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        ed = self.mf.edgeData(n, self.mf.findNode('__future__'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        #ed = self.mf.edgeData(n, self.mf.findNode('__future__.absolute_import'))
-        #self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        #self.assertEqual(ed, modulegraph.DependencyInfo(
-            #fromlist=True, conditional=False, function=False, tryexcept=False))
-
-        # 8. pkg.subpkg
-        n = self.mf.findNode('pkg.subpkg')
-        self.assertIsInstance(n, modulegraph.Package)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('pkg')})
-
-        ed = self.mf.edgeData(n, self.mf.findNode('pkg'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        # 9. pkg.subpkg.relative
-        n = self.mf.findNode('pkg.subpkg.relative')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('__future__'), self.mf.findNode('pkg'), self.mf.findNode('pkg.subpkg'), self.mf.findNode('pkg.mod')})
-
-        ed = self.mf.edgeData(n, self.mf.findNode('pkg.subpkg'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=False, conditional=False, function=False, tryexcept=False))
-
-        ed = self.mf.edgeData(n, self.mf.findNode('pkg.mod'))
-        self.assertIsInstance(ed, modulegraph.DependencyInfo)
-        self.assertEqual(ed, modulegraph.DependencyInfo(
-            fromlist=True, conditional=False, function=False, tryexcept=False))
-
-        # 10. pkg.subpkg.relative2
-        n = self.mf.findNode('pkg.subpkg.relative2')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {self.mf.findNode('pkg.subpkg'), self.mf.findNode('pkg.relimport'), self.mf.findNode('__future__')})
-
-        # 10. pkg.subpkg.mod2
-        n = self.mf.findNode('pkg.subpkg.mod2')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-        refs = set(self.mf.getReferences(n))
-        self.assertEqual(refs, {
-            self.mf.findNode('__future__'),
-            self.mf.findNode('pkg.subpkg'),
-            self.mf.findNode('pkg.sub2.mod'),
-            self.mf.findNode('pkg.sub2'),
-        })
-
-
-    def testRootModule(self):
-        node = self.mf.findNode('mod')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'mod')
-
-    def testRootPkg(self):
-        node = self.mf.findNode('pkg')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertEqual(node.identifier, 'pkg')
-
-    def testSubModule(self):
-        node = self.mf.findNode('pkg.mod')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.mod')
-
-    if sys.version_info[0] == 2:
-        def testOldStyle(self):
-            node = self.mf.findNode('pkg.oldstyle')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'pkg.oldstyle')
-            sub = [ n for n in self.mf.get_edges(node)[0] if n.identifier != '__future__' ][0]
-            self.assertEqual(sub.identifier, 'pkg.mod')
-    else:
-        # python3 always has __future__.absolute_import
-        def testOldStyle(self):
-            node = self.mf.findNode('pkg.oldstyle')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'pkg.oldstyle')
-            sub = [ n for n in self.mf.get_edges(node)[0] if n.identifier != '__future__' ][0]
-            self.assertEqual(sub.identifier, 'mod')
-
-    def testNewStyle(self):
-        node = self.mf.findNode('pkg.toplevel')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.toplevel')
-        sub = [ n for n in self.mf.get_edges(node)[0] if not n.identifier.startswith('__future__')][0]
-        self.assertEqual(sub.identifier, 'mod')
-
-    def testRelativeImport(self):
-        node = self.mf.findNode('pkg.relative')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.relative')
-        sub = [ n for n in self.mf.get_edges(node)[0] if not n.identifier.startswith('__future__') ][0]
-        self.assertIsInstance(sub, modulegraph.Package)
-        self.assertEqual(sub.identifier, 'pkg')
-
-        node = self.mf.findNode('pkg.subpkg.relative')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.subpkg.relative')
-        sub = [ n for n in self.mf.get_edges(node)[0] if not n.identifier.startswith('__future__') ][0]
-        self.assertIsInstance(sub, modulegraph.Package)
-        self.assertEqual(sub.identifier, 'pkg')
-
-        node = self.mf.findNode('pkg.subpkg.mod2')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.subpkg.mod2')
-        sub = [ n for n in self.mf.get_edges(node)[0] if not n.identifier.startswith('__future__') ][0]
-        self.assertIsInstance(sub, modulegraph.SourceModule)
-        self.assertEqual(sub.identifier, 'pkg.sub2.mod')
-
-        node = self.mf.findNode('pkg.subpkg.relative2')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'pkg.subpkg.relative2')
-
-        node = self.mf.findNode('pkg.relimport')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-class TestRegressions1 (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r", value, types)
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr1')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'main_script.py'))
-
-    def testRegr1(self):
-        node = self.mf.findNode('pkg.a')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        node = self.mf.findNode('pkg.b')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-
-    def testMissingPathEntry(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'nosuchdirectory')
-        try:
-            mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        except os.error:
-            self.fail('modulegraph initialiser raises os.error')
-
-class TestRegressions2 (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr2')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'main_script.py'))
-
-    def testRegr1(self):
-        node = self.mf.findNode('pkg.base')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        node = self.mf.findNode('pkg.pkg')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-class TestRegressions3 (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def assertStartswith(self, value, test):
-        if not value.startswith(test):
-            self.fail("%r does not start with %r"%(value, test))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr3')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'script.py'))
-
-    def testRegr1(self):
-        node = self.mf.findNode('mypkg.distutils')
-        self.assertIsInstance(node, modulegraph.Package)
-        node = self.mf.findNode('mypkg.distutils.ccompiler')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertStartswith(node.filename, os.path.dirname(__file__))
-
-        import distutils.sysconfig, distutils.ccompiler
-        node = self.mf.findNode('distutils.ccompiler')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(os.path.dirname(node.filename),
-                os.path.dirname(distutils.ccompiler.__file__))
-
-        node = self.mf.findNode('distutils.sysconfig')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(os.path.dirname(node.filename),
-                os.path.dirname(distutils.sysconfig.__file__))
-
-class TestRegression4 (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr4')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'script.py'))
-
-    def testRegr1(self):
-        node = self.mf.findNode('pkg.core')
-        self.assertIsInstance(node, modulegraph.Package)
-
-        node = self.mf.findNode('pkg.core.callables')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = self.mf.findNode('pkg.core.listener')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        node = self.mf.findNode('pkg.core.listenerimpl')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-class TestRegression5 (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr5')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'script.py'))
-
-    def testRegr1(self):
-        node = self.mf.findNode('distutils')
-        self.assertIsInstance(node, modulegraph.Package)
-        self.assertIn('distutils/__init__', node.filename)
-
-class TestDeeplyNested (unittest.TestCase):
-    def setUp(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-regr6')
-        self.mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        self.mf.run_script(os.path.join(root, 'script.py'))
-
-    def testRegr(self):
-        node = self.mf.findNode('os')
-        self.assertTrue(node is not None)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_modulegraph.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_modulegraph.py
deleted file mode 100644
index be56b79..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_modulegraph.py
+++ /dev/null
@@ -1,1060 +0,0 @@
-from __future__ import absolute_import
-import unittest
-from modulegraph import modulegraph
-import pkg_resources
-import os
-import imp
-import sys
-import shutil
-import warnings
-from altgraph import Graph
-import textwrap
-import xml.etree.ElementTree as ET
-import pickle
-
-try:
-    bytes
-except NameError:
-    bytes = str
-
-try:
-    from StringIO import StringIO
-except ImportError:
-    from io import StringIO
-
-TESTDATA = os.path.join(
-        os.path.dirname(os.path.abspath(__file__)),
-        "testdata", "nspkg")
-
-try:
-    expectedFailure = unittest.expectedFailure
-except AttributeError:
-    import functools
-    def expectedFailure(function):
-        @functools.wraps(function)
-        def wrapper(*args, **kwds):
-            try:
-                function(*args, **kwds)
-            except AssertionError:
-                pass
-
-            else:
-                self.fail("unexpected pass")
-
-class TestDependencyInfo (unittest.TestCase):
-    def test_pickling(self):
-        info = modulegraph.DependencyInfo(function=True, conditional=False, tryexcept=True, fromlist=False)
-        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
-            b = pickle.dumps(info, proto)
-            self.assertTrue(isinstance(b, bytes))
-
-            o = pickle.loads(b)
-            self.assertEqual(o, info)
-
-    def test_merging(self):
-        info1 = modulegraph.DependencyInfo(function=True, conditional=False, tryexcept=True, fromlist=False)
-        info2 = modulegraph.DependencyInfo(function=False, conditional=True, tryexcept=True, fromlist=False)
-        self.assertEqual(
-            info1._merged(info2), modulegraph.DependencyInfo(function=True, conditional=True, tryexcept=True, fromlist=False))
-
-        info2 = modulegraph.DependencyInfo(function=False, conditional=True, tryexcept=False, fromlist=False)
-        self.assertEqual(
-            info1._merged(info2), modulegraph.DependencyInfo(function=True, conditional=True, tryexcept=True, fromlist=False))
-
-        info2 = modulegraph.DependencyInfo(function=False, conditional=False, tryexcept=False, fromlist=False)
-        self.assertEqual(
-            info1._merged(info2), modulegraph.DependencyInfo(function=False, conditional=False, tryexcept=False, fromlist=False))
-
-        info1 = modulegraph.DependencyInfo(function=True, conditional=False, tryexcept=True, fromlist=True)
-        self.assertEqual(
-            info1._merged(info2), modulegraph.DependencyInfo(function=False, conditional=False, tryexcept=False, fromlist=False))
-
-        info2 = modulegraph.DependencyInfo(function=False, conditional=False, tryexcept=False, fromlist=True)
-        self.assertEqual(
-            info1._merged(info2), modulegraph.DependencyInfo(function=False, conditional=False, tryexcept=False, fromlist=True))
-
-
-class TestFunctions (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, obj, types):
-            self.assertTrue(isinstance(obj, types), '%r is not instance of %r'%(obj, types))
-
-    def test_eval_str_tuple(self):
-        for v in [
-            '()',
-            '("hello",)',
-            '("hello", "world")',
-            "('hello',)",
-            "('hello', 'world')",
-            "('hello', \"world\")",
-            ]:
-
-            self.assertEqual(modulegraph._eval_str_tuple(v), eval(v))
-
-        self.assertRaises(ValueError, modulegraph._eval_str_tuple, "")
-        self.assertRaises(ValueError, modulegraph._eval_str_tuple, "'a'")
-        self.assertRaises(ValueError, modulegraph._eval_str_tuple, "'a', 'b'")
-        self.assertRaises(ValueError, modulegraph._eval_str_tuple, "('a', ('b', 'c'))")
-        self.assertRaises(ValueError, modulegraph._eval_str_tuple, "('a', ('b\", 'c'))")
-
-    def test_namespace_package_path(self):
-        class DS (object):
-            def __init__(self, path, namespace_packages=None):
-                self.location = path
-                self._namespace_packages = namespace_packages
-
-            def has_metadata(self, key):
-                if key == 'namespace_packages.txt':
-                    return self._namespace_packages is not None
-
-                raise ValueError("invalid lookup key")
-
-            def get_metadata(self, key):
-                if key == 'namespace_packages.txt':
-                    if self._namespace_packages is None:
-                        raise ValueError("no file")
-
-                    return self._namespace_packages
-
-                raise ValueError("invalid lookup key")
-
-        class WS (object):
-            def __init__(self, path=None):
-                pass
-
-            def __iter__(self):
-                yield DS("/pkg/pkg1")
-                yield DS("/pkg/pkg2", "foo\n")
-                yield DS("/pkg/pkg3", "bar.baz\n")
-                yield DS("/pkg/pkg4", "foobar\nfoo\n")
-
-        saved_ws = pkg_resources.WorkingSet
-        try:
-            pkg_resources.WorkingSet = WS
-
-            self.assertEqual(modulegraph._namespace_package_path("sys", ["appdir/pkg"]), ["appdir/pkg"])
-            self.assertEqual(modulegraph._namespace_package_path("foo", ["appdir/pkg"]), ["appdir/pkg", "/pkg/pkg2/foo", "/pkg/pkg4/foo"])
-            self.assertEqual(modulegraph._namespace_package_path("bar.baz", ["appdir/pkg"]), ["appdir/pkg", "/pkg/pkg3/bar/baz"])
-
-        finally:
-            pkg_resources.WorkingSet = saved_ws
-
-    def test_os_listdir(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)), 'testdata')
-
-        self.assertEqual(modulegraph.os_listdir('/etc/'), os.listdir('/etc'))
-        self.assertRaises(IOError, modulegraph.os_listdir, '/etc/hosts/foobar')
-        self.assertRaises(IOError, modulegraph.os_listdir, os.path.join(root, 'test.egg', 'bar'))
-
-        self.assertEqual(list(sorted(modulegraph.os_listdir(os.path.join(root, 'test.egg', 'foo')))),
-            [ 'bar', 'bar.txt', 'baz.txt' ])
-
-    def test_code_to_file(self):
-        try:
-            code = modulegraph._code_to_file.__code__
-        except AttributeError:
-            code = modulegraph._code_to_file.func_code
-
-        data = modulegraph._code_to_file(code)
-        self.assertTrue(hasattr(data, 'read'))
-
-        content = data.read()
-        self.assertIsInstance(content, bytes)
-        data.close()
-
-    def test_find_module(self):
-        for path in ('syspath', 'syspath.zip', 'syspath.egg'):
-            path = os.path.join(os.path.dirname(TESTDATA), path)
-            if os.path.exists(os.path.join(path, 'mymodule.pyc')):
-                os.unlink(os.path.join(path, 'mymodule.pyc'))
-
-            # Plain module
-            info = modulegraph.find_module('mymodule', path=[path] + sys.path)
-
-            fp = info[0]
-            filename = info[1]
-            description = info[2]
-
-            self.assertTrue(hasattr(fp, 'read'))
-
-            if path.endswith('.zip') or path.endswith('.egg'):
-                # Zip importers may precompile
-                if filename.endswith('.py'):
-                    self.assertEqual(filename, os.path.join(path, 'mymodule.py'))
-                    self.assertEqual(description, ('.py', 'rU', imp.PY_SOURCE))
-
-                else:
-                    self.assertEqual(filename, os.path.join(path, 'mymodule.pyc'))
-                    self.assertEqual(description, ('.pyc', 'rb', imp.PY_COMPILED))
-
-            else:
-                self.assertEqual(filename, os.path.join(path, 'mymodule.py'))
-                self.assertEqual(description, ('.py', 'rU', imp.PY_SOURCE))
-
-            # Compiled plain module, no source
-            if path.endswith('.zip') or path.endswith('.egg'):
-                self.assertRaises(ImportError, modulegraph.find_module, 'mymodule2', path=[path] + sys.path)
-
-            else:
-                info = modulegraph.find_module('mymodule2', path=[path] + sys.path)
-
-                fp = info[0]
-                filename = info[1]
-                description = info[2]
-
-                self.assertTrue(hasattr(fp, 'read'))
-                self.assertEqual(filename, os.path.join(path, 'mymodule2.pyc'))
-                self.assertEqual(description, ('.pyc', 'rb', imp.PY_COMPILED))
-
-                fp.close()
-
-            # Compiled plain module, with source
-#            info = modulegraph.find_module('mymodule3', path=[path] + sys.path)
-#
-#            fp = info[0]
-#            filename = info[1]
-#            description = info[2]
-#
-#            self.assertTrue(hasattr(fp, 'read'))
-#
-#            if sys.version_info[:2] >= (3,2):
-#                self.assertEqual(filename, os.path.join(path, '__pycache__', 'mymodule3.cpython-32.pyc'))
-#            else:
-#                self.assertEqual(filename, os.path.join(path, 'mymodule3.pyc'))
-#            self.assertEqual(description, ('.pyc', 'rb', imp.PY_COMPILED))
-
-
-            # Package
-            info = modulegraph.find_module('mypkg', path=[path] + sys.path)
-            fp = info[0]
-            filename = info[1]
-            description = info[2]
-
-            self.assertEqual(fp, None)
-            self.assertEqual(filename, os.path.join(path, 'mypkg'))
-            self.assertEqual(description, ('', '', imp.PKG_DIRECTORY))
-
-            # Extension
-            if path.endswith('.zip'):
-                self.assertRaises(ImportError, modulegraph.find_module, 'myext', path=[path] + sys.path)
-
-            else:
-                info = modulegraph.find_module('myext', path=[path] + sys.path)
-                fp = info[0]
-                filename = info[1]
-                description = info[2]
-
-                if sys.platform == 'win32':
-                    ext = '.pyd'
-                else:
-                    # This is a ly, but is good enough for now
-                    ext = '.so'
-
-                self.assertEqual(filename, os.path.join(path, 'myext' + ext))
-                self.assertEqual(description, (ext, 'rb', imp.C_EXTENSION))
-                self.assertEqual(fp, None)
-
-    def test_moduleInfoForPath(self):
-        self.assertEqual(modulegraph.moduleInfoForPath("/somewhere/else/file.txt"), None)
-
-        info = modulegraph.moduleInfoForPath("/somewhere/else/file.py")
-        self.assertEqual(info[0], "file")
-        if sys.version_info[:2] >= (3, 4):
-            self.assertEqual(info[1], "r")
-        else:
-            self.assertEqual(info[1], "U")
-        self.assertEqual(info[2], imp.PY_SOURCE)
-
-        info = modulegraph.moduleInfoForPath("/somewhere/else/file.pyc")
-        self.assertEqual(info[0], "file")
-        self.assertEqual(info[1], "rb")
-        self.assertEqual(info[2], imp.PY_COMPILED)
-
-        if sys.platform in ('darwin', 'linux2'):
-            info = modulegraph.moduleInfoForPath("/somewhere/else/file.so")
-            self.assertEqual(info[0], "file")
-            self.assertEqual(info[1], "rb")
-            self.assertEqual(info[2], imp.C_EXTENSION)
-
-        elif sys.platform in ('win32',):
-            info = modulegraph.moduleInfoForPath("/somewhere/else/file.pyd")
-            self.assertEqual(info[0], "file")
-            self.assertEqual(info[1], "rb")
-            self.assertEqual(info[2], imp.C_EXTENSION)
-
-    if sys.version_info[:2] > (2, 5):
-        exec(textwrap.dedent('''\
-            def test_deprecated(self):
-                saved_add = modulegraph.addPackagePath
-                saved_replace = modulegraph.replacePackage
-                try:
-                    called = []
-
-                    def log_add(*args, **kwds):
-                        called.append(('add', args, kwds))
-                    def log_replace(*args, **kwds):
-                        called.append(('replace', args, kwds))
-
-                    modulegraph.addPackagePath = log_add
-                    modulegraph.replacePackage = log_replace
-
-                    with warnings.catch_warnings(record=True) as w:
-                        warnings.simplefilter("always")
-                        modulegraph.ReplacePackage('a', 'b')
-                        modulegraph.AddPackagePath('c', 'd')
-
-                    self.assertEqual(len(w), 2)
-                    self.assertTrue(w[-1].category is DeprecationWarning)
-                    self.assertTrue(w[-2].category is DeprecationWarning)
-
-                    self.assertEqual(called, [
-                        ('replace', ('a', 'b'), {}),
-                        ('add', ('c', 'd'), {}),
-                    ])
-
-                finally:
-                    modulegraph.addPackagePath = saved_add
-                    modulegraph.replacePackage = saved_replace
-            '''), locals(), globals())
-
-    def test_addPackage(self):
-        saved = modulegraph._packagePathMap
-        self.assertIsInstance(saved, dict)
-        try:
-            modulegraph._packagePathMap = {}
-
-            modulegraph.addPackagePath('foo', 'a')
-            self.assertEqual(modulegraph._packagePathMap, { 'foo': ['a'] })
-
-            modulegraph.addPackagePath('foo', 'b')
-            self.assertEqual(modulegraph._packagePathMap, { 'foo': ['a', 'b'] })
-
-            modulegraph.addPackagePath('bar', 'b')
-            self.assertEqual(modulegraph._packagePathMap, { 'foo': ['a', 'b'], 'bar': ['b'] })
-
-        finally:
-            modulegraph._packagePathMap = saved
-
-
-    def test_replacePackage(self):
-        saved = modulegraph._replacePackageMap
-        self.assertIsInstance(saved, dict)
-        try:
-            modulegraph._replacePackageMap = {}
-
-            modulegraph.replacePackage("a", "b")
-            self.assertEqual(modulegraph._replacePackageMap, {"a": "b"})
-            modulegraph.replacePackage("a", "c")
-            self.assertEqual(modulegraph._replacePackageMap, {"a": "c"})
-            modulegraph.replacePackage("b", "c")
-            self.assertEqual(modulegraph._replacePackageMap, {"a": "c", 'b': 'c'})
-
-        finally:
-            modulegraph._replacePackageMap = saved
-
-class TestNode (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, obj, types):
-            self.assertTrue(isinstance(obj, types), '%r is not instance of %r'%(obj, types))
-    def testBasicAttributes(self):
-        n = modulegraph.Node("foobar.xyz")
-        self.assertIsInstance(n.debug, int)
-        self.assertEqual(n.identifier, n.graphident)
-        self.assertEqual(n.identifier, 'foobar.xyz')
-        self.assertEqual(n.filename, None)
-        self.assertEqual(n.packagepath, None)
-        self.assertEqual(n.code, None)
-        self.assertEqual(n.globalnames, set())
-        self.assertEqual(n.starimports, set())
-
-    def testMapping(self):
-        n = modulegraph.Node("foobar.xyz")
-        self.assertEqual(n._namespace, {})
-
-        self.assertFalse('foo' in n)
-        self.assertRaises(KeyError, n.__getitem__, 'foo')
-        self.assertEqual(n.get('foo'), None)
-        self.assertEqual(n.get('foo', 'a'), 'a')
-        n['foo'] = 42
-        self.assertEqual(n['foo'], 42)
-        self.assertTrue('foo' in n)
-        self.assertEqual(n._namespace, {'foo':42})
-
-    def testOrder(self):
-        n1 = modulegraph.Node("n1")
-        n2 = modulegraph.Node("n2")
-
-        self.assertTrue(n1 < n2)
-        self.assertFalse(n2 < n1)
-        self.assertTrue(n1 <= n1)
-        self.assertFalse(n1 == n2)
-        self.assertTrue(n1 == n1)
-        self.assertTrue(n1 != n2)
-        self.assertFalse(n1 != n1)
-        self.assertTrue(n2 > n1)
-        self.assertFalse(n1 > n2)
-        self.assertTrue(n1 >= n1)
-        self.assertTrue(n2 >= n1)
-
-    def testHashing(self):
-        n1a = modulegraph.Node('n1')
-        n1b = modulegraph.Node('n1')
-        n2 = modulegraph.Node('n2')
-
-        d = {}
-        d[n1a] = 'n1'
-        d[n2] = 'n2'
-        self.assertEqual(d[n1b], 'n1')
-        self.assertEqual(d[n2], 'n2')
-
-    def test_infoTuple(self):
-        n = modulegraph.Node('n1')
-        self.assertEqual(n.infoTuple(), ('n1',))
-
-    def assertNoMethods(self, klass):
-        d = dict(klass.__dict__)
-        del d['__doc__']
-        del d['__module__']
-        if '__qualname__' in d:
-            # New in Python 3.3
-            del d['__qualname__']
-        if '__dict__' in d:
-            # New in Python 3.4
-            del d['__dict__']
-        self.assertEqual(d, {})
-
-    def assertHasExactMethods(self, klass, *methods):
-        d = dict(klass.__dict__)
-        del d['__doc__']
-        del d['__module__']
-        if '__qualname__' in d:
-            # New in Python 3.3
-            del d['__qualname__']
-        if '__dict__' in d:
-            # New in Python 3.4
-            del d['__dict__']
-
-        for nm in methods:
-            self.assertTrue(nm in d, "%s doesn't have attribute %r"%(klass, nm))
-            del d[nm]
-
-        self.assertEqual(d, {})
-
-
-    if not hasattr(unittest.TestCase, 'assertIsSubclass'):
-        def assertIsSubclass(self, cls1, cls2, message=None):
-            self.assertTrue(issubclass(cls1, cls2),
-                    message or "%r is not a subclass of %r"%(cls1, cls2))
-
-    def test_subclasses(self):
-        self.assertIsSubclass(modulegraph.AliasNode, modulegraph.Node)
-        self.assertIsSubclass(modulegraph.Script, modulegraph.Node)
-        self.assertIsSubclass(modulegraph.BadModule, modulegraph.Node)
-        self.assertIsSubclass(modulegraph.ExcludedModule, modulegraph.BadModule)
-        self.assertIsSubclass(modulegraph.MissingModule, modulegraph.BadModule)
-        self.assertIsSubclass(modulegraph.BaseModule, modulegraph.Node)
-        self.assertIsSubclass(modulegraph.BuiltinModule, modulegraph.BaseModule)
-        self.assertIsSubclass(modulegraph.SourceModule, modulegraph.BaseModule)
-        self.assertIsSubclass(modulegraph.CompiledModule, modulegraph.BaseModule)
-        self.assertIsSubclass(modulegraph.Package, modulegraph.BaseModule)
-        self.assertIsSubclass(modulegraph.Extension, modulegraph.BaseModule)
-
-        # These classes have no new functionality, check that no code
-        # got added:
-        self.assertNoMethods(modulegraph.BadModule)
-        self.assertNoMethods(modulegraph.ExcludedModule)
-        self.assertNoMethods(modulegraph.MissingModule)
-        self.assertNoMethods(modulegraph.BuiltinModule)
-        self.assertNoMethods(modulegraph.SourceModule)
-        self.assertNoMethods(modulegraph.CompiledModule)
-        self.assertNoMethods(modulegraph.Package)
-        self.assertNoMethods(modulegraph.Extension)
-
-        # AliasNode is basicly a clone of an existing node
-        self.assertHasExactMethods(modulegraph.Script, '__init__', 'infoTuple')
-        n1 = modulegraph.Node('n1')
-        n1.packagepath = ['a', 'b']
-
-        a1 = modulegraph.AliasNode('a1', n1)
-        self.assertEqual(a1.graphident, 'a1')
-        self.assertEqual(a1.identifier, 'n1')
-        self.assertTrue(a1.packagepath is n1.packagepath)
-        self.assertTrue(a1._namespace is n1._namespace)
-        self.assertTrue(a1.globalnames is n1.globalnames)
-        self.assertTrue(a1.starimports is n1.starimports)
-
-        v = a1.infoTuple()
-        self.assertEqual(v, ('a1', 'n1'))
-
-        # Scripts have a filename
-        self.assertHasExactMethods(modulegraph.Script, '__init__', 'infoTuple')
-        s1 = modulegraph.Script('do_import')
-        self.assertEqual(s1.graphident, 'do_import')
-        self.assertEqual(s1.identifier, 'do_import')
-        self.assertEqual(s1.filename, 'do_import')
-
-        v = s1.infoTuple()
-        self.assertEqual(v, ('do_import',))
-
-        # BaseModule adds some attributes and a custom infotuple
-        self.assertHasExactMethods(modulegraph.BaseModule, '__init__', 'infoTuple')
-        m1 = modulegraph.BaseModule('foo')
-        self.assertEqual(m1.graphident, 'foo')
-        self.assertEqual(m1.identifier, 'foo')
-        self.assertEqual(m1.filename, None)
-        self.assertEqual(m1.packagepath, None)
-
-        m1 = modulegraph.BaseModule('foo', 'bar',  ['a'])
-        self.assertEqual(m1.graphident, 'foo')
-        self.assertEqual(m1.identifier, 'foo')
-        self.assertEqual(m1.filename, 'bar')
-        self.assertEqual(m1.packagepath, ['a'])
-
-class TestModuleGraph (unittest.TestCase):
-    # Test for class modulegraph.modulegraph.ModuleGraph
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, obj, types):
-            self.assertTrue(isinstance(obj, types), '%r is not instance of %r'%(obj, types))
-
-    def test_constructor(self):
-        o = modulegraph.ModuleGraph()
-        self.assertTrue(o.path is sys.path)
-        self.assertEqual(o.lazynodes, {})
-        self.assertEqual(o.replace_paths, ())
-        self.assertEqual(o.debug, 0)
-
-        # Stricter tests would be nice, but that requires
-        # better control over what's on sys.path
-        self.assertIsInstance(o.nspackages, dict)
-
-        g = Graph.Graph()
-        o = modulegraph.ModuleGraph(['a', 'b', 'c'], ['modA'], [
-                ('fromA', 'toB'), ('fromC', 'toD')],
-                {
-                    'modA': ['modB', 'modC'],
-                    'modC': ['modE', 'modF'],
-                }, g, 1)
-        self.assertEqual(o.path, ['a', 'b', 'c'])
-        self.assertEqual(o.lazynodes, {
-            'modA': None,
-            'modC': ['modE', 'modF'],
-        })
-        self.assertEqual(o.replace_paths, [('fromA', 'toB'), ('fromC', 'toD')])
-        self.assertEqual(o.nspackages, {})
-        self.assertTrue(o.graph is g)
-        self.assertEqual(o.debug, 1)
-
-    def test_calc_setuptools_nspackages(self):
-        stdlib = [ fn for fn in sys.path if fn.startswith(sys.prefix) and 'site-packages' not in fn ]
-        for subdir in [ nm for nm in os.listdir(TESTDATA) if nm != 'src' ]:
-            graph = modulegraph.ModuleGraph(path=[
-                    os.path.join(TESTDATA, subdir, "parent"),
-                    os.path.join(TESTDATA, subdir, "child"),
-                ] + stdlib)
-
-            pkgs = graph.nspackages
-            self.assertTrue('namedpkg' in pkgs)
-            self.assertEqual(set(pkgs['namedpkg']),
-                    {
-                        os.path.join(TESTDATA, subdir, "parent", "namedpkg"),
-                        os.path.join(TESTDATA, subdir, "child", "namedpkg"),
-                    })
-            self.assertFalse(os.path.exists(os.path.join(TESTDATA, subdir, "parent", "namedpkg", "__init__.py")))
-            self.assertFalse(os.path.exists(os.path.join(TESTDATA, subdir, "child", "namedpkg", "__init__.py")))
-
-    def testImpliedReference(self):
-        graph = modulegraph.ModuleGraph()
-
-        record = []
-        def import_hook(*args):
-            record.append(('import_hook',) + args)
-            return [graph.createNode(modulegraph.Node, args[0])]
-
-        def _safe_import_hook(*args):
-            record.append(('_safe_import_hook',) + args)
-            return [graph.createNode(modulegraph.Node, args[0])]
-
-        graph.import_hook = import_hook
-        graph._safe_import_hook = _safe_import_hook
-
-        n1 = graph.createNode(modulegraph.Node, 'n1')
-        n2 = graph.createNode(modulegraph.Node, 'n2')
-
-        graph.implyNodeReference(n1, n2)
-        outs, ins = map(list, graph.get_edges(n1))
-        self.assertEqual(outs, [n2])
-        self.assertEqual(ins, [])
-
-        self.assertEqual(record, [])
-
-        graph.implyNodeReference(n2, "n3")
-        n3 = graph.findNode('n3')
-        outs, ins = map(list, graph.get_edges(n2))
-        self.assertEqual(outs, [n3])
-        self.assertEqual(ins, [n1])
-        self.assertEqual(record, [
-            ('_safe_import_hook', 'n3', n2, None)
-        ])
-
-
-
-    @expectedFailure
-    def test_findNode(self):
-        self.fail("findNode")
-
-    def test_run_script(self):
-        script = os.path.join(os.path.dirname(TESTDATA), 'script')
-
-        graph = modulegraph.ModuleGraph()
-        master = graph.createNode(modulegraph.Node, 'root')
-        m = graph.run_script(script, master)
-        self.assertEqual(list(graph.get_edges(master)[0])[0], m)
-        self.assertEqual(set(graph.get_edges(m)[0]), {
-            graph.findNode('sys'),
-            graph.findNode('os'),
-        })
-
-    @expectedFailure
-    def test_import_hook(self):
-        self.fail("import_hook")
-
-    def test_determine_parent(self):
-        graph = modulegraph.ModuleGraph()
-        graph.import_hook('os.path', None)
-        graph.import_hook('idlelib', None)
-        graph.import_hook('xml.dom', None)
-
-        for node in graph.nodes():
-            if isinstance(node, modulegraph.Package):
-                break
-        else:
-            self.fail("No package located, should have at least 'os'")
-
-        self.assertIsInstance(node, modulegraph.Package)
-        parent = graph._determine_parent(node)
-        self.assertEqual(parent.identifier, node.identifier)
-        self.assertEqual(parent, graph.findNode(node.identifier))
-        self.assertTrue(isinstance(parent, modulegraph.Package))
-
-        # XXX: Might be a usecase for some odd code in determine_parent...
-        #node = modulegraph.Package('encodings')
-        #node.packagepath = parent.packagepath
-        #m = graph._determine_parent(node)
-        #self.assertTrue(m is parent)
-
-        m = graph.findNode('xml')
-        self.assertEqual(graph._determine_parent(m), m)
-
-        m = graph.findNode('xml.dom')
-        self.assertEqual(graph._determine_parent(m), graph.findNode('xml.dom'))
-
-
-    @expectedFailure
-    def test_find_head_package(self):
-        self.fail("find_head_package")
-
-    def test_load_tail(self):
-        # XXX: This test is dodgy!
-        graph = modulegraph.ModuleGraph()
-
-        record = []
-        def _import_module(partname, fqname, parent):
-            record.append((partname, fqname, parent))
-            if partname == 'raises' or '.raises.' in fqname:
-                return None
-            return modulegraph.Node(fqname)
-
-        graph._import_module = _import_module
-
-        record = []
-        root = modulegraph.Node('root')
-        m = graph._load_tail(root, '')
-        self.assertTrue(m is root)
-        self.assertEqual(record, [
-            ])
-
-        record = []
-        root = modulegraph.Node('root')
-        m = graph._load_tail(root, 'sub')
-        self.assertFalse(m is root)
-        self.assertEqual(record, [
-                ('sub', 'root.sub', root),
-            ])
-
-        record = []
-        root = modulegraph.Node('root')
-        m = graph._load_tail(root, 'sub.sub1')
-        self.assertFalse(m is root)
-        node = modulegraph.Node('root.sub')
-        self.assertEqual(record, [
-                ('sub', 'root.sub', root),
-                ('sub1', 'root.sub.sub1', node),
-            ])
-
-        record = []
-        root = modulegraph.Node('root')
-        m = graph._load_tail(root, 'sub.sub1.sub2')
-        self.assertFalse(m is root)
-        node = modulegraph.Node('root.sub')
-        node2 = modulegraph.Node('root.sub.sub1')
-        self.assertEqual(record, [
-                ('sub', 'root.sub', root),
-                ('sub1', 'root.sub.sub1', node),
-                ('sub2', 'root.sub.sub1.sub2', node2),
-            ])
-
-        n = graph._load_tail(root, 'raises')
-        self.assertIsInstance(n, modulegraph.MissingModule)
-        self.assertEqual(n.identifier, 'root.raises')
-
-        n = graph._load_tail(root, 'sub.raises')
-        self.assertIsInstance(n, modulegraph.MissingModule)
-        self.assertEqual(n.identifier, 'root.sub.raises')
-
-        n = graph._load_tail(root, 'sub.raises.sub')
-        self.assertIsInstance(n, modulegraph.MissingModule)
-        self.assertEqual(n.identifier, 'root.sub.raises.sub')
-
-
-
-    @expectedFailure
-    def test_ensure_fromlist(self):
-        # 1. basic 'from module import name, name'
-        # 2. 'from module import *'
-        # 3. from module import os
-        #    (where 'os' is not a name in 'module',
-        #     should create MissingModule node, and
-        #     should *not* refer to the global os)
-        self.fail("ensure_fromlist")
-
-    @expectedFailure
-    def test_find_all_submodules(self):
-        # 1. basic
-        # 2. no packagepath (basic module)
-        # 3. extensions, python modules
-        # 4. with/without zipfile
-        # 5. files that aren't python modules/extensions
-        self.fail("find_all_submodules")
-
-    @expectedFailure
-    def test_import_module(self):
-        self.fail("import_module")
-
-    @expectedFailure
-    def test_load_module(self):
-        self.fail("load_module")
-
-    @expectedFailure
-    def test_safe_import_hook(self):
-        self.fail("safe_import_hook")
-
-    @expectedFailure
-    def test_scan_code(self):
-        mod = modulegraph.Node('root')
-
-        graph = modulegraph.ModuleGraph()
-        code = compile('', '<test>', 'exec', 0, False)
-        graph.scan_code(code, mod)
-        self.assertEqual(list(graph.nodes()), [])
-
-        node_map = {}
-        def _safe_import(name, mod, fromlist, level):
-            if name in node_map:
-                node = node_map[name]
-            else:
-                node = modulegraph.Node(name)
-            node_map[name] = node
-            return [node]
-
-        graph = modulegraph.ModuleGraph()
-        graph._safe_import_hook = _safe_import
-
-        code = compile(textwrap.dedent('''\
-            import sys
-            import os.path
-
-            def testfunc():
-                import shutil
-            '''), '<test>', 'exec', 0, False)
-        graph.scan_code(code, mod)
-        modules = [node.identifier for node in graph.nodes()]
-        self.assertEqual(set(node_map), {'sys', 'os.path', 'shutil'})
-
-
-        # from module import a, b, c
-        # from module import *
-        #  both:
-        #   -> with/without globals
-        #   -> with/without modules in globals (e.g,
-        #       from os import * adds dependency to os.path)
-        # from .module import a
-        # from ..module import a
-        #   -> check levels
-        # import name
-        # import a.b
-        #   -> should add dependency to a
-        # try to build case where commented out
-        # code would behave different than current code
-        # (Carbon.SomeMod contains 'import Sibling' seems
-        # to cause difference in real code)
-
-        self.fail("actual test needed")
-
-
-
-    @expectedFailure
-    def test_load_package(self):
-        self.fail("load_package")
-
-    def test_find_module(self):
-        record = []
-        def mock_finder(name, path):
-            record.append((name, path))
-            return saved_finder(name, path)
-
-        saved_finder = modulegraph.find_module
-        try:
-            modulegraph.find_module = mock_finder
-
-            graph = modulegraph.ModuleGraph()
-            m = graph._find_module('sys', None)
-            self.assertEqual(record, [])
-            self.assertEqual(m, (None, None, ("", "", imp.C_BUILTIN)))
-
-            modulegraph.find_module = saved_finder
-            xml = graph.import_hook("xml")[0]
-            self.assertEqual(xml.identifier, 'xml')
-            modulegraph.find_module = mock_finder
-
-            self.assertRaises(ImportError, graph._find_module, 'xml', None)
-
-            self.assertEqual(record, [])
-            m = graph._find_module('shutil', None)
-            self.assertEqual(record, [
-                ('shutil', graph.path),
-            ])
-            self.assertTrue(isinstance(m, tuple))
-            self.assertEqual(len(m), 3)
-            self.assertTrue(hasattr(m[0], 'read'))
-            self.assertIsInstance(m[0].read(), str)
-            srcfn = shutil.__file__
-            if srcfn.endswith('.pyc'):
-                srcfn = srcfn[:-1]
-            self.assertEqual(m[1], srcfn)
-            self.assertEqual(m[2], ('.py', 'rU', imp.PY_SOURCE))
-            m[0].close()
-
-            m2 = graph._find_module('shutil', None)
-            self.assertEqual(m[1:], m2[1:])
-            m2[0].close()
-
-
-            record[:] = []
-            m = graph._find_module('sax', xml.packagepath, xml)
-            self.assertEqual(m,
-                    (None, os.path.join(os.path.dirname(xml.filename), 'sax'),
-                    ('', '', imp.PKG_DIRECTORY)))
-            self.assertEqual(record, [
-                ('sax', xml.packagepath),
-            ])
-            if m[0] is not None: m[0].close()
-
-        finally:
-            modulegraph.find_module = saved_finder
-
-    @expectedFailure
-    def test_create_xref(self):
-        self.fail("create_xref")
-
-    @expectedFailure
-    def test_itergraphreport(self):
-        self.fail("itergraphreport")
-
-    def test_report(self):
-        graph = modulegraph.ModuleGraph()
-
-        saved_stdout = sys.stdout
-        try:
-            fp = sys.stdout = StringIO()
-            graph.report()
-            lines = fp.getvalue().splitlines()
-            fp.close()
-
-            self.assertEqual(len(lines), 3)
-            self.assertEqual(lines[0], '')
-            self.assertEqual(lines[1], 'Class           Name                      File')
-            self.assertEqual(lines[2], '-----           ----                      ----')
-
-            fp = sys.stdout = StringIO()
-            graph._safe_import_hook('os', None, ())
-            graph._safe_import_hook('sys', None, ())
-            graph._safe_import_hook('nomod', None, ())
-            graph.report()
-            lines = fp.getvalue().splitlines()
-            fp.close()
-
-            self.assertEqual(lines[0], '')
-            self.assertEqual(lines[1], 'Class           Name                      File')
-            self.assertEqual(lines[2], '-----           ----                      ----')
-            expected = []
-            for n in graph.flatten():
-                if n.filename:
-                    expected.append([type(n).__name__, n.identifier, n.filename])
-                else:
-                    expected.append([type(n).__name__, n.identifier])
-
-            expected.sort()
-            actual = sorted([item.split() for item in lines[3:]])
-            self.assertEqual(expected, actual)
-
-
-        finally:
-            sys.stdout = saved_stdout
-
-    def test_graphreport(self):
-
-        def my_iter(flatpackages="packages"):
-            yield "line1\n"
-            yield str(flatpackages) + "\n"
-            yield "line2\n"
-
-        graph = modulegraph.ModuleGraph()
-        graph.itergraphreport = my_iter
-
-        fp = StringIO()
-        graph.graphreport(fp)
-        self.assertEqual(fp.getvalue(), "line1\n()\nline2\n")
-
-        fp = StringIO()
-        graph.graphreport(fp, "deps")
-        self.assertEqual(fp.getvalue(), "line1\ndeps\nline2\n")
-
-        saved_stdout = sys.stdout
-        try:
-            sys.stdout = fp = StringIO()
-            graph.graphreport()
-            self.assertEqual(fp.getvalue(), "line1\n()\nline2\n")
-
-        finally:
-            sys.stdout = saved_stdout
-
-
-    def test_replace_paths_in_code(self):
-        graph = modulegraph.ModuleGraph(replace_paths=[
-                ('path1', 'path2'),
-                ('path3/path5', 'path4'),
-            ])
-
-        co = compile(textwrap.dedent("""
-        [x for x in range(4)]
-        """), "path4/index.py", 'exec', 0, 1)
-        co = graph._replace_paths_in_code(co)
-        self.assertEqual(co.co_filename, 'path4/index.py')
-
-        co = compile(textwrap.dedent("""
-        [x for x in range(4)]
-        (x for x in range(4))
-        """), "path1/index.py", 'exec', 0, 1)
-        self.assertEqual(co.co_filename, 'path1/index.py')
-        co = graph._replace_paths_in_code(co)
-        self.assertEqual(co.co_filename, 'path2/index.py')
-        for c in co.co_consts:
-            if isinstance(c, type(co)):
-                self.assertEqual(c.co_filename, 'path2/index.py')
-
-        co = compile(textwrap.dedent("""
-        [x for x in range(4)]
-        """), "path3/path4/index.py", 'exec', 0, 1)
-        co = graph._replace_paths_in_code(co)
-        self.assertEqual(co.co_filename, 'path3/path4/index.py')
-
-        co = compile(textwrap.dedent("""
-        [x for x in range(4)]
-        """), "path3/path5.py", 'exec', 0, 1)
-        co = graph._replace_paths_in_code(co)
-        self.assertEqual(co.co_filename, 'path3/path5.py')
-
-        co = compile(textwrap.dedent("""
-        [x for x in range(4)]
-        """), "path3/path5/index.py", 'exec', 0, 1)
-        co = graph._replace_paths_in_code(co)
-        self.assertEqual(co.co_filename, 'path4/index.py')
-
-    def test_createReference(self):
-        graph = modulegraph.ModuleGraph()
-        n1 = modulegraph.Node('n1')
-        n2 = modulegraph.Node('n2')
-        graph.addNode(n1)
-        graph.addNode(n2)
-
-        graph.createReference(n1, n2)
-        outs, ins = map(list, graph.get_edges(n1))
-        self.assertEqual(outs, [n2])
-        self.assertEqual(ins, [])
-        outs, ins = map(list, graph.get_edges(n2))
-        self.assertEqual(outs, [])
-        self.assertEqual(ins, [n1])
-
-        e = graph.graph.edge_by_node('n1', 'n2')
-        self.assertIsInstance(e, int)
-        self.assertEqual(graph.graph.edge_data(e), 'direct')
-
-    def test_create_xref(self):
-        # XXX: This test is far from optimal, it just ensures
-        # that all code is exercised to catch small bugs and
-        # py3k issues without verifying that the code actually
-        # works....
-        graph = modulegraph.ModuleGraph()
-        if __file__.endswith('.py'):
-            graph.run_script(__file__)
-        else:
-            graph.run_script(__file__[:-1])
-
-        graph.import_hook('os')
-        graph.import_hook('xml.etree')
-        graph.import_hook('unittest')
-
-        fp = StringIO()
-        graph.create_xref(out=fp)
-
-        data = fp.getvalue()
-        r = ET.fromstring(data)
-
-    def test_itergraphreport(self):
-        # XXX: This test is far from optimal, it just ensures
-        # that all code is exercised to catch small bugs and
-        # py3k issues without verifying that the code actually
-        # works....
-        graph = modulegraph.ModuleGraph()
-        if __file__.endswith('.py'):
-            graph.run_script(__file__)
-        else:
-            graph.run_script(__file__[:-1])
-        graph.import_hook('os')
-        graph.import_hook('xml.etree')
-        graph.import_hook('unittest')
-        graph.import_hook('distutils.command.build')
-
-        fp = StringIO()
-        list(graph.itergraphreport())
-
-        # XXX: platpackages isn't implemented, and is undocumented hence
-        # it is unclear what this is inteded to be...
-        #list(graph.itergraphreport(flatpackages=...))
-
-
-
-
-class CompatTests (unittest.TestCase):
-    def test_Bchr(self):
-        v = modulegraph._Bchr(ord('A'))
-        if sys.version_info[0] == 2:
-            self.assertTrue(isinstance(v, bytes))
-            self.assertEqual(v, b'A')
-        else:
-            self.assertTrue(isinstance(v, int))
-            self.assertEqual(v, ord('A'))
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_pep420_nspkg.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_pep420_nspkg.py
deleted file mode 100644
index 538e2d0..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_pep420_nspkg.py
+++ /dev/null
@@ -1,222 +0,0 @@
-"""
-Tests that deal with pep420 namespace packages.
-
-PEP 420 is new in Python 3.3
-"""
-from __future__ import print_function
-from __future__ import absolute_import
-import os
-import shutil
-import sys
-import subprocess
-import textwrap
-
-if sys.version_info[:2] <= (2, 6):
-    import unittest2 as unittest
-else:
-    import unittest
-
-from modulegraph import modulegraph
-
-gRootDir = os.path.dirname(os.path.abspath(__file__))
-gSrcDir = os.path.join(gRootDir, 'testpkg-pep420-namespace')
-
-if sys.version_info[:2] >= (3, 3):
-
-    class TestPythonBehaviour (unittest.TestCase):
-        def importModule(self, name):
-            test_dir1 = os.path.join(gSrcDir, 'path1')
-            test_dir2 = os.path.join(gSrcDir, 'path2')
-            if '.' in name:
-                script = textwrap.dedent("""\
-                    import site
-                    site.addsitedir(%r)
-                    site.addsitedir(%r)
-                    try:
-                        import %s
-                    except ImportError:
-                        import %s
-                    print (%s.__name__)
-                """) %(test_dir1, test_dir2, name, name.rsplit('.', 1)[0], name)
-            else:
-                script = textwrap.dedent("""\
-                    import site
-                    site.addsitedir(%r)
-                    site.addsitedir(%r)
-                    import %s
-                    print (%s.__name__)
-                """) %(test_dir1, test_dir2, name, name)
-
-            p = subprocess.Popen([sys.executable, '-c', script],
-                    stdout=subprocess.PIPE,
-                    stderr=subprocess.STDOUT,
-                    cwd=os.path.join(
-                        os.path.dirname(os.path.abspath(__file__)),
-                        'testpkg-relimport'),
-            )
-            data = p.communicate()[0]
-            if sys.version_info[0] != 2:
-                data = data.decode('UTF-8')
-            data = data.strip()
-            if data.endswith(' refs]'):
-                data = data.rsplit('\n', 1)[0].strip()
-
-            sts = p.wait()
-
-            if sts != 0:
-                print (data)
-                self.fail("import of %r failed"%(name,))
-
-            return data
-
-        def testToplevel(self):
-            m = self.importModule('package.sub1')
-            self.assertEqual(m, 'package.sub1')
-
-            m = self.importModule('package.sub2')
-            self.assertEqual(m, 'package.sub2')
-
-        def testSub(self):
-            m = self.importModule('package.subpackage.sub')
-            self.assertEqual(m, 'package.subpackage.sub')
-
-            m = self.importModule('package.nspkg.mod')
-            self.assertEqual(m, 'package.nspkg.mod')
-
-    class TestModuleGraphImport (unittest.TestCase):
-        if not hasattr(unittest.TestCase, 'assertIsInstance'):
-            def assertIsInstance(self, value, types):
-                if not isinstance(value, types):
-                    self.fail("%r is not an instance of %r", value, types)
-
-        def setUp(self):
-            self.mf = modulegraph.ModuleGraph(path=[
-                    os.path.join(gSrcDir, 'path1'),
-                    os.path.join(gSrcDir, 'path2'),
-                ] + sys.path)
-
-
-        def testRootPkg(self):
-            self.mf.import_hook('package')
-
-            node = self.mf.findNode('package')
-            self.assertIsInstance(node, modulegraph.NamespacePackage)
-            self.assertEqual(node.identifier, 'package')
-            self.assertEqual(node.filename, '-')
-
-        def testRootPkgModule(self):
-            self.mf.import_hook('package.sub1')
-
-            node = self.mf.findNode('package.sub1')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'package.sub1')
-
-            self.mf.import_hook('package.sub2')
-            node = self.mf.findNode('package.sub2')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'package.sub2')
-
-        def testSubRootPkgModule(self):
-            self.mf.import_hook('package.subpackage.sub')
-
-            node = self.mf.findNode('package.subpackage.sub')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'package.subpackage.sub')
-
-            node = self.mf.findNode('package')
-            self.assertIsInstance(node, modulegraph.NamespacePackage)
-
-            self.mf.import_hook('package.nspkg.mod')
-            node = self.mf.findNode('package.nspkg.mod')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-            self.assertEqual(node.identifier, 'package.nspkg.mod')
-
-else:
-    # Check that PEP 420 is not implemented in python 3.2 and earlier
-    # (and that modulegraph also doesn't do this)
-
-    class TestPythonBehaviour (unittest.TestCase):
-        def importModule(self, name):
-            test_dir1 = os.path.join(gSrcDir, 'path1')
-            test_dir2 = os.path.join(gSrcDir, 'path2')
-            if '.' in name:
-                script = textwrap.dedent("""\
-                    import site
-                    site.addsitedir(%r)
-                    site.addsitedir(%r)
-                    try:
-                        import %s
-                    except ImportError:
-                        import %s
-                    print (%s.__name__)
-                """) %(test_dir1, test_dir2, name, name.rsplit('.', 1)[0], name)
-            else:
-                script = textwrap.dedent("""\
-                    import site
-                    site.addsitedir(%r)
-                    site.addsitedir(%r)
-                    import %s
-                    print (%s.__name__)
-                """) %(test_dir1, test_dir2, name, name)
-
-            p = subprocess.Popen([sys.executable, '-c', script],
-                    stdout=subprocess.PIPE,
-                    stderr=subprocess.STDOUT,
-                    cwd=os.path.join(
-                        os.path.dirname(os.path.abspath(__file__)),
-                        'testpkg-relimport'),
-            )
-            data = p.communicate()[0]
-            if sys.version_info[0] != 2:
-                data = data.decode('UTF-8')
-            data = data.strip()
-            if data.endswith(' refs]'):
-                data = data.rsplit('\n', 1)[0].strip()
-
-            sts = p.wait()
-
-            if sts != 0:
-                raise ImportError(name)
-
-            return data
-
-        def testToplevel(self):
-            m = self.importModule('sys')
-            self.assertEqual(m, 'sys')
-
-            self.assertRaises(ImportError, self.importModule, 'package.sub1')
-            self.assertRaises(ImportError, self.importModule, 'package.sub2')
-
-        def testSub(self):
-            self.assertRaises(ImportError, self.importModule, 'package.subpackage.sub')
-
-    class TestModuleGraphImport (unittest.TestCase):
-        if not hasattr(unittest.TestCase, 'assertIsInstance'):
-            def assertIsInstance(self, value, types):
-                if not isinstance(value, types):
-                    self.fail("%r is not an instance of %r", value, types)
-
-        def setUp(self):
-            self.mf = modulegraph.ModuleGraph(path=[
-                    os.path.join(gSrcDir, 'path1'),
-                    os.path.join(gSrcDir, 'path2'),
-                ] + sys.path)
-
-
-        def testRootPkg(self):
-            self.assertRaises(ImportError, self.mf.import_hook, 'package')
-
-            node = self.mf.findNode('package')
-            self.assertIs(node, None)
-
-        def testRootPkgModule(self):
-            self.assertRaises(ImportError, self.mf.import_hook, 'package.sub1')
-
-            node = self.mf.findNode('package.sub1')
-            self.assertIs(node, None)
-
-            node = self.mf.findNode('package.sub2')
-            self.assertIs(node, None)
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_pycompat_pkg.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_pycompat_pkg.py
deleted file mode 100644
index 0852a76..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_pycompat_pkg.py
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Test for import machinery
-"""
-from __future__ import absolute_import
-import unittest
-import sys
-import textwrap
-import subprocess
-import os
-from modulegraph import modulegraph
-
-class TestModuleGraphImport (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def test_compat(self):
-        root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-compatmodule')
-        mf = modulegraph.ModuleGraph(path=[ root ] + sys.path)
-        mf.import_hook('pkg.api')
-
-        node = mf.findNode('pkg')
-        self.assertIsInstance(node, modulegraph.Package)
-
-        node = mf.findNode('pkg.api')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-
-        if sys.version_info[0] == 2:
-            node = mf.findNode('pkg.api2')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-
-            node = mf.findNode('pkg.api3')
-            self.assertIsInstance(node, modulegraph.InvalidSourceModule)
-
-            node = mf.findNode('http.client')
-            self.assertIs(node, None)
-
-            node = mf.findNode('urllib2')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-
-        else:
-            node = mf.findNode('pkg.api2')
-            self.assertIsInstance(node, modulegraph.InvalidSourceModule)
-
-            node = mf.findNode('pkg.api3')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-
-            node = mf.findNode('http.client')
-            self.assertIsInstance(node, modulegraph.SourceModule)
-
-            node = mf.findNode('urllib2')
-            self.assertIs(node, None)
-
-
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_relimport2.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_relimport2.py
deleted file mode 100644
index c11eb87..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_relimport2.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test for import machinery
-"""
-from __future__ import absolute_import
-import unittest
-import sys
-import textwrap
-import subprocess
-import os
-from modulegraph import modulegraph
-
-class TestModuleGraphImport (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r"%(value, types))
-
-    def setUp(self):
-        self.root = os.path.join(
-                os.path.dirname(os.path.abspath(__file__)),
-                'testpkg-relimport2')
-        self.mf = modulegraph.ModuleGraph(path=[ self.root ] + sys.path)
-
-
-    def test_init_as_script(self):
-        self.mf.run_script(os.path.join(self.root, 'pkg/__init__.py'))
-        n = self.mf.findNode('mod1')
-        self.assertIs(n, None)
-
-        n = self.mf.findNode('mod2')
-        self.assertIsInstance(n, modulegraph.MissingModule)
-
-    def test_subpkg_bad_import(self):
-        self.mf.import_hook('pkg.sub')
-
-        n = self.mf.findNode('toplevel')
-        self.assertIs(n, None)
-
-        n = self.mf.findNode('pkg.mod1')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-
-        n = self.mf.findNode('pkg.mod3')
-        self.assertIsInstance(n, modulegraph.SourceModule)
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_setuptools_nspkg.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_setuptools_nspkg.py
deleted file mode 100644
index 85b03ae..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_setuptools_nspkg.py
+++ /dev/null
@@ -1,149 +0,0 @@
-"""
-Tests that deal with setuptools namespace
-packages, and in particular the installation
-flavour used by pip
-"""
-from __future__ import print_function
-from __future__ import absolute_import
-import os
-import shutil
-import sys
-import subprocess
-import unittest
-import textwrap
-
-from modulegraph import modulegraph
-
-gRootDir = os.path.dirname(os.path.abspath(__file__))
-gSrcDir = os.path.join(gRootDir, 'testpkg-setuptools-namespace')
-
-def install_testpkg(test_dir):
-    p = subprocess.Popen([
-        sys.executable, 'setup.py', 'install',
-            '--install-lib', test_dir,
-            '--single-version-externally-managed',
-            '--record', os.path.join(test_dir, 'record.lst'),
-        ], cwd=gSrcDir, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-
-    data = p.communicate()[0]
-
-    exit = p.wait()
-    return exit
-
-
-class TestPythonBehaviour (unittest.TestCase):
-    def setUp(self):
-        test_dir = os.path.join(gRootDir, 'test.dir')
-        if os.path.exists(test_dir):
-            shutil.rmtree(test_dir)
-
-        os.mkdir(test_dir)
-        exit = install_testpkg(test_dir)
-        self.assertEqual(exit, 0)
-
-    def tearDown(self):
-        test_dir = os.path.join(gRootDir, 'test.dir')
-        if os.path.exists(test_dir):
-            shutil.rmtree(test_dir)
-
-    def importModule(self, name):
-        test_dir = os.path.join(gRootDir, 'test.dir')
-        if '.' in name:
-            script = textwrap.dedent("""\
-                import site
-                site.addsitedir(%r)
-                try:
-                    import %s
-                except ImportError:
-                    import %s
-                print (%s.__name__)
-            """) %(test_dir, name, name.rsplit('.', 1)[0], name)
-        else:
-            script = textwrap.dedent("""\
-                import site
-                site.addsitedir(%r)
-                import %s
-                print (%s.__name__)
-            """) %(test_dir, name, name)
-
-        p = subprocess.Popen([sys.executable, '-c', script],
-                stdout=subprocess.PIPE,
-                stderr=subprocess.STDOUT,
-                cwd=os.path.join(
-                    os.path.dirname(os.path.abspath(__file__)),
-                    'testpkg-relimport'),
-        )
-        data = p.communicate()[0]
-        if sys.version_info[0] != 2:
-            data = data.decode('UTF-8')
-        data = data.strip()
-        if data.endswith(' refs]'):
-            data = data.rsplit('\n', 1)[0].strip()
-
-        sts = p.wait()
-
-        if sts != 0:
-            print (data)
-            self.fail("import of %r failed"%(name,))
-
-        return data
-
-    def testToplevel(self):
-        m = self.importModule('nspkg.module')
-        self.assertEqual(m, 'nspkg.module')
-
-    def testSub(self):
-        m = self.importModule('nspkg.nssubpkg.sub')
-        self.assertEqual(m, 'nspkg.nssubpkg.sub')
-
-class TestModuleGraphImport (unittest.TestCase):
-    if not hasattr(unittest.TestCase, 'assertIsInstance'):
-        def assertIsInstance(self, value, types):
-            if not isinstance(value, types):
-                self.fail("%r is not an instance of %r", value, types)
-
-    def setUp(self):
-        test_dir = os.path.join(gRootDir, 'test.dir')
-        if os.path.exists(test_dir):
-            shutil.rmtree(test_dir)
-
-        os.mkdir(test_dir)
-        exit = install_testpkg(test_dir)
-        self.assertEqual(exit, 0)
-
-        self.mf = modulegraph.ModuleGraph(path=[ test_dir ] + sys.path)
-
-    def tearDown(self):
-        test_dir = os.path.join(gRootDir, 'test.dir')
-        if os.path.exists(test_dir):
-            shutil.rmtree(test_dir)
-
-    def testRootPkg(self):
-        self.mf.import_hook('nspkg')
-
-        node = self.mf.findNode('nspkg')
-        self.assertIsInstance(node, modulegraph.NamespacePackage)
-        self.assertEqual(node.identifier, 'nspkg')
-        self.assertEqual(node.filename, '-')
-
-    def testRootPkgModule(self):
-        self.mf.import_hook('nspkg.module')
-
-        node = self.mf.findNode('nspkg.module')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'nspkg.module')
-
-    def testSubRootPkgModule(self):
-        self.mf.import_hook('nspkg.nssubpkg.sub')
-
-        node = self.mf.findNode('nspkg.nssubpkg.sub')
-        self.assertIsInstance(node, modulegraph.SourceModule)
-        self.assertEqual(node.identifier, 'nspkg.nssubpkg.sub')
-
-
-        node = self.mf.findNode('nspkg')
-        self.assertIsInstance(node, modulegraph.NamespacePackage)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_util.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_util.py
deleted file mode 100644
index e401df2..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_util.py
+++ /dev/null
@@ -1,60 +0,0 @@
-from __future__ import absolute_import
-import unittest
-import encodings
-import encodings.aliases
-from modulegraph import util
-import sys
-
-try:
-    from io import BytesIO
-except ImportError:
-    from cStringIO import StringIO as BytesIO
-
-class TestUtil (unittest.TestCase):
-    def test_imp_find_module(self):
-        fn = util.imp_find_module('encodings.aliases')[1]
-        self.assertTrue(encodings.aliases.__file__.startswith(fn))
-
-    def test_imp_walk(self):
-        imps = list(util.imp_walk('encodings.aliases'))
-        self.assertEqual(len(imps), 2)
-
-        self.assertEqual(imps[0][0], 'encodings')
-        self.assertTrue(encodings.__file__.startswith(imps[0][1][1]))
-
-        self.assertEqual(imps[1][0], 'aliases')
-        self.assertTrue(encodings.aliases.__file__.startswith(imps[1][1][1]))
-
-        # Close all files, avoid warning by unittest
-        for i in imps:
-            if i[1][0] is not None:
-                i[1][0].close()
-
-
-    def test_guess_encoding(self):
-        fp = BytesIO(b"# coding: utf-8")
-        self.assertEqual(util.guess_encoding(fp), "utf-8")
-
-        fp = BytesIO(b"\n# coding: utf-8")
-        self.assertEqual(util.guess_encoding(fp), "utf-8")
-
-        fp = BytesIO(b"# coding: latin-1")
-        self.assertEqual(util.guess_encoding(fp), "latin-1")
-
-        fp = BytesIO(b"\n# coding: latin-1")
-        self.assertEqual(util.guess_encoding(fp), "latin-1")
-
-        fp = BytesIO(b"#!/usr/bin/env/python\n# vim: set fileencoding=latin-1 :")
-        self.assertEqual(util.guess_encoding(fp), "latin-1")
-
-        fp = BytesIO(b"\n\n\n# coding: latin-1")
-        if sys.version_info[0] == 2:
-            self.assertEqual(util.guess_encoding(fp), "ascii")
-        else:
-            self.assertEqual(util.guess_encoding(fp), "utf-8")
-
-        del fp
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/test_zipio.py b/telemetry/third_party/modulegraph/modulegraph_tests/test_zipio.py
deleted file mode 100644
index 4e3eb48..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/test_zipio.py
+++ /dev/null
@@ -1,219 +0,0 @@
-from __future__ import absolute_import
-from modulegraph import zipio
-import os
-import time
-import sys
-
-if sys.version_info[:2] <= (2, 6):
-    import unittest2 as unittest
-
-else:
-    import unittest
-
-TESTDATA=os.path.join(
-        os.path.dirname(os.path.abspath(__file__)),
-        'testdata')
-
-class TestModuleGraph (unittest.TestCase):
-    def test_locating(self):
-        # Private function
-        self.assertEqual(zipio._locate('/usr/bin/ditto'), ('/usr/bin/ditto', None))
-        self.assertEqual(zipio._locate('/usr/bin/ditto/bar'), ('/usr/bin/ditto', 'bar'))
-        self.assertEqual(zipio._locate('/usr/bin/ditto/foo/bar///bar/'), ('/usr/bin/ditto', 'foo/bar/bar'))
-        self.assertEqual(zipio._locate('/usr/bin/ditto///foo/bar///bar/'), ('/usr/bin/ditto', 'foo/bar/bar'))
-        self.assertRaises(IOError, zipio._locate, '/usr/bin/ditto.bar')
-        self.assertRaises(IOError, zipio._locate, '/foo/bar/baz.txt')
-
-    def test_open(self):
-        # 1. Regular file
-        fp = zipio.open(os.path.join(TESTDATA, 'test.txt'), 'r')
-        data = fp.read()
-        fp.close()
-        self.assertEqual(data, 'This is test.txt\n')
-
-        if sys.version_info[0] == 3:
-            fp = zipio.open(os.path.join(TESTDATA, 'test.txt'), 'rb')
-            data = fp.read()
-            fp.close()
-            self.assertEqual(data, b'This is test.txt\n')
-
-        # 2. File inside zipfile
-        fp = zipio.open(os.path.join(TESTDATA, 'zipped.egg', 'test.txt'), 'r')
-        data = fp.read()
-        fp.close()
-        self.assertEqual(data, 'Zipped up test.txt\n')
-
-        if sys.version_info[0] == 3:
-            fp = zipio.open(os.path.join(TESTDATA, 'zipped.egg', 'test.txt'), 'rb')
-            data = fp.read()
-            fp.close()
-            self.assertEqual(data, b'Zipped up test.txt\n')
-
-        # 3. EXC: Directory inside zipfile
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir'))
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir2'))
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir2/subdir'))
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir3'))
-        # TODO: Add subdir4/file.txt, without directory entry
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir4'))
-
-        # 4. EXC: No such file in zipfile
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'no-such-file'))
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'zipped.egg', 'subdir/no-such-file'))
-
-        # 5. EXC: No such regular file
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'no-such-file.txt'))
-
-        # 6. EXC: Open r/w
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'test.txt'), 'w')
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'test.txt'), 'a')
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'test.txt'), 'r+')
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'test.txt'), 'w+')
-        self.assertRaises(IOError, zipio.open, os.path.join(TESTDATA, 'test.txt'), 'a+')
-
-    def test_listdir(self):
-        # 1. Regular directory
-        self.assertEqual(set(os.listdir(os.path.join(TESTDATA, 'subdir'))), {'file1.txt', 'file2.txt'})
-
-        # 2. Zipfile with files in directory
-        self.assertEqual(set(zipio.listdir(os.path.join(TESTDATA, 'zipped.egg'))), {
-            'test.txt', 'subdir', 'subdir2', 'subdir3', 'subdir4'})
-
-        # 3. Zipfile with files in subdirectory
-        self.assertEqual(set(zipio.listdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir'))), {'file1.txt', 'file2.txt'})
-        self.assertEqual(set(zipio.listdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir2'))), {'subdir'})
-        self.assertEqual(set(zipio.listdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir4', 'subdir6'))), {'mydir'})
-
-        # 4. Zipfile with entry for directory, no files
-        self.assertEqual(set(zipio.listdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir3'))), set([]))
-
-        # 5. EXC: Zipfile without directory
-        self.assertRaises(IOError, zipio.listdir, os.path.join(TESTDATA, 'zipped.egg', 'subdir10'))
-
-        # 6. EXC: Regular directory doesn't exist
-        self.assertRaises(IOError, zipio.listdir, os.path.join(TESTDATA, 'subdir10'))
-
-    def test_isfile(self):
-        self.assertTrue(zipio.isfile(os.path.join(TESTDATA, 'test.txt')))
-        self.assertFalse(zipio.isfile(os.path.join(TESTDATA, 'subdir')))
-        self.assertRaises(IOError, zipio.isfile, os.path.join(TESTDATA, 'no-such-file'))
-        self.assertFalse(zipio.isfile(os.path.join(TESTDATA, 'zipped.egg')))
-        self.assertFalse(zipio.isfile(os.path.join(TESTDATA, 'zipped.egg', 'subdir4')))
-        self.assertTrue(zipio.isfile(os.path.join(TESTDATA, 'zipped.egg', 'test.txt')))
-        self.assertFalse(zipio.isfile(os.path.join(TESTDATA, 'zipped.egg', 'subdir')))
-        self.assertRaises(IOError, zipio.isfile, os.path.join(TESTDATA, 'zipped.egg', 'no-such-file'))
-        self.assertTrue(zipio.isfile(os.path.join(TESTDATA, 'zipped.egg', 'subdir2', 'subdir', 'file1.txt')))
-
-    def test_isdir(self):
-        self.assertTrue(zipio.isdir(TESTDATA))
-        self.assertFalse(zipio.isdir(os.path.join(TESTDATA, 'test.txt')))
-        self.assertTrue(zipio.isdir(os.path.join(TESTDATA, 'zipped.egg')))
-        self.assertTrue(zipio.isdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir')))
-        self.assertTrue(zipio.isdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir2/subdir')))
-        self.assertTrue(zipio.isdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir4')))
-        self.assertFalse(zipio.isdir(os.path.join(TESTDATA, 'zipped.egg', 'subdir4', 'file.txt')))
-        self.assertRaises(IOError, zipio.isdir, os.path.join(TESTDATA, 'no-such-file'))
-        self.assertRaises(IOError, zipio.isdir, os.path.join(TESTDATA, 'zipped.egg', 'no-such-file'))
-        self.assertRaises(IOError, zipio.isdir, os.path.join(TESTDATA, 'zipped.egg', 'subdir', 'no-such-file'))
-
-    def test_islink(self):
-        fn = os.path.join(TESTDATA, 'symlink')
-        os.symlink('test.txt', fn)
-        try:
-            self.assertTrue(zipio.islink(fn))
-
-        finally:
-            os.unlink(fn)
-
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'test.txt')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'subdir')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'zipped.egg')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'zipped.egg/subdir')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'zipped.egg/subdir4')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'zipped.egg/test.txt')))
-        self.assertFalse(zipio.islink(os.path.join(TESTDATA, 'zipped.egg/subdir/file1.txt')))
-
-        self.assertRaises(IOError, zipio.islink, os.path.join(TESTDATA, 'no-such-file'))
-        self.assertRaises(IOError, zipio.islink, os.path.join(TESTDATA, 'zipped.egg', 'no-such-file'))
-
-
-    def test_readlink(self):
-        fn = os.path.join(TESTDATA, 'symlink')
-        os.symlink('test.txt', fn)
-        try:
-            self.assertEqual(zipio.readlink(fn), 'test.txt')
-
-        finally:
-            os.unlink(fn)
-
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'test.txt'))
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'subdir'))
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'zipped.egg'))
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'zipped.egg', 'subdir4'))
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'zipped.egg', 'no-such-file'))
-        self.assertRaises(OSError, zipio.readlink, os.path.join(TESTDATA, 'zipped.egg', 'subdir/no-such-file'))
-
-    def test_getmtime(self):
-        fn = os.path.join(TESTDATA, 'test.txt')
-        self.assertEqual(os.path.getmtime(fn), zipio.getmtime(fn))
-
-        fn = os.path.join(TESTDATA, 'zipped.egg')
-        self.assertEqual(os.path.getmtime(fn), zipio.getmtime(fn))
-
-        fn = os.path.join(TESTDATA, 'zipped.egg/test.txt')
-        self.assertIn(zipio.getmtime(fn), (1300193680.0, 1300222480.0))
-
-        fn = os.path.join(TESTDATA, 'zipped.egg/subdir')
-        self.assertIn(zipio.getmtime(fn), (1300193890.0, 1300222690.0))
-
-        fn = os.path.join(TESTDATA, 'zipped.egg/subdir4')
-        self.assertEqual(zipio.getmtime(fn), os.path.getmtime(os.path.join(TESTDATA, 'zipped.egg')))
-
-        self.assertRaises(IOError, zipio.getmtime, os.path.join(TESTDATA, 'no-file'))
-        self.assertRaises(IOError, zipio.getmtime, os.path.join(TESTDATA, 'zipped.egg/no-file'))
-
-    def test_contextlib(self):
-        # 1. Regular file
-        with zipio.open(os.path.join(TESTDATA, 'test.txt'), 'r') as fp:
-            data = fp.read()
-        try:
-            fp.read()
-            self.fail("file not closed")
-        except (ValueError, IOError):
-            pass
-
-        self.assertEqual(data, 'This is test.txt\n')
-
-        if sys.version_info[0] == 3:
-            with zipio.open(os.path.join(TESTDATA, 'test.txt'), 'rb') as fp:
-                data = fp.read()
-            try:
-                fp.read()
-                self.fail("file not closed")
-            except (ValueError, IOError):
-                pass
-
-            self.assertEqual(data, b'This is test.txt\n')
-
-        # 2. File inside zipfile
-        with zipio.open(os.path.join(TESTDATA, 'zipped.egg', 'test.txt'), 'r') as fp:
-            data = fp.read()
-        try:
-            fp.read()
-            self.fail("file not closed")
-        except (ValueError, IOError):
-            pass
-        self.assertEqual(data, 'Zipped up test.txt\n')
-
-        if sys.version_info[0] == 3:
-            with zipio.open(os.path.join(TESTDATA, 'zipped.egg', 'test.txt'), 'rb') as fp:
-                data = fp.read()
-            try:
-                fp.read()
-                self.fail("file not closed")
-            except (IOError, ValueError):
-                pass
-            self.assertEqual(data, b'Zipped up test.txt\n')
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/namedpkg/slave.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/namedpkg/slave.py
deleted file mode 100644
index ac4bd22..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/namedpkg/slave.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" slave packages """
-from __future__ import absolute_import
-import os
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6-nspkg.pth
deleted file mode 100644
index b020a3c..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',types.ModuleType('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/PKG-INFO
deleted file mode 100644
index cff065a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: nameduser
-Version: 1.5
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/SOURCES.txt
deleted file mode 100644
index 15c6126..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/slave.py
-nameduser.egg-info/PKG-INFO
-nameduser.egg-info/SOURCES.txt
-nameduser.egg-info/dependency_links.txt
-nameduser.egg-info/namespace_packages.txt
-nameduser.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6-nspkg.pth
deleted file mode 100644
index b020a3c..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',types.ModuleType('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/PKG-INFO
deleted file mode 100644
index 138c5fd..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: namedpkg
-Version: 1.0
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/SOURCES.txt
deleted file mode 100644
index 29dfc47..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/parent.py
-namedpkg.egg-info/PKG-INFO
-namedpkg.egg-info/SOURCES.txt
-namedpkg.egg-info/dependency_links.txt
-namedpkg.egg-info/namespace_packages.txt
-namedpkg.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg/parent.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg/parent.py
deleted file mode 100644
index 12836ab..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg/parent.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" parent packages """
-from __future__ import absolute_import
-import sys
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py
deleted file mode 100644
index ac4bd22..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" slave packages """
-from __future__ import absolute_import
-import os
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5-nspkg.pth
deleted file mode 100644
index 9423238..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',new.module('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
deleted file mode 100644
index cff065a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: nameduser
-Version: 1.5
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
deleted file mode 100644
index 15c6126..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/slave.py
-nameduser.egg-info/PKG-INFO
-nameduser.egg-info/SOURCES.txt
-nameduser.egg-info/dependency_links.txt
-nameduser.egg-info/namespace_packages.txt
-nameduser.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5-nspkg.pth
deleted file mode 100644
index 9423238..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',new.module('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
deleted file mode 100644
index 138c5fd..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: namedpkg
-Version: 1.0
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
deleted file mode 100644
index 29dfc47..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/parent.py
-namedpkg.egg-info/PKG-INFO
-namedpkg.egg-info/SOURCES.txt
-namedpkg.egg-info/dependency_links.txt
-namedpkg.egg-info/namespace_packages.txt
-namedpkg.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg/parent.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg/parent.py
deleted file mode 100644
index 12836ab..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg/parent.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" parent packages """
-from __future__ import absolute_import
-import sys
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/namedpkg/slave.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/namedpkg/slave.py
deleted file mode 100644
index ac4bd22..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/namedpkg/slave.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" slave packages """
-from __future__ import absolute_import
-import os
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5-nspkg.pth
deleted file mode 100644
index 9423238..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',new.module('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
deleted file mode 100644
index cff065a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: nameduser
-Version: 1.5
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
deleted file mode 100644
index 15c6126..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/slave.py
-nameduser.egg-info/PKG-INFO
-nameduser.egg-info/SOURCES.txt
-nameduser.egg-info/dependency_links.txt
-nameduser.egg-info/namespace_packages.txt
-nameduser.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5-nspkg.pth b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5-nspkg.pth
deleted file mode 100644
index 9423238..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5-nspkg.pth
+++ /dev/null
@@ -1 +0,0 @@
-import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('namedpkg',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('namedpkg',new.module('namedpkg')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
deleted file mode 100644
index 138c5fd..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: namedpkg
-Version: 1.0
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
deleted file mode 100644
index 29dfc47..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/parent.py
-namedpkg.egg-info/PKG-INFO
-namedpkg.egg-info/SOURCES.txt
-namedpkg.egg-info/dependency_links.txt
-namedpkg.egg-info/namespace_packages.txt
-namedpkg.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg/parent.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg/parent.py
deleted file mode 100644
index 12836ab..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg/parent.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" parent packages """
-from __future__ import absolute_import
-import sys
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/__init__.py
deleted file mode 100644
index de40ea7..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__import__('pkg_resources').declare_namespace(__name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/slave.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/slave.py
deleted file mode 100644
index ac4bd22..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/namedpkg/slave.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" slave packages """
-from __future__ import absolute_import
-import os
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/PKG-INFO
deleted file mode 100644
index cff065a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: nameduser
-Version: 1.5
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/SOURCES.txt
deleted file mode 100644
index 15c6126..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/slave.py
-nameduser.egg-info/PKG-INFO
-nameduser.egg-info/SOURCES.txt
-nameduser.egg-info/dependency_links.txt
-nameduser.egg-info/namespace_packages.txt
-nameduser.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/setup.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/setup.py
deleted file mode 100644
index 5351ab6..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/child/setup.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from __future__ import absolute_import
-from setuptools import setup
-
-setup(
-        name="nameduser",
-        version="1.5",
-        packages=["namedpkg"],
-        namespace_packages=["namedpkg"],
-)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/install.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/install.py
deleted file mode 100644
index f685870..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/install.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-"""
-Script that will create a subdirectory one level up with two subdirs
-with --single-version-externally-managed namespace packages.
-
-Use this script with new versions of distribute and setuptools to ensure
-that changes in the handling of this option don't break us.
-"""
-from __future__ import print_function
-from __future__ import absolute_import
-import pkg_resources
-import subprocess
-import os
-import sys
-import shutil
-
-def main():
-    r = pkg_resources.require('setuptools')[0]
-    install_dir = os.path.join(
-            os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
-            "%s-%s"%(r.project_name, r.version))
-    if os.path.exists(install_dir):
-        print("Skip %s %s: already installed"%(r.project_name, r.version))
-
-    else:
-        os.mkdir(install_dir)
-        os.mkdir(os.path.join(install_dir, "parent"))
-        os.mkdir(os.path.join(install_dir, "child"))
-
-        if os.path.exists('parent/build'):
-            shutil.rmtree('parent/build')
-        if os.path.exists('child/build'):
-            shutil.rmtree('child/build')
-
-        for subdir in ('parent', 'child'):
-            p = subprocess.Popen([
-                sys.executable,
-                "setup.py",
-                "install",
-                 "--install-lib=%s/%s"%(install_dir, subdir),
-                 "--single-version-externally-managed",
-                 "--record", "files.txt"
-            ],
-            cwd=subdir)
-            xit = p.wait()
-            if xit != 0:
-                print("ERROR: install failed")
-                sys.exit(1)
-
-
-            if os.path.exists('%s/files.txt'%(subdir,)):
-                os.unlink('%s/files.txt'%(subdir,))
-
-
-if __name__ == "__main__":
-    main()
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/PKG-INFO
deleted file mode 100644
index 138c5fd..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: namedpkg
-Version: 1.0
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/SOURCES.txt
deleted file mode 100644
index 29dfc47..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-setup.py
-namedpkg/__init__.py
-namedpkg/parent.py
-namedpkg.egg-info/PKG-INFO
-namedpkg.egg-info/SOURCES.txt
-namedpkg.egg-info/dependency_links.txt
-namedpkg.egg-info/namespace_packages.txt
-namedpkg.egg-info/top_level.txt
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/namespace_packages.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/top_level.txt
deleted file mode 100644
index d332ce1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-namedpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/__init__.py
deleted file mode 100644
index de40ea7..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__import__('pkg_resources').declare_namespace(__name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/parent.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/parent.py
deleted file mode 100644
index 12836ab..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/namedpkg/parent.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" parent packages """
-from __future__ import absolute_import
-import sys
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/setup.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/setup.py
deleted file mode 100644
index 6e7b273..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/src/parent/setup.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from __future__ import absolute_import
-from setuptools import setup
-
-setup(
-        name="namedpkg",
-        version="1.0",
-        packages=["namedpkg"],
-        namespace_packages=["namedpkg"],
-)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/script b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/script
deleted file mode 100755
index 2716038..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/script
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/python
-import sys, os
-
-print (sys.version)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file1.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file1.txt
deleted file mode 100644
index 7898192..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file1.txt
+++ /dev/null
@@ -1 +0,0 @@
-a
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file2.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file2.txt
deleted file mode 100644
index 6178079..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/subdir/file2.txt
+++ /dev/null
@@ -1 +0,0 @@
-b
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.egg b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.egg
deleted file mode 100644
index 64db323..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.egg
+++ /dev/null
Binary files differ
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.zip b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.zip
deleted file mode 100644
index d3c1f42..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath.zip
+++ /dev/null
Binary files differ
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/myext.pyd b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/myext.pyd
deleted file mode 100644
index 01e7507..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/myext.pyd
+++ /dev/null
@@ -1 +0,0 @@
-""" fake extension """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule.py
deleted file mode 100644
index de6c648..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule.py
+++ /dev/null
@@ -1,3 +0,0 @@
-"""
-some module
-"""
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule3.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule3.py
deleted file mode 100644
index 422b686..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mymodule3.py
+++ /dev/null
@@ -1 +0,0 @@
-"""  fake module """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mypkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mypkg/__init__.py
deleted file mode 100644
index 25597fb..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/syspath/mypkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" fake package """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.egg b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.egg
deleted file mode 100644
index 219c116..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.egg
+++ /dev/null
Binary files differ
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.txt
deleted file mode 100644
index 3b86232..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is test.txt
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/zipped.egg b/telemetry/third_party/modulegraph/modulegraph_tests/testdata/zipped.egg
deleted file mode 100644
index bf8bd09..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testdata/zipped.egg
+++ /dev/null
Binary files differ
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/__init__.py
deleted file mode 100644
index 78b491e..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api.py
deleted file mode 100644
index ceacb48..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api.py
+++ /dev/null
@@ -1,10 +0,0 @@
-""" pkg.api """
-
-from __future__ import absolute_import
-import sys
-
-if sys.version_info[0] == 2:
-    from .api2 import *
-
-else:
-    from .api3 import *
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api2.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api2.py
deleted file mode 100644
index 02525b6..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api2.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from __future__ import absolute_import
-import six.moves.urllib.request, six.moves.urllib.error, six.moves.urllib.parse
-
-# 2To3-division: this file is skipped as this is version specific implemetation.
-
-def div(a, b):
-    try:
-        return a / b
-
-    except ZeroDivisionError as exc:
-        return None
-
-class MyClass (object):
-    pass
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api3.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api3.py
deleted file mode 100644
index eae5065..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-compatmodule/pkg/api3.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from __future__ import absolute_import
-import http.client
-
-# 2To3-division: this file is skipped as this is version specific implemetation.
-
-def div(a, b):
-    try:
-        return a / b
-
-    except ZeroDivisionError as exc:
-        return None
-
-class MyClass (object, metaclass=type):
-    pass
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_class_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_class_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_class_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/__init__.py
deleted file mode 100644
index 82e4875..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.__init__ """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_class_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_class_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_class_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_class_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_class_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_class_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_conditional_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/toplevel_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script.py
deleted file mode 100644
index 92692f3..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script.py
+++ /dev/null
@@ -1,52 +0,0 @@
-
-from __future__ import absolute_import
-import toplevel_existing
-import toplevel_nonexisting
-
-class MyClass:
-    import toplevel_class_existing
-    import toplevel_class_nonexisting
-
-if a == b:
-    import toplevel_conditional_existing
-    import toplevel_conditional_nonexisting
-
-    try:
-        import toplevel_conditional_import_existing
-        import toplevel_conditional_import_nonexisting
-    except:
-        import toplevel_conditional_import2_existing
-        import toplevel_conditional_import2_nonexisting
-
-try:
-    import toplevel_import_existing
-    import toplevel_import_nonexisting
-except:
-    import toplevel_import2_existing
-    import toplevel_import2_nonexisting
-
-def function():
-    import function_existing
-    import function_nonexisting
-
-    class MyClass:
-        import function_class_existing
-        import function_class_nonexisting
-
-    if a == b:
-        import function_conditional_existing
-        import function_conditional_nonexisting
-
-        try:
-            import function_conditional_import_existing
-            import function_conditional_import_nonexisting
-        except:
-            import function_conditional_import2_existing
-            import function_conditional_import2_nonexisting
-
-    try:
-        import function_import_existing
-        import function_import_nonexisting
-    except:
-        import function_import2_existing
-        import function_import2_nonexisting
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_from_import.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_from_import.py
deleted file mode 100644
index f48a98b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_from_import.py
+++ /dev/null
@@ -1,47 +0,0 @@
-from __future__ import absolute_import
-from pkg import toplevel_existing
-from pkg import toplevel_nonexisting
-
-class MyClass:
-    from pkg import toplevel_class_existing
-    from pkg import toplevel_class_nonexisting
-
-if a == b:
-    from pkg import toplevel_conditional_existing
-    from pkg import toplevel_conditional_nonexisting
-
-    try:
-        from pkg import toplevel_conditional_import_existing, toplevel_conditional_import_nonexisting
-    except:
-        from pkg import toplevel_conditional_import2_existing
-        from pkg import toplevel_conditional_import2_nonexisting
-
-try:
-    from pkg import toplevel_import_existing, toplevel_import_nonexisting
-except:
-    from pkg import toplevel_import2_existing
-    from pkg import toplevel_import2_nonexisting
-
-def function():
-    from pkg import function_existing, function_nonexisting
-
-    class MyClass:
-        from pkg import function_class_existing, function_class_nonexisting
-
-    if a == b:
-        from pkg import function_conditional_existing
-        from pkg import function_conditional_nonexisting
-
-        try:
-            from pkg import function_conditional_import_existing
-            from pkg import function_conditional_import_nonexisting
-        except:
-            from pkg import function_conditional_import2_existing
-            from pkg import function_conditional_import2_nonexisting
-
-    try:
-        from pkg import function_import_existing
-        from pkg import function_import_nonexisting
-    except:
-        from pkg import function_import2_existing
-        from pkg import function_import2_nonexisting
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_multi_import.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_multi_import.py
deleted file mode 100644
index bd1fc2b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/script_multi_import.py
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-from __future__ import absolute_import
-try:
-    import os.path
-except ImportError:
-    pass
-
-import os
-
-def function(self):
-    import sys
-
-
-if a == b:
-    import sys
-
-def function2(self):
-    if a == b:
-        import platform
-
-def function3(self):
-    import platform
-    import email
-
-
-import email
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_class_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_class_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_class_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_conditional_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import2_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import2_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import2_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import_existing.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import_existing.py
deleted file mode 100644
index ef467ea..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/toplevel_import_existing.py
+++ /dev/null
@@ -1 +0,0 @@
-""" $fname """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/__init__.py
deleted file mode 100644
index 78b491e..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/__init__.py
deleted file mode 100644
index 2a0bbcd..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-""" pkg.subpkg """
-
-from __future__ import absolute_import
-from .compat import X, Y
-
-from ._collections import A, B
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/_collections.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/_collections.py
deleted file mode 100644
index 4e9a588..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/_collections.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg.subpkg._collections """
-
-A, B = "A", "B"
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/compat.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/compat.py
deleted file mode 100644
index 92850f2..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg/subpkg/compat.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg.subpkg.compat """
-
-X, Y = 1, 2
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/__init__.py
deleted file mode 100644
index f6e15f3..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg2.__init__ """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/__init__.py
deleted file mode 100644
index 97fddf1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-""" pkg2.subpkg """
-
-from .compat import X, Y
-
-from ._collections import A, B
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/_collections.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/_collections.py
deleted file mode 100644
index 1b37f9d..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/_collections.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg2.subpkg._collections """
-
-A, B = "A", "B"
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/compat.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/compat.py
deleted file mode 100644
index d544848..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/pkg2/subpkg/compat.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg2.subpkg.compat """
-
-X, Y = 1, 2
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/script.py
deleted file mode 100644
index 7eb4686..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-import-from-init/script.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from __future__ import absolute_import
-import pkg.subpkg
-import pkg2.subpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/main_script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/main_script.py
deleted file mode 100644
index 19d3a52..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/main_script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-import sys
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/__init__.py
deleted file mode 100644
index 84c8df8..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.init """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/__init__.py
deleted file mode 100644
index 7d52f7f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub1.init """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/modA.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/modA.py
deleted file mode 100644
index b827020..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub1/modA.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub1.modA """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/__init__.py
deleted file mode 100644
index ca5ca11..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub2.init """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/mod.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/mod.py
deleted file mode 100644
index 1b172c8..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub2/mod.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub2.mod """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub3.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub3.py
deleted file mode 100644
index 211217d..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/pkg/sub3.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub3 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path1/package/sub2.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path1/package/sub2.py
deleted file mode 100644
index 894a1ec..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path1/package/sub2.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package.sub2 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/nspkg/mod.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/nspkg/mod.py
deleted file mode 100644
index 9e846e4..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/nspkg/mod.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package.nspkg.mod """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/sub1.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/sub1.py
deleted file mode 100644
index bb1f933..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/sub1.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package.sub1 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/__init__.py
deleted file mode 100644
index d1c6849..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package.subpackage """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/sub.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/sub.py
deleted file mode 100644
index f0ed11d..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-pep420-namespace/path2/package/subpackage/sub.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package.subpackage.sub """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/main_script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/main_script.py
deleted file mode 100644
index 9be3b65..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/main_script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from pkg import a
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/__init__.py
+++ /dev/null
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/a.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/a.py
deleted file mode 100644
index fec06a4..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/a.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from . import b
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/b.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/b.py
deleted file mode 100644
index e69de29..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr1/pkg/b.py
+++ /dev/null
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/main_script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/main_script.py
deleted file mode 100644
index f839a6f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/main_script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-import pkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/__init__.py
deleted file mode 100644
index cfbcf4e..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-"""
-Package structure simular to crcmod
-"""
-from __future__ import absolute_import
-try:
-    from .pkg.pkg import *
-    from . import pkg.base
-except ImportError:
-    from .pkg import *
-    from . import base
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/base.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/base.py
deleted file mode 100644
index 93e66ee..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/base.py
+++ /dev/null
@@ -1 +0,0 @@
-""" package base """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/pkg.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/pkg.py
deleted file mode 100644
index d5fcda2..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr2/pkg/pkg.py
+++ /dev/null
@@ -1 +0,0 @@
-""" nested """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/__init__.py
+++ /dev/null
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/__init__.py
+++ /dev/null
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/ccompiler.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/ccompiler.py
deleted file mode 100644
index d2565d0..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/mypkg/distutils/ccompiler.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from __future__ import absolute_import
-from distutils.ccompiler import *
-from distutils.sysconfig import customize_compiler
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/script.py
deleted file mode 100644
index ae07c2f..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr3/script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from mypkg.distutils import ccompiler
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/__init__.py
deleted file mode 100644
index 82e4875..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.__init__ """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/__init__.py
deleted file mode 100644
index b393ff5..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.core.__init__ """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/callables.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/callables.py
deleted file mode 100644
index 9ce619b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/callables.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg.callables """
-
-getID, getArgs, getRawFunction, ListenerInadequate, CallArgsInfo = [None]*5
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listener.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listener.py
deleted file mode 100644
index 28ae017..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listener.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from .callables import \
-    getID, getArgs, getRawFunction,\
-    ListenerInadequate, \
-    CallArgsInfo
-
-from .listenerimpl import Listener, ListenerValidator
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listenerimpl.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listenerimpl.py
deleted file mode 100644
index 775bd34..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/pkg/core/listenerimpl.py
+++ /dev/null
@@ -1,6 +0,0 @@
-""" pkg.listenerimp """
-class Listener:
-    pass
-
-class ListenerValidator:
-    pass
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/script.py
deleted file mode 100644
index dfa01b1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from pkg.core.listener import Listener as listen
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/__init__.py
deleted file mode 100644
index 606f71e..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" A dummy __init__ file """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/script.py
deleted file mode 100644
index e927751..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr5/script.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from __future__ import absolute_import
-from . import __init__
-
-from modulegraph.find_modules import find_needed_modules
-import distutils
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/module.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/module.py
deleted file mode 100644
index 5e3a6ec..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/module.py
+++ /dev/null
@@ -1,1010 +0,0 @@
-
-from __future__ import absolute_import
-ds = {
-    'name': [
-        list(1)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-        + list(2)
-    ]
-}
-
-import os
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/script.py
deleted file mode 100644
index 167edcf..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/script.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-import module
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/mod.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/mod.py
deleted file mode 100644
index 7828fc9..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/mod.py
+++ /dev/null
@@ -1 +0,0 @@
-""" Toplevel module """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/__init__.py
deleted file mode 100644
index 7fa65f6..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" A Package """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/mod.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/mod.py
deleted file mode 100644
index de7fba1..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/mod.py
+++ /dev/null
@@ -1 +0,0 @@
-""" A package module """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/oldstyle.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/oldstyle.py
deleted file mode 100644
index 8ffd65a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/oldstyle.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from . import mod
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relative.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relative.py
deleted file mode 100644
index 8ffd65a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relative.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-from . import mod
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relimport.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relimport.py
deleted file mode 100644
index e23cb2e..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/relimport.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.relimport """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/__init__.py
deleted file mode 100644
index 75c8c11..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub2 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/mod.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/mod.py
deleted file mode 100644
index 1b172c8..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/sub2/mod.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.sub2.mod """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/__init__.py
deleted file mode 100644
index ced6ba0..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-""" pkg.subpkg """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/mod2.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/mod2.py
deleted file mode 100644
index 791e4d4..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/mod2.py
+++ /dev/null
@@ -1,4 +0,0 @@
-""" pkg.subpkg.mod2 """
-from __future__ import absolute_import
-from ..sub2.mod import __doc__
-from ..sub2 import mod
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative.py
deleted file mode 100644
index 775f435..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg.subpkg.relative """
-from __future__ import absolute_import
-from .. import mod
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative2.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative2.py
deleted file mode 100644
index 9e11e20..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/subpkg/relative2.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" pkg.subpkg.relative """
-from __future__ import absolute_import
-from ..relimport import __doc__ as doc
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/toplevel.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/toplevel.py
deleted file mode 100644
index 67f0bb7..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/pkg/toplevel.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import absolute_import
-import mod
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/script.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/script.py
deleted file mode 100644
index c556539..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport/script.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from __future__ import absolute_import
-import mod
-import pkg
-import pkg.mod
-import pkg.oldstyle
-import pkg.relative
-import pkg.toplevel
-import pkg.subpkg.relative
-import pkg.subpkg.relative2
-import pkg.subpkg.mod2
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/__init__.py
deleted file mode 100644
index d274455..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from __future__ import absolute_import
-from . import mod1
-from .mod2 import *
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod1.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod1.py
deleted file mode 100644
index b7ef456..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod1.py
+++ /dev/null
@@ -1 +0,0 @@
-""" mod1 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod2.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod2.py
deleted file mode 100644
index 7161f08..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod2.py
+++ /dev/null
@@ -1 +0,0 @@
-""" mod2 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod3.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod3.py
deleted file mode 100644
index 7999d2d..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/mod3.py
+++ /dev/null
@@ -1 +0,0 @@
-""" mod3 """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/sub/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/sub/__init__.py
deleted file mode 100644
index 30440c3..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/sub/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .. import mod1
-from .. import mod3
-from ... import toplevel
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/toplevel.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/toplevel.py
deleted file mode 100644
index 29059b9..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/toplevel.py
+++ /dev/null
@@ -1 +0,0 @@
-""" toplevel """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/__init__.py
deleted file mode 100644
index 387badb..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# this is a namespace package
-from __future__ import absolute_import
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/module.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/module.py
deleted file mode 100644
index 0c1d857..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/module.py
+++ /dev/null
@@ -1 +0,0 @@
-""" nspkg.module """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/__init__.py
deleted file mode 100644
index 387badb..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# this is a namespace package
-from __future__ import absolute_import
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/sub.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/sub.py
deleted file mode 100644
index bce954b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/build/lib/nspkg/nssubpkg/sub.py
+++ /dev/null
@@ -1 +0,0 @@
-""" nspkg.nsubpkg.sub """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/setup.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/setup.py
deleted file mode 100644
index b109e7a..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/setup.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from __future__ import absolute_import
-from setuptools import setup
-
-setup(
-    name="nspkg",
-    version="1.0",
-    namespace_packages=['nspkg', 'nspkg.nssubpkg'],
-    packages=['nspkg', 'nspkg.nssubpkg'],
-    package_dir = {'': 'src'},
-    zip_safe=False,
-)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/PKG-INFO b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/PKG-INFO
deleted file mode 100644
index a2d9629..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: nspkg
-Version: 1.0
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/SOURCES.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/SOURCES.txt
deleted file mode 100644
index 6288716..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-setup.py
-src/nspkg/__init__.py
-src/nspkg/module.py
-src/nspkg.egg-info/PKG-INFO
-src/nspkg.egg-info/SOURCES.txt
-src/nspkg.egg-info/dependency_links.txt
-src/nspkg.egg-info/namespace_packages.txt
-src/nspkg.egg-info/not-zip-safe
-src/nspkg.egg-info/top_level.txt
-src/nspkg/nssubpkg/__init__.py
-src/nspkg/nssubpkg/sub.py
\ No newline at end of file
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/dependency_links.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/namespace_packages.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/namespace_packages.txt
deleted file mode 100644
index 2321d6b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-nspkg
-nspkg.nssubpkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/not-zip-safe b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/not-zip-safe
deleted file mode 100644
index 8b13789..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/not-zip-safe
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/top_level.txt b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/top_level.txt
deleted file mode 100644
index 61d82f4..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-nspkg
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/__init__.py
deleted file mode 100644
index 387badb..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# this is a namespace package
-from __future__ import absolute_import
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/module.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/module.py
deleted file mode 100644
index 0c1d857..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/module.py
+++ /dev/null
@@ -1 +0,0 @@
-""" nspkg.module """
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/__init__.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/__init__.py
deleted file mode 100644
index 387badb..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# this is a namespace package
-from __future__ import absolute_import
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
diff --git a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/sub.py b/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/sub.py
deleted file mode 100644
index bce954b..0000000
--- a/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-setuptools-namespace/src/nspkg/nssubpkg/sub.py
+++ /dev/null
@@ -1 +0,0 @@
-""" nspkg.nsubpkg.sub """
diff --git a/telemetry/third_party/modulegraph/scripts/extract_implies.py b/telemetry/third_party/modulegraph/scripts/extract_implies.py
deleted file mode 100644
index 7cae8ed..0000000
--- a/telemetry/third_party/modulegraph/scripts/extract_implies.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-"""
-This script looks for ImportModules calls in C extensions
-of the stdlib.
-
-The current version has harcoded the location of the source
-tries on Ronald's machine, a future version will be able
-to rebuild the modulegraph source file that contains
-this information.
-"""
-
-from __future__ import print_function
-from __future__ import absolute_import
-import re
-import sys
-import os
-import pprint
-
-import_re = re.compile('PyImport_ImportModule\w+\("(\w+)"\);')
-
-def extract_implies(root):
-    modules_dir = os.path.join(root, "Modules")
-    for fn in os.listdir(modules_dir):
-        if not fn.endswith('.c'):
-            continue
-
-        module_name = fn[:-2]
-        if module_name.endswith('module'):
-            module_name = module_name[:-6]
-
-        with open(os.path.join(modules_dir, fn)) as fp:
-            data = fp.read()
-
-        imports = list(sorted(set(import_re.findall(data))))
-        if imports:
-            yield module_name, imports
-
-
-
-def main():
-    for version in ('2.6', '2.7', '3.1'):
-        print("====", version)
-        pprint.pprint(list(extract_implies('/Users/ronald/Projects/python/release%s-maint'%(version.replace('.', '')))))
-
-if __name__ == "__main__":
-    main()
diff --git a/telemetry/third_party/modulegraph/setup.cfg b/telemetry/third_party/modulegraph/setup.cfg
deleted file mode 100644
index f1d0167..0000000
--- a/telemetry/third_party/modulegraph/setup.cfg
+++ /dev/null
@@ -1,54 +0,0 @@
-[metadata]
-name = modulegraph
-version = 0.12.1
-description = Python module dependency analysis tool
-long_description_file = 
-	README.txt
-	doc/changelog.rst
-classifiers = 
-	Intended Audience :: Developers
-	License :: OSI Approved :: MIT License
-	Programming Language :: Python
-	Programming Language :: Python :: 2
-	Programming Language :: Python :: 2.7
-	Programming Language :: Python :: 3
-	Programming Language :: Python :: 3.3
-	Programming Language :: Python :: 3.4
-	Topic :: Software Development :: Libraries :: Python Modules
-	Topic :: Software Development :: Build Tools
-author = Ronald Oussoren
-author_email = ronaldoussoren@mac.com
-maintainer = Ronald Oussoren
-maintainer_email = ronaldoussoren@mac.com
-url = http://bitbucket.org/ronaldoussoren/modulegraph
-download_url = http://pypi.python.org/pypi/modulegraph
-license = MIT
-packages = modulegraph
-platforms = any
-requires-dist = 
-	altgraph (>= 0.12)
-console_scripts = 
-	modulegraph = modulegraph.__main__:main
-zip-safe = 1
-keywords = import, dependencies
-
-[check-manifest]
-ignore = 
-	modulegraph_tests/testdata/nspkg/distribute-0.6.10/child/nameduser-1.5-py2.6.egg-info
-	modulegraph_tests/testdata/nspkg/distribute-0.6.10/parent/namedpkg-1.0-py2.6.egg-info
-	modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/nameduser-1.5-py2.5.egg-info
-	modulegraph_tests/testdata/nspkg/distribute-0.6.12/parent/namedpkg-1.0-py2.5.egg-info
-	modulegraph_tests/testdata/nspkg/setuptools-0.6c9/child/nameduser-1.5-py2.5.egg-info
-	modulegraph_tests/testdata/nspkg/setuptools-0.6c9/parent/namedpkg-1.0-py2.5.egg-info
-	modulegraph_tests/testdata/nspkg/src/child/nameduser.egg-info
-	modulegraph_tests/testdata/nspkg/src/parent/namedpkg.egg-info
-	modulegraph_tests/testdata/syspath/myext.pyd
-	modulegraph_tests/testdata/syspath/myext.so
-	modulegraph_tests/testdata/syspath/mymodule2.pyc
-	modulegraph_tests/testpkg-setuptools-namespace/src/nspkg.egg-info
-
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-
diff --git a/telemetry/third_party/modulegraph/setup.py b/telemetry/third_party/modulegraph/setup.py
deleted file mode 100644
index fb0e30f..0000000
--- a/telemetry/third_party/modulegraph/setup.py
+++ /dev/null
@@ -1,872 +0,0 @@
-"""
-Shared setup file for simple python packages. Uses a setup.cfg that
-is the same as the distutils2 project, unless noted otherwise.
-
-It exists for two reasons:
-1) This makes it easier to reuse setup.py code between my own
-   projects
-
-2) Easier migration to distutils2 when that catches on.
-
-Additional functionality:
-
-* Section metadata:
-    requires-test:  Same as 'tests_require' option for setuptools.
-
-"""
-
-from __future__ import print_function
-from __future__ import absolute_import
-import sys
-import os
-import re
-import platform
-from fnmatch import fnmatch
-import os
-import sys
-import time
-import tempfile
-import tarfile
-try:
-    import urllib.request as urllib
-except ImportError:
-    import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error
-from distutils import log
-try:
-    from hashlib import md5
-
-except ImportError:
-    from md5 import md5
-
-if sys.version_info[0] == 2:
-    from six.moves.configparser import RawConfigParser, NoOptionError, NoSectionError
-else:
-    from configparser import RawConfigParser, NoOptionError, NoSectionError
-
-ROOTDIR = os.path.dirname(os.path.abspath(__file__))
-
-
-#
-#
-#
-# Parsing the setup.cfg and converting it to something that can be
-# used by setuptools.setup()
-#
-#
-#
-
-def eval_marker(value):
-    """
-    Evaluate an distutils2 environment marker.
-
-    This code is unsafe when used with hostile setup.cfg files,
-    but that's not a problem for our own files.
-    """
-    value = value.strip()
-
-    class M:
-        def __init__(self, **kwds):
-            for k, v in kwds.items():
-                setattr(self, k, v)
-
-    variables = {
-        'python_version': '%d.%d'%(sys.version_info[0], sys.version_info[1]),
-        'python_full_version': sys.version.split()[0],
-        'os': M(
-            name=os.name,
-        ),
-        'sys': M(
-            platform=sys.platform,
-        ),
-        'platform': M(
-            version=platform.version(),
-            machine=platform.machine(),
-        ),
-    }
-
-    return bool(eval(value, variables, variables))
-
-
-    return True
-
-def _opt_value(cfg, into, section, key, transform = None):
-    try:
-        v = cfg.get(section, key)
-        if transform != _as_lines and ';' in v:
-            v, marker = v.rsplit(';', 1)
-            if not eval_marker(marker):
-                return
-
-            v = v.strip()
-
-        if v:
-            if transform:
-                into[key] = transform(v.strip())
-            else:
-                into[key] = v.strip()
-
-    except (NoOptionError, NoSectionError):
-        pass
-
-def _as_bool(value):
-    if value.lower() in ('y', 'yes', 'on'):
-        return True
-    elif value.lower() in ('n', 'no', 'off'):
-        return False
-    elif value.isdigit():
-        return bool(int(value))
-    else:
-        raise ValueError(value)
-
-def _as_list(value):
-    return value.split()
-
-def _as_lines(value):
-    result = []
-    for v in value.splitlines():
-        if ';' in v:
-            v, marker = v.rsplit(';', 1)
-            if not eval_marker(marker):
-                continue
-
-            v = v.strip()
-            if v:
-                result.append(v)
-        else:
-            result.append(v)
-    return result
-
-def _map_requirement(value):
-    m = re.search(r'(\S+)\s*(?:\((.*)\))?', value)
-    name = m.group(1)
-    version = m.group(2)
-
-    if version is None:
-        return name
-
-    else:
-        mapped = []
-        for v in version.split(','):
-            v = v.strip()
-            if v[0].isdigit():
-                # Checks for a specific version prefix
-                m = v.rsplit('.', 1)
-                mapped.append('>=%s,<%s.%s'%(
-                    v, m[0], int(m[1])+1))
-
-            else:
-                mapped.append(v)
-        return '%s %s'%(name, ','.join(mapped),)
-
-def _as_requires(value):
-    requires = []
-    for req in value.splitlines():
-        if ';' in req:
-            req, marker = v.rsplit(';', 1)
-            if not eval_marker(marker):
-                continue
-            req = req.strip()
-
-        if not req:
-            continue
-        requires.append(_map_requirement(req))
-    return requires
-
-def parse_setup_cfg():
-    cfg = RawConfigParser()
-    r = cfg.read([os.path.join(ROOTDIR, 'setup.cfg')])
-    if len(r) != 1:
-        print("Cannot read 'setup.cfg'")
-        sys.exit(1)
-
-    metadata = dict(
-            name        = cfg.get('metadata', 'name'),
-            version     = cfg.get('metadata', 'version'),
-            description = cfg.get('metadata', 'description'),
-    )
-
-    _opt_value(cfg, metadata, 'metadata', 'license')
-    _opt_value(cfg, metadata, 'metadata', 'maintainer')
-    _opt_value(cfg, metadata, 'metadata', 'maintainer_email')
-    _opt_value(cfg, metadata, 'metadata', 'author')
-    _opt_value(cfg, metadata, 'metadata', 'author_email')
-    _opt_value(cfg, metadata, 'metadata', 'url')
-    _opt_value(cfg, metadata, 'metadata', 'download_url')
-    _opt_value(cfg, metadata, 'metadata', 'classifiers', _as_lines)
-    _opt_value(cfg, metadata, 'metadata', 'platforms', _as_list)
-    _opt_value(cfg, metadata, 'metadata', 'packages', _as_list)
-    _opt_value(cfg, metadata, 'metadata', 'keywords', _as_list)
-
-    try:
-        v = cfg.get('metadata', 'requires-dist')
-
-    except (NoOptionError, NoSectionError):
-        pass
-
-    else:
-        requires = _as_requires(v)
-        if requires:
-            metadata['install_requires'] = requires
-
-    try:
-        v = cfg.get('metadata', 'requires-test')
-
-    except (NoOptionError, NoSectionError):
-        pass
-
-    else:
-        requires = _as_requires(v)
-        if requires:
-            metadata['tests_require'] = requires
-
-
-    try:
-        v = cfg.get('metadata', 'long_description_file')
-    except (NoOptionError, NoSectionError):
-        pass
-
-    else:
-        parts = []
-        for nm in v.split():
-            fp = open(nm, 'rU')
-            parts.append(fp.read())
-            fp.close()
-
-        metadata['long_description'] = '\n\n'.join(parts)
-
-
-    try:
-        v = cfg.get('metadata', 'zip-safe')
-    except (NoOptionError, NoSectionError):
-        pass
-
-    else:
-        metadata['zip_safe'] = _as_bool(v)
-
-    try:
-        v = cfg.get('metadata', 'console_scripts')
-    except (NoOptionError, NoSectionError):
-        pass
-
-    else:
-        if 'entry_points' not in metadata:
-            metadata['entry_points'] = {}
-
-        metadata['entry_points']['console_scripts'] = v.splitlines()
-
-    if sys.version_info[:2] <= (2, 6):
-        try:
-            metadata['tests_require'] += ", unittest2"
-        except KeyError:
-            metadata['tests_require'] = "unittest2"
-
-    return metadata
-
-
-#
-#
-#
-# Bootstrapping setuptools/distribute, based on
-# a heavily modified version of distribute_setup.py
-#
-#
-#
-
-
-SETUPTOOLS_PACKAGE='setuptools'
-
-
-try:
-    import subprocess
-
-    def _python_cmd(*args):
-        args = (sys.executable,) + args
-        return subprocess.call(args) == 0
-
-except ImportError:
-    def _python_cmd(*args):
-        args = (sys.executable,) + args
-        new_args = []
-        for a in args:
-            new_args.append(a.replace("'", "'\"'\"'"))
-        os.system(' '.join(new_args)) == 0
-
-
-try:
-    import json
-
-    def get_pypi_src_download(package):
-        url = 'https://pypi.python.org/pypi/%s/json'%(package,)
-        fp = six.moves.urllib.request.urlopen(url)
-        try:
-            try:
-                data = fp.read()
-
-            finally:
-                fp.close()
-        except urllib.error:
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-        pkgdata = json.loads(data.decode('utf-8'))
-        if 'urls' not in pkgdata:
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-        for info in pkgdata['urls']:
-            if info['packagetype'] == 'sdist' and info['url'].endswith('tar.gz'):
-                return (info.get('md5_digest'), info['url'])
-
-        raise RuntimeError("Cannot determine downlink link for %s"%(package,))
-
-except ImportError:
-    # Python 2.5 compatibility, no JSON in stdlib but luckily JSON syntax is
-    # simular enough to Python's syntax to be able to abuse the Python compiler
-
-    import _ast as ast
-
-    def get_pypi_src_download(package):
-        url = 'https://pypi.python.org/pypi/%s/json'%(package,)
-        fp = six.moves.urllib.request.urlopen(url)
-        try:
-            try:
-                data = fp.read()
-
-            finally:
-                fp.close()
-        except urllib.error:
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-
-        a = compile(data, '-', 'eval', ast.PyCF_ONLY_AST)
-        if not isinstance(a, ast.Expression):
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-        a = a.body
-        if not isinstance(a, ast.Dict):
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-        for k, v in zip(a.keys, a.values):
-            if not isinstance(k, ast.Str):
-                raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-            k = k.s
-            if k == 'urls':
-                a = v
-                break
-        else:
-            raise RuntimeError("PyPI JSON for %s doesn't contain URLs section"%(package,))
-
-        if not isinstance(a, ast.List):
-            raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-        for info in v.elts:
-            if not isinstance(info, ast.Dict):
-                raise RuntimeError("Cannot determine download link for %s"%(package,))
-            url = None
-            packagetype = None
-            chksum = None
-
-            for k, v in zip(info.keys, info.values):
-                if not isinstance(k, ast.Str):
-                    raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-                if k.s == 'url':
-                    if not isinstance(v, ast.Str):
-                        raise RuntimeError("Cannot determine download link for %s"%(package,))
-                    url = v.s
-
-                elif k.s == 'packagetype':
-                    if not isinstance(v, ast.Str):
-                        raise RuntimeError("Cannot determine download link for %s"%(package,))
-                    packagetype = v.s
-
-                elif k.s == 'md5_digest':
-                    if not isinstance(v, ast.Str):
-                        raise RuntimeError("Cannot determine download link for %s"%(package,))
-                    chksum = v.s
-
-            if url is not None and packagetype == 'sdist' and url.endswith('.tar.gz'):
-                return (chksum, url)
-
-        raise RuntimeError("Cannot determine download link for %s"%(package,))
-
-def _build_egg(egg, tarball, to_dir):
-    # extracting the tarball
-    tmpdir = tempfile.mkdtemp()
-    log.warn('Extracting in %s', tmpdir)
-    old_wd = os.getcwd()
-    try:
-        os.chdir(tmpdir)
-        tar = tarfile.open(tarball)
-        _extractall(tar)
-        tar.close()
-
-        # going in the directory
-        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
-        os.chdir(subdir)
-        log.warn('Now working in %s', subdir)
-
-        # building an egg
-        log.warn('Building a %s egg in %s', egg, to_dir)
-        _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
-
-    finally:
-        os.chdir(old_wd)
-    # returning the result
-    log.warn(egg)
-    if not os.path.exists(egg):
-        raise IOError('Could not build the egg.')
-
-
-def _do_download(to_dir, packagename=SETUPTOOLS_PACKAGE):
-    tarball = download_setuptools(packagename, to_dir)
-    version = tarball.split('-')[-1][:-7]
-    egg = os.path.join(to_dir, '%s-%s-py%d.%d.egg'
-                       % (packagename, version, sys.version_info[0], sys.version_info[1]))
-    if not os.path.exists(egg):
-        _build_egg(egg, tarball, to_dir)
-    sys.path.insert(0, egg)
-    import setuptools
-    setuptools.bootstrap_install_from = egg
-
-
-def use_setuptools():
-    # making sure we use the absolute path
-    return _do_download(os.path.abspath(os.curdir))
-
-def download_setuptools(packagename, to_dir):
-    # making sure we use the absolute path
-    to_dir = os.path.abspath(to_dir)
-    try:
-        from urllib.request import urlopen
-    except ImportError:
-        from six.moves.urllib.request import urlopen
-
-    chksum, url = get_pypi_src_download(packagename)
-    tgz_name = os.path.basename(url)
-    saveto = os.path.join(to_dir, tgz_name)
-
-    src = dst = None
-    if not os.path.exists(saveto):  # Avoid repeated downloads
-        try:
-            log.warn("Downloading %s", url)
-            src = urlopen(url)
-            # Read/write all in one block, so we don't create a corrupt file
-            # if the download is interrupted.
-            data = src.read()
-
-            if chksum is not None:
-                data_sum = md5(data).hexdigest()
-                if data_sum != chksum:
-                    raise RuntimeError("Downloading %s failed: corrupt checksum"%(url,))
-
-
-            dst = open(saveto, "wb")
-            dst.write(data)
-        finally:
-            if src:
-                src.close()
-            if dst:
-                dst.close()
-    return os.path.realpath(saveto)
-
-
-
-def _extractall(self, path=".", members=None):
-    """Extract all members from the archive to the current working
-       directory and set owner, modification time and permissions on
-       directories afterwards. `path' specifies a different directory
-       to extract to. `members' is optional and must be a subset of the
-       list returned by getmembers().
-    """
-    import copy
-    import operator
-    from tarfile import ExtractError
-    directories = []
-
-    if members is None:
-        members = self
-
-    for tarinfo in members:
-        if tarinfo.isdir():
-            # Extract directories with a safe mode.
-            directories.append(tarinfo)
-            tarinfo = copy.copy(tarinfo)
-            tarinfo.mode = 448 # decimal for oct 0700
-        self.extract(tarinfo, path)
-
-    # Reverse sort directories.
-    if sys.version_info < (2, 4):
-        def sorter(dir1, dir2):
-            return cmp(dir1.name, dir2.name)
-        directories.sort(sorter)
-        directories.reverse()
-    else:
-        directories.sort(key=operator.attrgetter('name'), reverse=True)
-
-    # Set correct owner, mtime and filemode on directories.
-    for tarinfo in directories:
-        dirpath = os.path.join(path, tarinfo.name)
-        try:
-            self.chown(tarinfo, dirpath)
-            self.utime(tarinfo, dirpath)
-            self.chmod(tarinfo, dirpath)
-        except ExtractError:
-            e = sys.exc_info()[1]
-            if self.errorlevel > 1:
-                raise
-            else:
-                self._dbg(1, "tarfile: %s" % e)
-
-
-#
-#
-#
-# Definitions of custom commands
-#
-#
-#
-
-try:
-    import setuptools
-
-except ImportError:
-    use_setuptools()
-
-from setuptools import setup
-
-try:
-    from distutils.core import PyPIRCCommand
-except ImportError:
-    PyPIRCCommand = None # Ancient python version
-
-from distutils.core import Command
-from distutils.errors  import DistutilsError
-from distutils import log
-
-if PyPIRCCommand is None:
-    class upload_docs (Command):
-        description = "upload sphinx documentation"
-        user_options = []
-
-        def initialize_options(self):
-            pass
-
-        def finalize_options(self):
-            pass
-
-        def run(self):
-            raise DistutilsError("not supported on this version of python")
-
-else:
-    class upload_docs (PyPIRCCommand):
-        description = "upload sphinx documentation"
-        user_options = PyPIRCCommand.user_options
-
-        def initialize_options(self):
-            PyPIRCCommand.initialize_options(self)
-            self.username = ''
-            self.password = ''
-
-
-        def finalize_options(self):
-            PyPIRCCommand.finalize_options(self)
-            config = self._read_pypirc()
-            if config != {}:
-                self.username = config['username']
-                self.password = config['password']
-
-
-        def run(self):
-            import subprocess
-            import shutil
-            import zipfile
-            import os
-            import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error
-            try:
-                from StringIO import StringIO
-            except ImportError:
-                from io import StringIO
-            from base64 import standard_b64encode
-            import six.moves.http_client
-            import six.moves.urllib.parse
-
-            # Extract the package name from distutils metadata
-            meta = self.distribution.metadata
-            name = meta.get_name()
-
-            # Run sphinx
-            if os.path.exists('doc/_build'):
-                shutil.rmtree('doc/_build')
-            os.mkdir('doc/_build')
-
-            p = subprocess.Popen(['make', 'html'],
-                cwd='doc')
-            exit = p.wait()
-            if exit != 0:
-                raise DistutilsError("sphinx-build failed")
-
-            # Collect sphinx output
-            if not os.path.exists('dist'):
-                os.mkdir('dist')
-            zf = zipfile.ZipFile('dist/%s-docs.zip'%(name,), 'w',
-                    compression=zipfile.ZIP_DEFLATED)
-
-            for toplevel, dirs, files in os.walk('doc/_build/html'):
-                for fn in files:
-                    fullname = os.path.join(toplevel, fn)
-                    relname = os.path.relpath(fullname, 'doc/_build/html')
-
-                    print ("%s -> %s"%(fullname, relname))
-
-                    zf.write(fullname, relname)
-
-            zf.close()
-
-            # Upload the results, this code is based on the distutils
-            # 'upload' command.
-            content = open('dist/%s-docs.zip'%(name,), 'rb').read()
-
-            data = {
-                ':action': 'doc_upload',
-                'name': name,
-                'content': ('%s-docs.zip'%(name,), content),
-            }
-            auth = "Basic " + standard_b64encode(self.username + ":" +
-                 self.password)
-
-
-            boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
-            sep_boundary = '\n--' + boundary
-            end_boundary = sep_boundary + '--'
-            body = StringIO()
-            for key, value in data.items():
-                if not isinstance(value, list):
-                    value = [value]
-
-                for value in value:
-                    if isinstance(value, tuple):
-                        fn = ';filename="%s"'%(value[0])
-                        value = value[1]
-                    else:
-                        fn = ''
-
-                    body.write(sep_boundary)
-                    body.write('\nContent-Disposition: form-data; name="%s"'%key)
-                    body.write(fn)
-                    body.write("\n\n")
-                    body.write(value)
-
-            body.write(end_boundary)
-            body.write('\n')
-            body = body.getvalue()
-
-            self.announce("Uploading documentation to %s"%(self.repository,), log.INFO)
-
-            schema, netloc, url, params, query, fragments = \
-                    six.moves.urllib.parse.urlparse(self.repository)
-
-
-            if schema == 'http':
-                http = six.moves.http_client.HTTPConnection(netloc)
-            elif schema == 'https':
-                http = six.moves.http_client.HTTPSConnection(netloc)
-            else:
-                raise AssertionError("unsupported schema "+schema)
-
-            data = ''
-            loglevel = log.INFO
-            try:
-                http.connect()
-                http.putrequest("POST", url)
-                http.putheader('Content-type',
-                    'multipart/form-data; boundary=%s'%boundary)
-                http.putheader('Content-length', str(len(body)))
-                http.putheader('Authorization', auth)
-                http.endheaders()
-                http.send(body)
-            except socket.error:
-                e = socket.exc_info()[1]
-                self.announce(str(e), log.ERROR)
-                return
-
-            r = http.getresponse()
-            if r.status in (200, 301):
-                self.announce('Upload succeeded (%s): %s' % (r.status, r.reason),
-                    log.INFO)
-            else:
-                self.announce('Upload failed (%s): %s' % (r.status, r.reason),
-                    log.ERROR)
-
-                print ('-'*75)
-                print (r.read())
-                print ('-'*75)
-
-
-def recursiveGlob(root, pathPattern):
-    """
-    Recursively look for files matching 'pathPattern'. Return a list
-    of matching files/directories.
-    """
-    result = []
-
-    for rootpath, dirnames, filenames in os.walk(root):
-        for fn in filenames:
-            if fnmatch(fn, pathPattern):
-                result.append(os.path.join(rootpath, fn))
-    return result
-
-
-def importExternalTestCases(unittest,
-        pathPattern="test_*.py", root=".", package=None):
-    """
-    Import all unittests in the PyObjC tree starting at 'root'
-    """
-
-    testFiles = recursiveGlob(root, pathPattern)
-    testModules = [x[len(root)+1:-3].replace('/', '.') for x in testFiles]
-    if package is not None:
-        testModules = [(package + '.' + m) for m in testModules]
-
-    suites = []
-
-    for modName in testModules:
-        try:
-            module = __import__(modName)
-        except ImportError:
-            print("SKIP %s: %s"%(modName, sys.exc_info()[1]))
-            continue
-
-        if '.' in modName:
-            for elem in modName.split('.')[1:]:
-                module = getattr(module, elem)
-
-        s = unittest.defaultTestLoader.loadTestsFromModule(module)
-        suites.append(s)
-
-    return unittest.TestSuite(suites)
-
-
-
-class test (Command):
-    description = "run test suite"
-    user_options = [
-        ('verbosity=', None, "print what tests are run"),
-    ]
-
-    def initialize_options(self):
-        self.verbosity='1'
-
-    def finalize_options(self):
-        if isinstance(self.verbosity, str):
-            self.verbosity = int(self.verbosity)
-
-
-    def cleanup_environment(self):
-        ei_cmd = self.get_finalized_command('egg_info')
-        egg_name = ei_cmd.egg_name.replace('-', '_')
-
-        to_remove =  []
-        for dirname in sys.path:
-            bn = os.path.basename(dirname)
-            if bn.startswith(egg_name + "-"):
-                to_remove.append(dirname)
-
-        for dirname in to_remove:
-            log.info("removing installed %r from sys.path before testing"%(
-                dirname,))
-            sys.path.remove(dirname)
-
-    def add_project_to_sys_path(self):
-        from pkg_resources import normalize_path, add_activation_listener
-        from pkg_resources import working_set, require
-
-        self.reinitialize_command('egg_info')
-        self.run_command('egg_info')
-        self.reinitialize_command('build_ext', inplace=1)
-        self.run_command('build_ext')
-
-
-        # Check if this distribution is already on sys.path
-        # and remove that version, this ensures that the right
-        # copy of the package gets tested.
-
-        self.__old_path = sys.path[:]
-        self.__old_modules = sys.modules.copy()
-
-
-        ei_cmd = self.get_finalized_command('egg_info')
-        sys.path.insert(0, normalize_path(ei_cmd.egg_base))
-        sys.path.insert(1, os.path.dirname(__file__))
-
-        # Strip the namespace packages defined in this distribution
-        # from sys.modules, needed to reset the search path for
-        # those modules.
-
-        nspkgs = getattr(self.distribution, 'namespace_packages')
-        if nspkgs is not None:
-            for nm in nspkgs:
-                del sys.modules[nm]
-
-        # Reset pkg_resources state:
-        add_activation_listener(lambda dist: dist.activate())
-        working_set.__init__()
-        require('%s==%s'%(ei_cmd.egg_name, ei_cmd.egg_version))
-
-    def remove_from_sys_path(self):
-        from pkg_resources import working_set
-        sys.path[:] = self.__old_path
-        sys.modules.clear()
-        sys.modules.update(self.__old_modules)
-        working_set.__init__()
-
-
-    def run(self):
-        import unittest
-
-        # Ensure that build directory is on sys.path (py3k)
-
-        self.cleanup_environment()
-        self.add_project_to_sys_path()
-
-        try:
-            meta = self.distribution.metadata
-            name = meta.get_name()
-            test_pkg = name + "_tests"
-            suite = importExternalTestCases(unittest,
-                    "test_*.py", test_pkg, test_pkg)
-
-            runner = unittest.TextTestRunner(verbosity=self.verbosity)
-            result = runner.run(suite)
-
-            # Print out summary. This is a structured format that
-            # should make it easy to use this information in scripts.
-            summary = dict(
-                count=result.testsRun,
-                fails=len(result.failures),
-                errors=len(result.errors),
-                xfails=len(getattr(result, 'expectedFailures', [])),
-                xpass=len(getattr(result, 'expectedSuccesses', [])),
-                skip=len(getattr(result, 'skipped', [])),
-            )
-            print("SUMMARY: %s"%(summary,))
-
-        finally:
-            self.remove_from_sys_path()
-
-#
-#
-#
-#  And finally run the setuptools main entry point.
-#
-#
-#
-
-metadata = parse_setup_cfg()
-
-setup(
-    cmdclass=dict(
-        upload_docs=upload_docs,
-        test=test,
-    ),
-    **metadata
-)
diff --git a/third_party/typ/typ/runner.py b/third_party/typ/typ/runner.py
index 29f5779..d16fa8e 100644
--- a/third_party/typ/typ/runner.py
+++ b/third_party/typ/typ/runner.py
@@ -552,6 +552,8 @@
             # In Python3's version of unittest, loader failures get converted
             # into failed test cases, rather than raising exceptions. However,
             # the errors also get recorded so you can err out immediately.
+            if isinstance(loader.errors, list):
+                raise ImportError('\n'.join(loader.errors))
             raise ImportError(loader.errors)
 
     def _run_tests(self, result_set, test_set, all_tests):
@@ -1039,12 +1041,18 @@
 
         test_name_to_load = child.test_name_prefix + test_name
         try:
+            # If we have errors around from before, clear them now so we don't
+            # attempt to handle them later.
+            if hasattr(child.loader, 'errors') and child.loader.errors:
+                child.loader.errors.clear()
             suite = child.loader.loadTestsFromName(test_name_to_load)
             # From Python 3.5, AttributeError will not be thrown when calling
             # LoadTestsFromName. Instead, it adds error messages in the loader.
             # As a result, the original handling cannot kick in properly. We
             # now check the error message and throw exception as needed.
             if hasattr(child.loader, 'errors') and child.loader.errors:
+                if isinstance(child.loader.errors, list):
+                    raise AttributeError('\n'.join(child.loader.errors))
                 raise AttributeError(child.loader.errors)
         except Exception as e:
             ex_str = ('loadTestsFromName("%s") failed: %s\n%s\n' %