Bug 1472201 - Vendor pytest 3.6.2 and dependencies; r=ahal
authorDave Hunt <dhunt@mozilla.com>
Fri, 29 Jun 2018 15:37:31 +0100
changeset 424525 a566524dd1278c313290625c04461b50142d1f70
parent 424524 b9658b2c0044cdfe813ef226882584273f65a063
child 424526 0ef1451e9411301a45f06bcb175d5f46620de49e
push id104839
push userapavel@mozilla.com
push dateSat, 30 Jun 2018 10:10:38 +0000
treeherdermozilla-inbound@2ca5041d140e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1472201
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1472201 - Vendor pytest 3.6.2 and dependencies; r=ahal MozReview-Commit-ID: 5qfK6OygVMH
Pipfile
Pipfile.lock
build/virtualenv_packages.txt
third_party/python/atomicwrites/LICENSE
third_party/python/atomicwrites/MANIFEST.in
third_party/python/atomicwrites/PKG-INFO
third_party/python/atomicwrites/README.rst
third_party/python/atomicwrites/atomicwrites/__init__.py
third_party/python/atomicwrites/docs/Makefile
third_party/python/atomicwrites/docs/conf.py
third_party/python/atomicwrites/docs/index.rst
third_party/python/atomicwrites/docs/make.bat
third_party/python/atomicwrites/setup.cfg
third_party/python/atomicwrites/setup.py
third_party/python/atomicwrites/tests/test_atomicwrites.py
third_party/python/funcsigs/CHANGELOG
third_party/python/funcsigs/LICENSE
third_party/python/funcsigs/MANIFEST.in
third_party/python/funcsigs/PKG-INFO
third_party/python/funcsigs/README.rst
third_party/python/funcsigs/docs/Makefile
third_party/python/funcsigs/docs/_templates/page.html
third_party/python/funcsigs/docs/conf.py
third_party/python/funcsigs/docs/index.rst
third_party/python/funcsigs/funcsigs/__init__.py
third_party/python/funcsigs/funcsigs/version.py
third_party/python/funcsigs/setup.cfg
third_party/python/funcsigs/setup.py
third_party/python/funcsigs/tests/__init__.py
third_party/python/funcsigs/tests/test_formatannotation.py
third_party/python/funcsigs/tests/test_funcsigs.py
third_party/python/funcsigs/tests/test_inspect.py
third_party/python/more-itertools/LICENSE
third_party/python/more-itertools/MANIFEST.in
third_party/python/more-itertools/PKG-INFO
third_party/python/more-itertools/README.rst
third_party/python/more-itertools/docs/Makefile
third_party/python/more-itertools/docs/api.rst
third_party/python/more-itertools/docs/conf.py
third_party/python/more-itertools/docs/index.rst
third_party/python/more-itertools/docs/license.rst
third_party/python/more-itertools/docs/make.bat
third_party/python/more-itertools/docs/testing.rst
third_party/python/more-itertools/docs/versions.rst
third_party/python/more-itertools/more_itertools/__init__.py
third_party/python/more-itertools/more_itertools/more.py
third_party/python/more-itertools/more_itertools/recipes.py
third_party/python/more-itertools/more_itertools/tests/__init__.py
third_party/python/more-itertools/more_itertools/tests/test_more.py
third_party/python/more-itertools/more_itertools/tests/test_recipes.py
third_party/python/more-itertools/setup.cfg
third_party/python/more-itertools/setup.py
third_party/python/more-itertools/tox.ini
third_party/python/pluggy/LICENSE
third_party/python/pluggy/MANIFEST.in
third_party/python/pluggy/PKG-INFO
third_party/python/pluggy/README.rst
third_party/python/pluggy/pluggy/__init__.py
third_party/python/pluggy/pluggy/callers.py
third_party/python/pluggy/setup.cfg
third_party/python/pluggy/setup.py
third_party/python/pluggy/testing/benchmark.py
third_party/python/pluggy/testing/conftest.py
third_party/python/pluggy/testing/test_details.py
third_party/python/pluggy/testing/test_helpers.py
third_party/python/pluggy/testing/test_hookrelay.py
third_party/python/pluggy/testing/test_method_ordering.py
third_party/python/pluggy/testing/test_multicall.py
third_party/python/pluggy/testing/test_pluginmanager.py
third_party/python/pluggy/testing/test_tracer.py
third_party/python/pluggy/tox.ini
third_party/python/py/.gitignore
third_party/python/py/.hgignore
third_party/python/py/.hgtags
third_party/python/py/.travis.yml
third_party/python/py/CHANGELOG
third_party/python/py/HOWTORELEASE.rst
third_party/python/py/PKG-INFO
third_party/python/py/README.rst
third_party/python/py/appveyor.yml
third_party/python/py/doc/path.txt
third_party/python/py/py/__init__.py
third_party/python/py/py/_path/local.py
third_party/python/py/py/_version.py
third_party/python/py/setup.py
third_party/python/py/testing/path/test_local.py
third_party/python/pytest/.coveragerc
third_party/python/pytest/.github/PULL_REQUEST_TEMPLATE.md
third_party/python/pytest/.gitignore
third_party/python/pytest/.pre-commit-config.yaml
third_party/python/pytest/.travis.yml
third_party/python/pytest/AUTHORS
third_party/python/pytest/CHANGELOG.rst
third_party/python/pytest/CONTRIBUTING.rst
third_party/python/pytest/HOWTORELEASE.rst
third_party/python/pytest/PKG-INFO
third_party/python/pytest/README.rst
third_party/python/pytest/_pytest/__init__.py
third_party/python/pytest/_pytest/_argcomplete.py
third_party/python/pytest/_pytest/_code/__init__.py
third_party/python/pytest/_pytest/_code/_py2traceback.py
third_party/python/pytest/_pytest/_code/code.py
third_party/python/pytest/_pytest/_code/source.py
third_party/python/pytest/_pytest/_pluggy.py
third_party/python/pytest/_pytest/_version.py
third_party/python/pytest/_pytest/assertion/__init__.py
third_party/python/pytest/_pytest/assertion/rewrite.py
third_party/python/pytest/_pytest/assertion/truncate.py
third_party/python/pytest/_pytest/assertion/util.py
third_party/python/pytest/_pytest/cacheprovider.py
third_party/python/pytest/_pytest/capture.py
third_party/python/pytest/_pytest/compat.py
third_party/python/pytest/_pytest/config.py
third_party/python/pytest/_pytest/debugging.py
third_party/python/pytest/_pytest/deprecated.py
third_party/python/pytest/_pytest/doctest.py
third_party/python/pytest/_pytest/fixtures.py
third_party/python/pytest/_pytest/freeze_support.py
third_party/python/pytest/_pytest/helpconfig.py
third_party/python/pytest/_pytest/hookspec.py
third_party/python/pytest/_pytest/junitxml.py
third_party/python/pytest/_pytest/main.py
third_party/python/pytest/_pytest/mark.py
third_party/python/pytest/_pytest/monkeypatch.py
third_party/python/pytest/_pytest/nodes.py
third_party/python/pytest/_pytest/nose.py
third_party/python/pytest/_pytest/outcomes.py
third_party/python/pytest/_pytest/pastebin.py
third_party/python/pytest/_pytest/pytester.py
third_party/python/pytest/_pytest/python.py
third_party/python/pytest/_pytest/python_api.py
third_party/python/pytest/_pytest/recwarn.py
third_party/python/pytest/_pytest/resultlog.py
third_party/python/pytest/_pytest/runner.py
third_party/python/pytest/_pytest/setuponly.py
third_party/python/pytest/_pytest/setupplan.py
third_party/python/pytest/_pytest/skipping.py
third_party/python/pytest/_pytest/terminal.py
third_party/python/pytest/_pytest/tmpdir.py
third_party/python/pytest/_pytest/unittest.py
third_party/python/pytest/_pytest/vendored_packages/README.md
third_party/python/pytest/_pytest/vendored_packages/__init__.py
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/DESCRIPTION.rst
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/INSTALLER
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/LICENSE.txt
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/METADATA
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/RECORD
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/WHEEL
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/metadata.json
third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/top_level.txt
third_party/python/pytest/_pytest/vendored_packages/pluggy.py
third_party/python/pytest/_pytest/warnings.py
third_party/python/pytest/appveyor.yml
third_party/python/pytest/bench/bench.py
third_party/python/pytest/bench/bench_argcomplete.py
third_party/python/pytest/bench/empty.py
third_party/python/pytest/bench/manyparam.py
third_party/python/pytest/bench/skip.py
third_party/python/pytest/changelog/README.rst
third_party/python/pytest/doc/en/Makefile
third_party/python/pytest/doc/en/_templates/globaltoc.html
third_party/python/pytest/doc/en/_templates/links.html
third_party/python/pytest/doc/en/_themes/flask/theme.conf
third_party/python/pytest/doc/en/_themes/flask_theme_support.py
third_party/python/pytest/doc/en/announce/index.rst
third_party/python/pytest/doc/en/announce/release-2.0.3.rst
third_party/python/pytest/doc/en/announce/release-2.1.1.rst
third_party/python/pytest/doc/en/announce/release-2.1.2.rst
third_party/python/pytest/doc/en/announce/release-2.1.3.rst
third_party/python/pytest/doc/en/announce/release-2.2.1.rst
third_party/python/pytest/doc/en/announce/release-2.2.2.rst
third_party/python/pytest/doc/en/announce/release-2.2.4.rst
third_party/python/pytest/doc/en/announce/release-2.3.0.rst
third_party/python/pytest/doc/en/announce/release-2.3.1.rst
third_party/python/pytest/doc/en/announce/release-2.3.2.rst
third_party/python/pytest/doc/en/announce/release-2.3.3.rst
third_party/python/pytest/doc/en/announce/release-2.3.4.rst
third_party/python/pytest/doc/en/announce/release-2.3.5.rst
third_party/python/pytest/doc/en/announce/release-2.4.0.rst
third_party/python/pytest/doc/en/announce/release-2.4.1.rst
third_party/python/pytest/doc/en/announce/release-2.4.2.rst
third_party/python/pytest/doc/en/announce/release-2.5.0.rst
third_party/python/pytest/doc/en/announce/release-2.5.1.rst
third_party/python/pytest/doc/en/announce/release-2.5.2.rst
third_party/python/pytest/doc/en/announce/release-2.6.1.rst
third_party/python/pytest/doc/en/announce/release-2.6.2.rst
third_party/python/pytest/doc/en/announce/release-2.6.3.rst
third_party/python/pytest/doc/en/announce/release-2.7.0.rst
third_party/python/pytest/doc/en/announce/release-2.7.2.rst
third_party/python/pytest/doc/en/announce/release-2.8.3.rst
third_party/python/pytest/doc/en/announce/release-2.8.7.rst
third_party/python/pytest/doc/en/announce/release-2.9.0.rst
third_party/python/pytest/doc/en/announce/release-2.9.1.rst
third_party/python/pytest/doc/en/announce/release-3.0.0.rst
third_party/python/pytest/doc/en/announce/release-3.0.1.rst
third_party/python/pytest/doc/en/announce/release-3.0.2.rst
third_party/python/pytest/doc/en/announce/release-3.0.3.rst
third_party/python/pytest/doc/en/announce/release-3.0.4.rst
third_party/python/pytest/doc/en/announce/release-3.0.5.rst
third_party/python/pytest/doc/en/announce/release-3.0.6.rst
third_party/python/pytest/doc/en/announce/release-3.0.7.rst
third_party/python/pytest/doc/en/announce/release-3.1.1.rst
third_party/python/pytest/doc/en/announce/release-3.1.2.rst
third_party/python/pytest/doc/en/announce/release-3.1.3.rst
third_party/python/pytest/doc/en/announce/release-3.2.1.rst
third_party/python/pytest/doc/en/announce/release-3.2.2.rst
third_party/python/pytest/doc/en/announce/release-3.2.3.rst
third_party/python/pytest/doc/en/announce/release-3.2.4.rst
third_party/python/pytest/doc/en/announce/release-3.2.5.rst
third_party/python/pytest/doc/en/announce/release-3.3.0.rst
third_party/python/pytest/doc/en/announce/release-3.3.1.rst
third_party/python/pytest/doc/en/announce/release-3.3.2.rst
third_party/python/pytest/doc/en/announce/release-3.4.0.rst
third_party/python/pytest/doc/en/announce/release-3.4.1.rst
third_party/python/pytest/doc/en/announce/release-3.4.2.rst
third_party/python/pytest/doc/en/announce/release-3.5.0.rst
third_party/python/pytest/doc/en/announce/release-3.5.1.rst
third_party/python/pytest/doc/en/announce/release-3.6.0.rst
third_party/python/pytest/doc/en/announce/release-3.6.1.rst
third_party/python/pytest/doc/en/announce/release-3.6.2.rst
third_party/python/pytest/doc/en/assert.rst
third_party/python/pytest/doc/en/backwards-compatibility.rst
third_party/python/pytest/doc/en/bash-completion.rst
third_party/python/pytest/doc/en/builtin.rst
third_party/python/pytest/doc/en/cache.rst
third_party/python/pytest/doc/en/capture.rst
third_party/python/pytest/doc/en/check_sphinx.py
third_party/python/pytest/doc/en/conf.py
third_party/python/pytest/doc/en/contact.rst
third_party/python/pytest/doc/en/contents.rst
third_party/python/pytest/doc/en/customize.rst
third_party/python/pytest/doc/en/development_guide.rst
third_party/python/pytest/doc/en/doctest.rst
third_party/python/pytest/doc/en/example/assertion/failure_demo.py
third_party/python/pytest/doc/en/example/assertion/global_testmodule_config/conftest.py
third_party/python/pytest/doc/en/example/assertion/global_testmodule_config/test_hello.py
third_party/python/pytest/doc/en/example/assertion/global_testmodule_config/test_hello_world.py
third_party/python/pytest/doc/en/example/assertion/test_failures.py
third_party/python/pytest/doc/en/example/assertion/test_setup_flow_example.py
third_party/python/pytest/doc/en/example/attic.rst
third_party/python/pytest/doc/en/example/costlysetup/conftest.py
third_party/python/pytest/doc/en/example/costlysetup/sub1/__init__.py
third_party/python/pytest/doc/en/example/costlysetup/sub1/test_quick.py
third_party/python/pytest/doc/en/example/costlysetup/sub2/__init__.py
third_party/python/pytest/doc/en/example/costlysetup/sub2/test_two.py
third_party/python/pytest/doc/en/example/costlysetup/sub_a/__init__.py
third_party/python/pytest/doc/en/example/costlysetup/sub_a/test_quick.py
third_party/python/pytest/doc/en/example/costlysetup/sub_b/__init__.py
third_party/python/pytest/doc/en/example/costlysetup/sub_b/test_two.py
third_party/python/pytest/doc/en/example/markers.rst
third_party/python/pytest/doc/en/example/multipython.py
third_party/python/pytest/doc/en/example/nonpython.rst
third_party/python/pytest/doc/en/example/nonpython/conftest.py
third_party/python/pytest/doc/en/example/parametrize.rst
third_party/python/pytest/doc/en/example/py2py3/conftest.py
third_party/python/pytest/doc/en/example/py2py3/test_py2.py
third_party/python/pytest/doc/en/example/py2py3/test_py3.py
third_party/python/pytest/doc/en/example/pythoncollection.py
third_party/python/pytest/doc/en/example/pythoncollection.rst
third_party/python/pytest/doc/en/example/reportingdemo.rst
third_party/python/pytest/doc/en/example/simple.rst
third_party/python/pytest/doc/en/example/xfail_demo.py
third_party/python/pytest/doc/en/faq.rst
third_party/python/pytest/doc/en/fixture.rst
third_party/python/pytest/doc/en/funcarg_compare.rst
third_party/python/pytest/doc/en/funcargs.rst
third_party/python/pytest/doc/en/genapi.py
third_party/python/pytest/doc/en/getting-started.rst
third_party/python/pytest/doc/en/goodpractices.rst
third_party/python/pytest/doc/en/index.rst
third_party/python/pytest/doc/en/links.inc
third_party/python/pytest/doc/en/logging.rst
third_party/python/pytest/doc/en/mark.rst
third_party/python/pytest/doc/en/monkeypatch.rst
third_party/python/pytest/doc/en/nose.rst
third_party/python/pytest/doc/en/parametrize.rst
third_party/python/pytest/doc/en/plugins.rst
third_party/python/pytest/doc/en/projects.rst
third_party/python/pytest/doc/en/proposals/parametrize_with_fixtures.rst
third_party/python/pytest/doc/en/reference.rst
third_party/python/pytest/doc/en/requirements.txt
third_party/python/pytest/doc/en/skipping.rst
third_party/python/pytest/doc/en/talks.rst
third_party/python/pytest/doc/en/test/attic.rst
third_party/python/pytest/doc/en/test/config.html
third_party/python/pytest/doc/en/test/dist.html
third_party/python/pytest/doc/en/test/extend.html
third_party/python/pytest/doc/en/test/index.rst
third_party/python/pytest/doc/en/test/mission.rst
third_party/python/pytest/doc/en/test/plugin/cov.rst
third_party/python/pytest/doc/en/test/plugin/coverage.rst
third_party/python/pytest/doc/en/test/plugin/django.rst
third_party/python/pytest/doc/en/test/plugin/figleaf.rst
third_party/python/pytest/doc/en/test/plugin/helpconfig.rst
third_party/python/pytest/doc/en/test/plugin/index.rst
third_party/python/pytest/doc/en/test/plugin/links.rst
third_party/python/pytest/doc/en/test/plugin/nose.rst
third_party/python/pytest/doc/en/test/plugin/oejskit.rst
third_party/python/pytest/doc/en/test/plugin/terminal.rst
third_party/python/pytest/doc/en/test/plugin/xdist.rst
third_party/python/pytest/doc/en/test/test.html
third_party/python/pytest/doc/en/tmpdir.rst
third_party/python/pytest/doc/en/unittest.rst
third_party/python/pytest/doc/en/usage.rst
third_party/python/pytest/doc/en/warnings.rst
third_party/python/pytest/doc/en/writing_plugins.rst
third_party/python/pytest/doc/en/xunit_setup.rst
third_party/python/pytest/extra/get_issues.py
third_party/python/pytest/pyproject.toml
third_party/python/pytest/pytest.py
third_party/python/pytest/scripts/check-rst.py
third_party/python/pytest/setup.py
third_party/python/pytest/src/_pytest/__init__.py
third_party/python/pytest/src/_pytest/_argcomplete.py
third_party/python/pytest/src/_pytest/_code/__init__.py
third_party/python/pytest/src/_pytest/_code/_py2traceback.py
third_party/python/pytest/src/_pytest/_code/code.py
third_party/python/pytest/src/_pytest/_code/source.py
third_party/python/pytest/src/_pytest/_version.py
third_party/python/pytest/src/_pytest/assertion/__init__.py
third_party/python/pytest/src/_pytest/assertion/rewrite.py
third_party/python/pytest/src/_pytest/assertion/truncate.py
third_party/python/pytest/src/_pytest/assertion/util.py
third_party/python/pytest/src/_pytest/cacheprovider.py
third_party/python/pytest/src/_pytest/capture.py
third_party/python/pytest/src/_pytest/compat.py
third_party/python/pytest/src/_pytest/config/__init__.py
third_party/python/pytest/src/_pytest/config/argparsing.py
third_party/python/pytest/src/_pytest/config/exceptions.py
third_party/python/pytest/src/_pytest/config/findpaths.py
third_party/python/pytest/src/_pytest/debugging.py
third_party/python/pytest/src/_pytest/deprecated.py
third_party/python/pytest/src/_pytest/doctest.py
third_party/python/pytest/src/_pytest/fixtures.py
third_party/python/pytest/src/_pytest/freeze_support.py
third_party/python/pytest/src/_pytest/helpconfig.py
third_party/python/pytest/src/_pytest/hookspec.py
third_party/python/pytest/src/_pytest/junitxml.py
third_party/python/pytest/src/_pytest/logging.py
third_party/python/pytest/src/_pytest/main.py
third_party/python/pytest/src/_pytest/mark/__init__.py
third_party/python/pytest/src/_pytest/mark/evaluate.py
third_party/python/pytest/src/_pytest/mark/legacy.py
third_party/python/pytest/src/_pytest/mark/structures.py
third_party/python/pytest/src/_pytest/monkeypatch.py
third_party/python/pytest/src/_pytest/nodes.py
third_party/python/pytest/src/_pytest/nose.py
third_party/python/pytest/src/_pytest/outcomes.py
third_party/python/pytest/src/_pytest/pastebin.py
third_party/python/pytest/src/_pytest/pytester.py
third_party/python/pytest/src/_pytest/python.py
third_party/python/pytest/src/_pytest/python_api.py
third_party/python/pytest/src/_pytest/recwarn.py
third_party/python/pytest/src/_pytest/resultlog.py
third_party/python/pytest/src/_pytest/runner.py
third_party/python/pytest/src/_pytest/setuponly.py
third_party/python/pytest/src/_pytest/setupplan.py
third_party/python/pytest/src/_pytest/skipping.py
third_party/python/pytest/src/_pytest/terminal.py
third_party/python/pytest/src/_pytest/tmpdir.py
third_party/python/pytest/src/_pytest/unittest.py
third_party/python/pytest/src/_pytest/warnings.py
third_party/python/pytest/src/pytest.py
third_party/python/pytest/tasks/__init__.py
third_party/python/pytest/tasks/generate.py
third_party/python/pytest/tasks/release.minor.rst
third_party/python/pytest/tasks/release.patch.rst
third_party/python/pytest/tasks/requirements.txt
third_party/python/pytest/tasks/vendoring.py
third_party/python/pytest/testing/acceptance_test.py
third_party/python/pytest/testing/code/test_code.py
third_party/python/pytest/testing/code/test_excinfo.py
third_party/python/pytest/testing/code/test_source.py
third_party/python/pytest/testing/code/test_source_multiline_block.py
third_party/python/pytest/testing/deprecated_test.py
third_party/python/pytest/testing/freeze/.gitignore
third_party/python/pytest/testing/freeze/create_executable.py
third_party/python/pytest/testing/freeze/runtests_script.py
third_party/python/pytest/testing/freeze/tests/test_trivial.py
third_party/python/pytest/testing/freeze/tox_run.py
third_party/python/pytest/testing/logging/test_fixture.py
third_party/python/pytest/testing/logging/test_formatter.py
third_party/python/pytest/testing/logging/test_reporting.py
third_party/python/pytest/testing/python/approx.py
third_party/python/pytest/testing/python/collect.py
third_party/python/pytest/testing/python/fixture.py
third_party/python/pytest/testing/python/integration.py
third_party/python/pytest/testing/python/metafunc.py
third_party/python/pytest/testing/python/raises.py
third_party/python/pytest/testing/python/setup_only.py
third_party/python/pytest/testing/python/setup_plan.py
third_party/python/pytest/testing/python/show_fixtures_per_test.py
third_party/python/pytest/testing/python/test_deprecations.py
third_party/python/pytest/testing/test_argcomplete.py
third_party/python/pytest/testing/test_assertion.py
third_party/python/pytest/testing/test_assertrewrite.py
third_party/python/pytest/testing/test_cache.py
third_party/python/pytest/testing/test_cacheprovider.py
third_party/python/pytest/testing/test_capture.py
third_party/python/pytest/testing/test_collection.py
third_party/python/pytest/testing/test_compat.py
third_party/python/pytest/testing/test_config.py
third_party/python/pytest/testing/test_conftest.py
third_party/python/pytest/testing/test_doctest.py
third_party/python/pytest/testing/test_entry_points.py
third_party/python/pytest/testing/test_helpconfig.py
third_party/python/pytest/testing/test_junitxml.py
third_party/python/pytest/testing/test_mark.py
third_party/python/pytest/testing/test_modimport.py
third_party/python/pytest/testing/test_monkeypatch.py
third_party/python/pytest/testing/test_nodes.py
third_party/python/pytest/testing/test_nose.py
third_party/python/pytest/testing/test_parseopt.py
third_party/python/pytest/testing/test_pastebin.py
third_party/python/pytest/testing/test_pdb.py
third_party/python/pytest/testing/test_pluginmanager.py
third_party/python/pytest/testing/test_pytester.py
third_party/python/pytest/testing/test_recwarn.py
third_party/python/pytest/testing/test_resultlog.py
third_party/python/pytest/testing/test_runner.py
third_party/python/pytest/testing/test_runner_xunit.py
third_party/python/pytest/testing/test_session.py
third_party/python/pytest/testing/test_skipping.py
third_party/python/pytest/testing/test_terminal.py
third_party/python/pytest/testing/test_tmpdir.py
third_party/python/pytest/testing/test_unittest.py
third_party/python/pytest/testing/test_warnings.py
third_party/python/pytest/tox.ini
--- a/Pipfile
+++ b/Pipfile
@@ -6,14 +6,14 @@ name = "pypi"
 [dev-packages]
 
 [packages]
 attrs = "==18.1.0"
 blessings = "==1.7"
 jsmin = "==2.1.0"
 json-e = "==2.5.0"
 pipenv = "==2018.5.18"
-pytest = "==3.2.5"
+pytest = "==3.6.2"
 python-hglib = "==2.4"
 requests = "==2.9.1"
 six = "==1.10.0"
 virtualenv = "==15.2.0"
 voluptuous = "==0.10.5"
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,24 +1,31 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "7e168601e5f93e71900ebc68d8c18ff17edb6d5e224bcc83286b9bafaac41fe8"
+            "sha256": "609a35f65e9a4c07e0e1473ec982c6b5028622e9a795b6cfb8555ad8574804f3"
         },
         "pipfile-spec": 6,
         "requires": {},
         "sources": [
             {
                 "name": "pypi",
                 "url": "https://pypi.org/simple",
                 "verify_ssl": true
             }
         ]
     },
     "default": {
+        "atomicwrites": {
+            "hashes": [
+                "sha256:240831ea22da9ab882b551b31d4225591e5e447a68c5e188db5b89ca1d487585",
+                "sha256:a24da68318b08ac9c9c45029f4a10371ab5b20e4226738e150e6e7c571630ae6"
+            ],
+            "version": "==1.1.5"
+        },
         "attrs": {
             "hashes": [
                 "sha256:4b90b09eeeb9b88c35bc642cbac057e45a5fd85367b985bd2809c62b7b939265",
                 "sha256:e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b"
             ],
             "index": "pypi",
             "version": "==18.1.0"
         },
@@ -33,52 +40,76 @@
         },
         "certifi": {
             "hashes": [
                 "sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
                 "sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
             ],
             "version": "==2018.4.16"
         },
+        "funcsigs": {
+            "hashes": [
+                "sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca",
+                "sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"
+            ],
+            "markers": "python_version < '3.0'",
+            "version": "==1.0.2"
+        },
         "jsmin": {
             "hashes": [
                 "sha256:5d07bf0251a4128e5e8e8eef603849b6b5741c337bff087731a248f9cc774f56"
             ],
             "index": "pypi",
             "version": "==2.1.0"
         },
         "json-e": {
             "hashes": [
                 "sha256:f9114a25ed4b575395fbb2daa1183c5b781a647b387fdf28596220bb114673e8"
             ],
             "index": "pypi",
             "version": "==2.5.0"
         },
+        "more-itertools": {
+            "hashes": [
+                "sha256:2b6b9893337bfd9166bee6a62c2b0c9fe7735dcf85948b387ec8cba30e85d8e8",
+                "sha256:6703844a52d3588f951883005efcf555e49566a48afd4db4e965d69b883980d3",
+                "sha256:a18d870ef2ffca2b8463c0070ad17b5978056f403fb64e3f15fe62a52db21cc0"
+            ],
+            "version": "==4.2.0"
+        },
         "pipenv": {
             "hashes": [
                 "sha256:04b9a8b02a3ff12a5502b335850cfdb192adcfd1d6bbdb7a7c47cae9ab9ddece",
                 "sha256:e96d5bfa6822a17b2200d455aa5f9002c14361c50df1b1e51921479d7c09e741"
             ],
             "index": "pypi",
             "version": "==2018.5.18"
         },
+        "pluggy": {
+            "hashes": [
+                "sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff",
+                "sha256:d345c8fe681115900d6da8d048ba67c25df42973bda370783cd58826442dcd7c",
+                "sha256:e160a7fcf25762bb60efc7e171d4497ff1d8d2d75a3d0df7a21b76821ecbf5c5"
+            ],
+            "version": "==0.6.0"
+        },
         "py": {
             "hashes": [
-                "sha256:29c9fab495d7528e80ba1e343b958684f4ace687327e6f789a94bf3d1915f881",
-                "sha256:983f77f3331356039fdd792e9220b7b8ee1aa6bd2b25f567a963ff1de5a64f6a"
+                "sha256:3fd59af7435864e1a243790d322d763925431213b6b8529c6ca71081ace3bbf7",
+                "sha256:e31fb2767eb657cbde86c454f02e99cb846d3cd9d61b318525140214fdc0e98e"
             ],
-            "version": "==1.5.3"
+            "version": "==1.5.4"
         },
         "pytest": {
             "hashes": [
-                "sha256:241d7e7798d79192a123ceaf64c602b4d233eacf6d6e42ae27caa97f498b7dc6",
-                "sha256:6d5bd4f7113b444c55a3bbb5c738a3dd80d43563d063fc42dcb0aaefbdd78b81"
+                "sha256:8ea01fc4fcc8e1b1e305252b4bc80a1528019ab99fd3b88666c9dc38d754406c",
+                "sha256:90898786b3d0b880b47645bae7b51aa9bbf1e9d1e4510c2cfd15dd65c70ea0cd"
             ],
             "index": "pypi",
-            "version": "==3.2.5"
+            "version": "==3.6.2"
         },
         "python-hglib": {
             "hashes": [
                 "sha256:693d6ed92a6566e78802c7a03c256cda33d08c63ad3f00fcfa11379b184b9462"
             ],
             "index": "pypi",
             "version": "==2.4"
         },
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -1,37 +1,41 @@
 mozilla.pth:python/mach
 mozilla.pth:python/mozboot
 mozilla.pth:python/mozbuild
 mozilla.pth:python/mozlint
 mozilla.pth:python/mozrelease
 mozilla.pth:python/mozterm
 mozilla.pth:python/mozversioncontrol
 mozilla.pth:python/l10n
+mozilla.pth:third_party/python/atomicwrites
 mozilla.pth:third_party/python/attrs/src
 mozilla.pth:third_party/python/blessings
 mozilla.pth:third_party/python/compare-locales
 mozilla.pth:third_party/python/configobj
 mozilla.pth:third_party/python/cram
 mozilla.pth:third_party/python/dlmanager
 mozilla.pth:third_party/python/fluent
+mozilla.pth:third_party/python/funcsigs
 mozilla.pth:third_party/python/futures
+mozilla.pth:third_party/python/more-itertools
 mozilla.pth:third_party/python/python-hglib
+mozilla.pth:third_party/python/pluggy
 mozilla.pth:third_party/python/jsmin
 optional:setup.py:third_party/python/psutil:build_ext:--inplace
 mozilla.pth:third_party/python/psutil
 mozilla.pth:third_party/python/pylru
 mozilla.pth:third_party/python/which
 mozilla.pth:third_party/python/pystache
 mozilla.pth:third_party/python/pyyaml/lib
 mozilla.pth:third_party/python/requests
 mozilla.pth:third_party/python/requests-unixsocket
 mozilla.pth:third_party/python/slugid
 mozilla.pth:third_party/python/py
-mozilla.pth:third_party/python/pytest
+mozilla.pth:third_party/python/pytest/src
 mozilla.pth:third_party/python/pytoml
 mozilla.pth:third_party/python/redo
 mozilla.pth:third_party/python/six
 mozilla.pth:third_party/python/voluptuous
 mozilla.pth:third_party/python/json-e
 mozilla.pth:build
 objdir:build
 mozilla.pth:build/pymake
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015-2016 Markus Unterwaditzer
+
+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, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/MANIFEST.in
@@ -0,0 +1,6 @@
+include LICENSE
+include README.rst
+
+recursive-include docs *
+recursive-include tests *
+prune docs/_build
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/PKG-INFO
@@ -0,0 +1,112 @@
+Metadata-Version: 1.0
+Name: atomicwrites
+Version: 1.1.5
+Summary: Atomic file writes.
+Home-page: https://github.com/untitaker/python-atomicwrites
+Author: Markus Unterwaditzer
+Author-email: markus@unterwaditzer.net
+License: MIT
+Description: ===================
+        python-atomicwrites
+        ===================
+        
+        .. image:: https://travis-ci.org/untitaker/python-atomicwrites.svg?branch=master
+            :target: https://travis-ci.org/untitaker/python-atomicwrites
+        
+        .. image:: https://ci.appveyor.com/api/projects/status/vadc4le3c27to59x/branch/master?svg=true
+           :target: https://ci.appveyor.com/project/untitaker/python-atomicwrites/branch/master
+        
+        Atomic file writes.
+        
+        .. code-block:: python
+        
+            from atomicwrites import atomic_write
+        
+            with atomic_write('foo.txt', overwrite=True) as f:
+                f.write('Hello world.')
+                # "foo.txt" doesn't exist yet.
+        
+            # Now it does.
+        
+        
+        Features that distinguish it from other similar libraries (see `Alternatives and Credit`_):
+        
+        - Race-free assertion that the target file doesn't yet exist. This can be
+          controlled with the ``overwrite`` parameter.
+        
+        - Windows support, although not well-tested. The MSDN resources are not very
+          explicit about which operations are atomic.
+        
+        - Simple high-level API that wraps a very flexible class-based API.
+        
+        - Consistent error handling across platforms.
+        
+        
+        How it works
+        ============
+        
+        It uses a temporary file in the same directory as the given path. This ensures
+        that the temporary file resides on the same filesystem.
+        
+        The temporary file will then be atomically moved to the target location: On
+        POSIX, it will use ``rename`` if files should be overwritten, otherwise a
+        combination of ``link`` and ``unlink``. On Windows, it uses MoveFileEx_ through
+        stdlib's ``ctypes`` with the appropriate flags.
+        
+        Note that with ``link`` and ``unlink``, there's a timewindow where the file
+        might be available under two entries in the filesystem: The name of the
+        temporary file, and the name of the target file.
+        
+        Also note that the permissions of the target file may change this way. In some
+        situations a ``chmod`` can be issued without any concurrency problems, but
+        since that is not always the case, this library doesn't do it by itself.
+        
+        .. _MoveFileEx: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240%28v=vs.85%29.aspx
+        
+        fsync
+        -----
+        
+        On POSIX, ``fsync`` is invoked on the temporary file after it is written (to
+        flush file content and metadata), and on the parent directory after the file is
+        moved (to flush filename).
+        
+        ``fsync`` does not take care of disks' internal buffers, but there don't seem
+        to be any standard POSIX APIs for that. On OS X, ``fcntl`` is used with
+        ``F_FULLFSYNC`` instead of ``fsync`` for that reason.
+        
+        On Windows, `_commit <https://msdn.microsoft.com/en-us/library/17618685.aspx>`_
+        is used, but there are no guarantees about disk internal buffers.
+        
+        Alternatives and Credit
+        =======================
+        
+        Atomicwrites is directly inspired by the following libraries (and shares a
+        minimal amount of code):
+        
+        - The Trac project's `utility functions
+          <http://www.edgewall.org/docs/tags-trac-0.11.7/epydoc/trac.util-pysrc.html>`_,
+          also used in `Werkzeug <http://werkzeug.pocoo.org/>`_ and
+          `mitsuhiko/python-atomicfile
+          <https://github.com/mitsuhiko/python-atomicfile>`_. The idea to use
+          ``ctypes`` instead of ``PyWin32`` originated there.
+        
+        - `abarnert/fatomic <https://github.com/abarnert/fatomic>`_. Windows support
+          (based on ``PyWin32``) was originally taken from there.
+        
+        Other alternatives to atomicwrites include:
+        
+        - `sashka/atomicfile <https://github.com/sashka/atomicfile>`_. Originally I
+          considered using that, but at the time it was lacking a lot of features I
+          needed (Windows support, overwrite-parameter, overriding behavior through
+          subclassing).
+        
+        - The `Boltons library collection <https://github.com/mahmoud/boltons>`_
+          features a class for atomic file writes, which seems to have a very similar
+          ``overwrite`` parameter. It is lacking Windows support though.
+        
+        License
+        =======
+        
+        Licensed under the MIT, see ``LICENSE``.
+        
+Platform: UNKNOWN
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/README.rst
@@ -0,0 +1,102 @@
+===================
+python-atomicwrites
+===================
+
+.. image:: https://travis-ci.org/untitaker/python-atomicwrites.svg?branch=master
+    :target: https://travis-ci.org/untitaker/python-atomicwrites
+
+.. image:: https://ci.appveyor.com/api/projects/status/vadc4le3c27to59x/branch/master?svg=true
+   :target: https://ci.appveyor.com/project/untitaker/python-atomicwrites/branch/master
+
+Atomic file writes.
+
+.. code-block:: python
+
+    from atomicwrites import atomic_write
+
+    with atomic_write('foo.txt', overwrite=True) as f:
+        f.write('Hello world.')
+        # "foo.txt" doesn't exist yet.
+
+    # Now it does.
+
+
+Features that distinguish it from other similar libraries (see `Alternatives and Credit`_):
+
+- Race-free assertion that the target file doesn't yet exist. This can be
+  controlled with the ``overwrite`` parameter.
+
+- Windows support, although not well-tested. The MSDN resources are not very
+  explicit about which operations are atomic.
+
+- Simple high-level API that wraps a very flexible class-based API.
+
+- Consistent error handling across platforms.
+
+
+How it works
+============
+
+It uses a temporary file in the same directory as the given path. This ensures
+that the temporary file resides on the same filesystem.
+
+The temporary file will then be atomically moved to the target location: On
+POSIX, it will use ``rename`` if files should be overwritten, otherwise a
+combination of ``link`` and ``unlink``. On Windows, it uses MoveFileEx_ through
+stdlib's ``ctypes`` with the appropriate flags.
+
+Note that with ``link`` and ``unlink``, there's a timewindow where the file
+might be available under two entries in the filesystem: The name of the
+temporary file, and the name of the target file.
+
+Also note that the permissions of the target file may change this way. In some
+situations a ``chmod`` can be issued without any concurrency problems, but
+since that is not always the case, this library doesn't do it by itself.
+
+.. _MoveFileEx: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240%28v=vs.85%29.aspx
+
+fsync
+-----
+
+On POSIX, ``fsync`` is invoked on the temporary file after it is written (to
+flush file content and metadata), and on the parent directory after the file is
+moved (to flush filename).
+
+``fsync`` does not take care of disks' internal buffers, but there don't seem
+to be any standard POSIX APIs for that. On OS X, ``fcntl`` is used with
+``F_FULLFSYNC`` instead of ``fsync`` for that reason.
+
+On Windows, `_commit <https://msdn.microsoft.com/en-us/library/17618685.aspx>`_
+is used, but there are no guarantees about disk internal buffers.
+
+Alternatives and Credit
+=======================
+
+Atomicwrites is directly inspired by the following libraries (and shares a
+minimal amount of code):
+
+- The Trac project's `utility functions
+  <http://www.edgewall.org/docs/tags-trac-0.11.7/epydoc/trac.util-pysrc.html>`_,
+  also used in `Werkzeug <http://werkzeug.pocoo.org/>`_ and
+  `mitsuhiko/python-atomicfile
+  <https://github.com/mitsuhiko/python-atomicfile>`_. The idea to use
+  ``ctypes`` instead of ``PyWin32`` originated there.
+
+- `abarnert/fatomic <https://github.com/abarnert/fatomic>`_. Windows support
+  (based on ``PyWin32``) was originally taken from there.
+
+Other alternatives to atomicwrites include:
+
+- `sashka/atomicfile <https://github.com/sashka/atomicfile>`_. Originally I
+  considered using that, but at the time it was lacking a lot of features I
+  needed (Windows support, overwrite-parameter, overriding behavior through
+  subclassing).
+
+- The `Boltons library collection <https://github.com/mahmoud/boltons>`_
+  features a class for atomic file writes, which seems to have a very similar
+  ``overwrite`` parameter. It is lacking Windows support though.
+
+License
+=======
+
+Licensed under the MIT, see ``LICENSE``.
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/atomicwrites/__init__.py
@@ -0,0 +1,201 @@
+import contextlib
+import os
+import sys
+import tempfile
+
+try:
+    import fcntl
+except ImportError:
+    fcntl = None
+
+__version__ = '1.1.5'
+
+
+PY2 = sys.version_info[0] == 2
+
+text_type = unicode if PY2 else str  # noqa
+
+
+def _path_to_unicode(x):
+    if not isinstance(x, text_type):
+        return x.decode(sys.getfilesystemencoding())
+    return x
+
+
+_proper_fsync = os.fsync
+
+
+if sys.platform != 'win32':
+    if hasattr(fcntl, 'F_FULLFSYNC'):
+        def _proper_fsync(fd):
+            # https://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html
+            # https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/fsync.2.html
+            # https://github.com/untitaker/python-atomicwrites/issues/6
+            fcntl.fcntl(fd, fcntl.F_FULLFSYNC)
+
+    def _sync_directory(directory):
+        # Ensure that filenames are written to disk
+        fd = os.open(directory, 0)
+        try:
+            _proper_fsync(fd)
+        finally:
+            os.close(fd)
+
+    def _replace_atomic(src, dst):
+        os.rename(src, dst)
+        _sync_directory(os.path.normpath(os.path.dirname(dst)))
+
+    def _move_atomic(src, dst):
+        os.link(src, dst)
+        os.unlink(src)
+
+        src_dir = os.path.normpath(os.path.dirname(src))
+        dst_dir = os.path.normpath(os.path.dirname(dst))
+        _sync_directory(dst_dir)
+        if src_dir != dst_dir:
+            _sync_directory(src_dir)
+else:
+    from ctypes import windll, WinError
+
+    _MOVEFILE_REPLACE_EXISTING = 0x1
+    _MOVEFILE_WRITE_THROUGH = 0x8
+    _windows_default_flags = _MOVEFILE_WRITE_THROUGH
+
+    def _handle_errors(rv):
+        if not rv:
+            raise WinError()
+
+    def _replace_atomic(src, dst):
+        _handle_errors(windll.kernel32.MoveFileExW(
+            _path_to_unicode(src), _path_to_unicode(dst),
+            _windows_default_flags | _MOVEFILE_REPLACE_EXISTING
+        ))
+
+    def _move_atomic(src, dst):
+        _handle_errors(windll.kernel32.MoveFileExW(
+            _path_to_unicode(src), _path_to_unicode(dst),
+            _windows_default_flags
+        ))
+
+
+def replace_atomic(src, dst):
+    '''
+    Move ``src`` to ``dst``. If ``dst`` exists, it will be silently
+    overwritten.
+
+    Both paths must reside on the same filesystem for the operation to be
+    atomic.
+    '''
+    return _replace_atomic(src, dst)
+
+
+def move_atomic(src, dst):
+    '''
+    Move ``src`` to ``dst``. There might a timewindow where both filesystem
+    entries exist. If ``dst`` already exists, :py:exc:`FileExistsError` will be
+    raised.
+
+    Both paths must reside on the same filesystem for the operation to be
+    atomic.
+    '''
+    return _move_atomic(src, dst)
+
+
+class AtomicWriter(object):
+    '''
+    A helper class for performing atomic writes. Usage::
+
+        with AtomicWriter(path).open() as f:
+            f.write(...)
+
+    :param path: The destination filepath. May or may not exist.
+    :param mode: The filemode for the temporary file.
+    :param overwrite: If set to false, an error is raised if ``path`` exists.
+        Errors are only raised after the file has been written to.  Either way,
+        the operation is atomic.
+
+    If you need further control over the exact behavior, you are encouraged to
+    subclass.
+    '''
+
+    def __init__(self, path, mode='w', overwrite=False):
+        if 'a' in mode:
+            raise ValueError(
+                'Appending to an existing file is not supported, because that '
+                'would involve an expensive `copy`-operation to a temporary '
+                'file. Open the file in normal `w`-mode and copy explicitly '
+                'if that\'s what you\'re after.'
+            )
+        if 'x' in mode:
+            raise ValueError('Use the `overwrite`-parameter instead.')
+        if 'w' not in mode:
+            raise ValueError('AtomicWriters can only be written to.')
+
+        self._path = path
+        self._mode = mode
+        self._overwrite = overwrite
+
+    def open(self):
+        '''
+        Open the temporary file.
+        '''
+        return self._open(self.get_fileobject)
+
+    @contextlib.contextmanager
+    def _open(self, get_fileobject):
+        f = None  # make sure f exists even if get_fileobject() fails
+        try:
+            success = False
+            with get_fileobject() as f:
+                yield f
+                self.sync(f)
+            self.commit(f)
+            success = True
+        finally:
+            if not success:
+                try:
+                    self.rollback(f)
+                except Exception:
+                    pass
+
+    def get_fileobject(self, dir=None, **kwargs):
+        '''Return the temporary file to use.'''
+        if dir is None:
+            dir = os.path.normpath(os.path.dirname(self._path))
+        return tempfile.NamedTemporaryFile(mode=self._mode, dir=dir,
+                                           delete=False, **kwargs)
+
+    def sync(self, f):
+        '''responsible for clearing as many file caches as possible before
+        commit'''
+        f.flush()
+        _proper_fsync(f.fileno())
+
+    def commit(self, f):
+        '''Move the temporary file to the target location.'''
+        if self._overwrite:
+            replace_atomic(f.name, self._path)
+        else:
+            move_atomic(f.name, self._path)
+
+    def rollback(self, f):
+        '''Clean up all temporary resources.'''
+        os.unlink(f.name)
+
+
+def atomic_write(path, writer_cls=AtomicWriter, **cls_kwargs):
+    '''
+    Simple atomic writes. This wraps :py:class:`AtomicWriter`::
+
+        with atomic_write(path) as f:
+            f.write(...)
+
+    :param path: The target path to write to.
+    :param writer_cls: The writer class to use. This parameter is useful if you
+        subclassed :py:class:`AtomicWriter` to change some behavior and want to
+        use that new subclass.
+
+    Additional keyword arguments are passed to the writer class. See
+    :py:class:`AtomicWriter`.
+    '''
+    return writer_cls(path, **cls_kwargs).open()
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/docs/Makefile
@@ -0,0 +1,177 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+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 "  singlehtml to make a single large HTML file"
+	@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 "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@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."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+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/atomicwrites.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/atomicwrites.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/atomicwrites"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/atomicwrites"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+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."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/docs/conf.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import pkg_resources
+
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.intersphinx',
+    'sphinx.ext.viewcode',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'atomicwrites'
+copyright = '2015, Markus Unterwaditzer'
+
+try:
+    # The full version, including alpha/beta/rc tags.
+    release = pkg_resources.require('atomicwrites')[0].version
+except pkg_resources.DistributionNotFound:
+    print('To build the documentation, the distribution information of '
+          'atomicwrites has to be available. Run "setup.py develop" to do '
+          'this.')
+    sys.exit(1)
+
+version = '.'.join(release.split('.')[:2])  # The short X.Y version.
+
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+try:
+    import sphinx_rtd_theme
+    html_theme = 'sphinx_rtd_theme'
+    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+except ImportError:
+    html_theme = 'default'
+    if not on_rtd:
+        print('-' * 74)
+        print('Warning: sphinx-rtd-theme not installed, building with default '
+              'theme.')
+        print('-' * 74)
+
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# 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']
+
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'atomicwritesdoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+  ('index', 'atomicwrites.tex', 'atomicwrites Documentation',
+   'Markus Unterwaditzer', 'manual'),
+]
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'atomicwrites', 'atomicwrites Documentation',
+     ['Markus Unterwaditzer'], 1)
+]
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'atomicwrites', 'atomicwrites Documentation',
+   'Markus Unterwaditzer', 'atomicwrites', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Bibliographic Dublin Core info.
+epub_title = 'atomicwrites'
+epub_author = 'Markus Unterwaditzer'
+epub_publisher = 'Markus Unterwaditzer'
+epub_copyright = '2015, Markus Unterwaditzer'
+
+# A list of files that should not be packed into the epub file.
+epub_exclude_files = ['search.html']
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/docs/index.rst
@@ -0,0 +1,35 @@
+.. include:: ../README.rst
+
+.. module:: atomicwrites
+
+API
+===
+
+.. autofunction:: atomic_write
+
+
+Errorhandling
+-------------
+
+All filesystem errors are subclasses of :py:exc:`OSError`.
+
+- On UNIX systems, errors from the Python stdlib calls are thrown.
+- On Windows systems, errors from Python's ``ctypes`` are thrown.
+
+In either case, the ``errno`` attribute on the thrown exception maps to an
+errorcode in the ``errno`` module.
+
+Low-level API
+-------------
+
+.. autofunction:: replace_atomic
+
+.. autofunction:: move_atomic
+
+.. autoclass:: AtomicWriter
+   :members:
+
+License
+=======
+
+.. include:: ../LICENSE
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/docs/make.bat
@@ -0,0 +1,242 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	: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.  singlehtml to make a single large HTML file
+	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.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  xml        to make Docutils-native XML files
+	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\atomicwrites.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\atomicwrites.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdf" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdfja" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf-ja
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+if "%1" == "xml" (
+	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The XML files are in %BUILDDIR%/xml.
+	goto end
+)
+
+if "%1" == "pseudoxml" (
+	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+	goto end
+)
+
+:end
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/setup.cfg
@@ -0,0 +1,8 @@
+[wheel]
+universal = 1
+
+[egg_info]
+tag_date = 0
+tag_svn_revision = 0
+tag_build = 
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/setup.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+
+import ast
+import re
+
+from setuptools import find_packages, setup
+
+
+_version_re = re.compile(r'__version__\s+=\s+(.*)')
+
+
+with open('atomicwrites/__init__.py', 'rb') as f:
+    version = str(ast.literal_eval(_version_re.search(
+        f.read().decode('utf-8')).group(1)))
+
+setup(
+    name='atomicwrites',
+    version=version,
+    author='Markus Unterwaditzer',
+    author_email='markus@unterwaditzer.net',
+    url='https://github.com/untitaker/python-atomicwrites',
+    description='Atomic file writes.',
+    license='MIT',
+    long_description=open('README.rst').read(),
+    packages=find_packages(exclude=['tests.*', 'tests']),
+    include_package_data=True,
+)
new file mode 100644
--- /dev/null
+++ b/third_party/python/atomicwrites/tests/test_atomicwrites.py
@@ -0,0 +1,89 @@
+import errno
+import os
+
+from atomicwrites import atomic_write
+
+import pytest
+
+
+def test_atomic_write(tmpdir):
+    fname = tmpdir.join('ha')
+    for i in range(2):
+        with atomic_write(str(fname), overwrite=True) as f:
+            f.write('hoho')
+
+    with pytest.raises(OSError) as excinfo:
+        with atomic_write(str(fname), overwrite=False) as f:
+            f.write('haha')
+
+    assert excinfo.value.errno == errno.EEXIST
+
+    assert fname.read() == 'hoho'
+    assert len(tmpdir.listdir()) == 1
+
+
+def test_teardown(tmpdir):
+    fname = tmpdir.join('ha')
+    with pytest.raises(AssertionError):
+        with atomic_write(str(fname), overwrite=True):
+            assert False
+
+    assert not tmpdir.listdir()
+
+
+def test_replace_simultaneously_created_file(tmpdir):
+    fname = tmpdir.join('ha')
+    with atomic_write(str(fname), overwrite=True) as f:
+        f.write('hoho')
+        fname.write('harhar')
+        assert fname.read() == 'harhar'
+    assert fname.read() == 'hoho'
+    assert len(tmpdir.listdir()) == 1
+
+
+def test_dont_remove_simultaneously_created_file(tmpdir):
+    fname = tmpdir.join('ha')
+    with pytest.raises(OSError) as excinfo:
+        with atomic_write(str(fname), overwrite=False) as f:
+            f.write('hoho')
+            fname.write('harhar')
+            assert fname.read() == 'harhar'
+
+    assert excinfo.value.errno == errno.EEXIST
+    assert fname.read() == 'harhar'
+    assert len(tmpdir.listdir()) == 1
+
+
+# Verify that nested exceptions during rollback do not overwrite the initial
+# exception that triggered a rollback.
+def test_open_reraise(tmpdir):
+    fname = tmpdir.join('ha')
+    with pytest.raises(AssertionError):
+        with atomic_write(str(fname), overwrite=False) as f:
+            # Mess with f, so rollback will trigger an OSError. We're testing
+            # that the initial AssertionError triggered below is propagated up
+            # the stack, not the second exception triggered during rollback.
+            f.name = "asdf"
+            # Now trigger our own exception.
+            assert False, "Intentional failure for testing purposes"
+
+
+def test_atomic_write_in_pwd(tmpdir):
+    orig_curdir = os.getcwd()
+    try:
+        os.chdir(str(tmpdir))
+        fname = 'ha'
+        for i in range(2):
+            with atomic_write(str(fname), overwrite=True) as f:
+                f.write('hoho')
+
+        with pytest.raises(OSError) as excinfo:
+            with atomic_write(str(fname), overwrite=False) as f:
+                f.write('haha')
+
+        assert excinfo.value.errno == errno.EEXIST
+
+        assert open(fname).read() == 'hoho'
+        assert len(tmpdir.listdir()) == 1
+    finally:
+        os.chdir(orig_curdir)
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/CHANGELOG
@@ -0,0 +1,24 @@
+Changelog
+---------
+
+0.5
+```
+
+* Fix binding with self as a kwarg. (Robert Collins #14)
+
+0.4 (2013-12-20)
+````````````````
+* Fix unbound methods getting their first parameter curried
+* Publish Python wheel packages
+
+0.3 (2013-05-29)
+````````````````
+* Fix annotation formatting of builtin types on Python 2.x
+
+0.2 (2012-01-07)
+````````````````
+* PyPy compatability
+
+0.1 (2012-01-06)
+````````````````
+* Initial release
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2013 Aaron Iles
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/MANIFEST.in
@@ -0,0 +1,7 @@
+recursive-include docs *
+recursive-include tests *.py
+include *.py
+include CHANGELOG
+include LICENSE
+include MANIFEST.in
+include README.rst
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/PKG-INFO
@@ -0,0 +1,378 @@
+Metadata-Version: 1.1
+Name: funcsigs
+Version: 1.0.2
+Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
+Home-page: http://funcsigs.readthedocs.org
+Author: Testing Cabal
+Author-email: testing-in-python@lists.idyll.org
+License: ASL
+Description: .. funcsigs documentation master file, created by
+           sphinx-quickstart on Fri Apr 20 20:27:52 2012.
+           You can adapt this file completely to your liking, but it should at least
+           contain the root `toctree` directive.
+        
+        Introducing funcsigs
+        ====================
+        
+        The Funcsigs Package
+        --------------------
+        
+        ``funcsigs`` is a backport of the `PEP 362`_ function signature features from
+        Python 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7
+        as well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and
+        pip no longer supporting 3.2, we cannot make any statement about 3.2
+        compatibility.
+        
+        Compatibility
+        `````````````
+        
+        The ``funcsigs`` backport has been tested against:
+        
+        * CPython 2.6
+        * CPython 2.7
+        * CPython 3.3
+        * CPython 3.4
+        * CPython 3.5
+        * CPython nightlies
+        * PyPy and PyPy3(currently failing CI)
+        
+        Continuous integration testing is provided by `Travis CI`_.
+        
+        Under Python 2.x there is a compatibility issue when a function is assigned to
+        the ``__wrapped__`` property of a class after it has been constructed.
+        Similiarily there under PyPy directly passing the ``__call__`` method of a
+        builtin is also a compatibility issues.  Otherwise the functionality is
+        believed to be uniform between both Python2 and Python3.
+        
+        Issues
+        ``````
+        
+        Source code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature
+        requests can be made using GitHub's `issues system`_. |build_status| |coverage|
+        
+        Example
+        -------
+        
+        To obtain a `Signature` object, pass the target function to the
+        ``funcsigs.signature`` function.
+        
+        .. code-block:: python
+        
+            >>> from funcsigs import signature
+            >>> def foo(a, b=None, *args, **kwargs):
+            ...     pass
+            ...
+            >>> sig = signature(foo)
+            >>> sig
+            <funcsigs.Signature object at 0x...>
+            >>> sig.parameters
+            OrderedDict([('a', <Parameter at 0x... 'a'>), ('b', <Parameter at 0x... 'b'>), ('args', <Parameter at 0x... 'args'>), ('kwargs', <Parameter at 0x... 'kwargs'>)])
+            >>> sig.return_annotation
+            <class 'funcsigs._empty'>
+        
+        Introspecting callables with the Signature object
+        -------------------------------------------------
+        
+        .. note::
+        
+           This section of documentation is a direct reproduction of the Python
+           standard library documentation for the inspect module.
+        
+        The Signature object represents the call signature of a callable object and its
+        return annotation.  To retrieve a Signature object, use the :func:`signature`
+        function.
+        
+        .. function:: signature(callable)
+        
+           Return a :class:`Signature` object for the given ``callable``::
+        
+              >>> from funcsigs import signature
+              >>> def foo(a, *, b:int, **kwargs):
+              ...     pass
+        
+              >>> sig = signature(foo)
+        
+              >>> str(sig)
+              '(a, *, b:int, **kwargs)'
+        
+              >>> str(sig.parameters['b'])
+              'b:int'
+        
+              >>> sig.parameters['b'].annotation
+              <class 'int'>
+        
+           Accepts a wide range of python callables, from plain functions and classes to
+           :func:`functools.partial` objects.
+        
+           .. note::
+        
+              Some callables may not be introspectable in certain implementations of
+              Python.  For example, in CPython, built-in functions defined in C provide
+              no metadata about their arguments.
+        
+        
+        .. class:: Signature
+        
+           A Signature object represents the call signature of a function and its return
+           annotation.  For each parameter accepted by the function it stores a
+           :class:`Parameter` object in its :attr:`parameters` collection.
+        
+           Signature objects are *immutable*.  Use :meth:`Signature.replace` to make a
+           modified copy.
+        
+           .. attribute:: Signature.empty
+        
+              A special class-level marker to specify absence of a return annotation.
+        
+           .. attribute:: Signature.parameters
+        
+              An ordered mapping of parameters' names to the corresponding
+              :class:`Parameter` objects.
+        
+           .. attribute:: Signature.return_annotation
+        
+              The "return" annotation for the callable.  If the callable has no "return"
+              annotation, this attribute is set to :attr:`Signature.empty`.
+        
+           .. method:: Signature.bind(*args, **kwargs)
+        
+              Create a mapping from positional and keyword arguments to parameters.
+              Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the
+              signature, or raises a :exc:`TypeError`.
+        
+           .. method:: Signature.bind_partial(*args, **kwargs)
+        
+              Works the same way as :meth:`Signature.bind`, but allows the omission of
+              some required arguments (mimics :func:`functools.partial` behavior.)
+              Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the
+              passed arguments do not match the signature.
+        
+           .. method:: Signature.replace(*[, parameters][, return_annotation])
+        
+              Create a new Signature instance based on the instance replace was invoked
+              on.  It is possible to pass different ``parameters`` and/or
+              ``return_annotation`` to override the corresponding properties of the base
+              signature.  To remove return_annotation from the copied Signature, pass in
+              :attr:`Signature.empty`.
+        
+              ::
+        
+                 >>> def test(a, b):
+                 ...     pass
+                 >>> sig = signature(test)
+                 >>> new_sig = sig.replace(return_annotation="new return anno")
+                 >>> str(new_sig)
+                 "(a, b) -> 'new return anno'"
+        
+        
+        .. class:: Parameter
+        
+           Parameter objects are *immutable*.  Instead of modifying a Parameter object,
+           you can use :meth:`Parameter.replace` to create a modified copy.
+        
+           .. attribute:: Parameter.empty
+        
+              A special class-level marker to specify absence of default values and
+              annotations.
+        
+           .. attribute:: Parameter.name
+        
+              The name of the parameter as a string.  Must be a valid python identifier
+              name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have
+              it set to ``None``).
+        
+           .. attribute:: Parameter.default
+        
+              The default value for the parameter.  If the parameter has no default
+              value, this attribute is set to :attr:`Parameter.empty`.
+        
+           .. attribute:: Parameter.annotation
+        
+              The annotation for the parameter.  If the parameter has no annotation,
+              this attribute is set to :attr:`Parameter.empty`.
+        
+           .. attribute:: Parameter.kind
+        
+              Describes how argument values are bound to the parameter.  Possible values
+              (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):
+        
+              +------------------------+----------------------------------------------+
+              |    Name                | Meaning                                      |
+              +========================+==============================================+
+              | *POSITIONAL_ONLY*      | Value must be supplied as a positional       |
+              |                        | argument.                                    |
+              |                        |                                              |
+              |                        | Python has no explicit syntax for defining   |
+              |                        | positional-only parameters, but many built-in|
+              |                        | and extension module functions (especially   |
+              |                        | those that accept only one or two parameters)|
+              |                        | accept them.                                 |
+              +------------------------+----------------------------------------------+
+              | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
+              |                        | positional argument (this is the standard    |
+              |                        | binding behaviour for functions implemented  |
+              |                        | in Python.)                                  |
+              +------------------------+----------------------------------------------+
+              | *VAR_POSITIONAL*       | A tuple of positional arguments that aren't  |
+              |                        | bound to any other parameter. This           |
+              |                        | corresponds to a ``*args`` parameter in a    |
+              |                        | Python function definition.                  |
+              +------------------------+----------------------------------------------+
+              | *KEYWORD_ONLY*         | Value must be supplied as a keyword argument.|
+              |                        | Keyword only parameters are those which      |
+              |                        | appear after a ``*`` or ``*args`` entry in a |
+              |                        | Python function definition.                  |
+              +------------------------+----------------------------------------------+
+              | *VAR_KEYWORD*          | A dict of keyword arguments that aren't bound|
+              |                        | to any other parameter. This corresponds to a|
+              |                        | ``**kwargs`` parameter in a Python function  |
+              |                        | definition.                                  |
+              +------------------------+----------------------------------------------+
+        
+              Example: print all keyword-only arguments without default values::
+        
+                 >>> def foo(a, b, *, c, d=10):
+                 ...     pass
+        
+                 >>> sig = signature(foo)
+                 >>> for param in sig.parameters.values():
+                 ...     if (param.kind == param.KEYWORD_ONLY and
+                 ...                        param.default is param.empty):
+                 ...         print('Parameter:', param)
+                 Parameter: c
+        
+           .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
+        
+              Create a new Parameter instance based on the instance replaced was invoked
+              on.  To override a :class:`Parameter` attribute, pass the corresponding
+              argument.  To remove a default value or/and an annotation from a
+              Parameter, pass :attr:`Parameter.empty`.
+        
+              ::
+        
+                 >>> from funcsigs import Parameter
+                 >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)
+                 >>> str(param)
+                 'foo=42'
+        
+                 >>> str(param.replace()) # Will create a shallow copy of 'param'
+                 'foo=42'
+        
+                 >>> str(param.replace(default=Parameter.empty, annotation='spam'))
+                 "foo:'spam'"
+        
+        
+        .. class:: BoundArguments
+        
+           Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.
+           Holds the mapping of arguments to the function's parameters.
+        
+           .. attribute:: BoundArguments.arguments
+        
+              An ordered, mutable mapping (:class:`collections.OrderedDict`) of
+              parameters' names to arguments' values.  Contains only explicitly bound
+              arguments.  Changes in :attr:`arguments` will reflect in :attr:`args` and
+              :attr:`kwargs`.
+        
+              Should be used in conjunction with :attr:`Signature.parameters` for any
+              argument processing purposes.
+        
+              .. note::
+        
+                 Arguments for which :meth:`Signature.bind` or
+                 :meth:`Signature.bind_partial` relied on a default value are skipped.
+                 However, if needed, it is easy to include them.
+        
+              ::
+        
+                >>> def foo(a, b=10):
+                ...     pass
+        
+                >>> sig = signature(foo)
+                >>> ba = sig.bind(5)
+        
+                >>> ba.args, ba.kwargs
+                ((5,), {})
+        
+                >>> for param in sig.parameters.values():
+                ...     if param.name not in ba.arguments:
+                ...         ba.arguments[param.name] = param.default
+        
+                >>> ba.args, ba.kwargs
+                ((5, 10), {})
+        
+        
+           .. attribute:: BoundArguments.args
+        
+              A tuple of positional arguments values.  Dynamically computed from the
+              :attr:`arguments` attribute.
+        
+           .. attribute:: BoundArguments.kwargs
+        
+              A dict of keyword arguments values.  Dynamically computed from the
+              :attr:`arguments` attribute.
+        
+           The :attr:`args` and :attr:`kwargs` properties can be used to invoke
+           functions::
+        
+              def test(a, *, b):
+                 ...
+        
+              sig = signature(test)
+              ba = sig.bind(10, b=20)
+              test(*ba.args, **ba.kwargs)
+        
+        
+        .. seealso::
+        
+           :pep:`362` - Function Signature Object.
+              The detailed specification, implementation details and examples.
+        
+        Copyright
+        ---------
+        
+        *funcsigs* is a derived work of CPython under the terms of the `PSF License
+        Agreement`_. The original CPython inspect module, its unit tests and
+        documentation are the copyright of the Python Software Foundation. The derived
+        work is distributed under the `Apache License Version 2.0`_.
+        
+        .. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+        .. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0
+        .. _GitHub: https://github.com/testing-cabal/funcsigs
+        .. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+        .. _Travis CI: http://travis-ci.org/
+        .. _Read The Docs: http://funcsigs.readthedocs.org/
+        .. _PEP 362: http://www.python.org/dev/peps/pep-0362/
+        .. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object
+        .. _issues system: https://github.com/testing-cabal/funcsigs/issues
+        
+        .. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master
+           :target: http://travis-ci.org/#!/aliles/funcsigs
+           :alt: Current build status
+        
+        .. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master
+           :target: https://coveralls.io/r/aliles/funcsigs?branch=master
+           :alt: Coverage status
+        
+        .. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png
+           :target: https://crate.io/packages/funcsigs/
+           :alt: Latest PyPI version
+        
+        
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/README.rst
@@ -0,0 +1,353 @@
+.. funcsigs documentation master file, created by
+   sphinx-quickstart on Fri Apr 20 20:27:52 2012.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Introducing funcsigs
+====================
+
+The Funcsigs Package
+--------------------
+
+``funcsigs`` is a backport of the `PEP 362`_ function signature features from
+Python 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7
+as well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and
+pip no longer supporting 3.2, we cannot make any statement about 3.2
+compatibility.
+
+Compatibility
+`````````````
+
+The ``funcsigs`` backport has been tested against:
+
+* CPython 2.6
+* CPython 2.7
+* CPython 3.3
+* CPython 3.4
+* CPython 3.5
+* CPython nightlies
+* PyPy and PyPy3(currently failing CI)
+
+Continuous integration testing is provided by `Travis CI`_.
+
+Under Python 2.x there is a compatibility issue when a function is assigned to
+the ``__wrapped__`` property of a class after it has been constructed.
+Similiarily there under PyPy directly passing the ``__call__`` method of a
+builtin is also a compatibility issues.  Otherwise the functionality is
+believed to be uniform between both Python2 and Python3.
+
+Issues
+``````
+
+Source code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature
+requests can be made using GitHub's `issues system`_. |build_status| |coverage|
+
+Example
+-------
+
+To obtain a `Signature` object, pass the target function to the
+``funcsigs.signature`` function.
+
+.. code-block:: python
+
+    >>> from funcsigs import signature
+    >>> def foo(a, b=None, *args, **kwargs):
+    ...     pass
+    ...
+    >>> sig = signature(foo)
+    >>> sig
+    <funcsigs.Signature object at 0x...>
+    >>> sig.parameters
+    OrderedDict([('a', <Parameter at 0x... 'a'>), ('b', <Parameter at 0x... 'b'>), ('args', <Parameter at 0x... 'args'>), ('kwargs', <Parameter at 0x... 'kwargs'>)])
+    >>> sig.return_annotation
+    <class 'funcsigs._empty'>
+
+Introspecting callables with the Signature object
+-------------------------------------------------
+
+.. note::
+
+   This section of documentation is a direct reproduction of the Python
+   standard library documentation for the inspect module.
+
+The Signature object represents the call signature of a callable object and its
+return annotation.  To retrieve a Signature object, use the :func:`signature`
+function.
+
+.. function:: signature(callable)
+
+   Return a :class:`Signature` object for the given ``callable``::
+
+      >>> from funcsigs import signature
+      >>> def foo(a, *, b:int, **kwargs):
+      ...     pass
+
+      >>> sig = signature(foo)
+
+      >>> str(sig)
+      '(a, *, b:int, **kwargs)'
+
+      >>> str(sig.parameters['b'])
+      'b:int'
+
+      >>> sig.parameters['b'].annotation
+      <class 'int'>
+
+   Accepts a wide range of python callables, from plain functions and classes to
+   :func:`functools.partial` objects.
+
+   .. note::
+
+      Some callables may not be introspectable in certain implementations of
+      Python.  For example, in CPython, built-in functions defined in C provide
+      no metadata about their arguments.
+
+
+.. class:: Signature
+
+   A Signature object represents the call signature of a function and its return
+   annotation.  For each parameter accepted by the function it stores a
+   :class:`Parameter` object in its :attr:`parameters` collection.
+
+   Signature objects are *immutable*.  Use :meth:`Signature.replace` to make a
+   modified copy.
+
+   .. attribute:: Signature.empty
+
+      A special class-level marker to specify absence of a return annotation.
+
+   .. attribute:: Signature.parameters
+
+      An ordered mapping of parameters' names to the corresponding
+      :class:`Parameter` objects.
+
+   .. attribute:: Signature.return_annotation
+
+      The "return" annotation for the callable.  If the callable has no "return"
+      annotation, this attribute is set to :attr:`Signature.empty`.
+
+   .. method:: Signature.bind(*args, **kwargs)
+
+      Create a mapping from positional and keyword arguments to parameters.
+      Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the
+      signature, or raises a :exc:`TypeError`.
+
+   .. method:: Signature.bind_partial(*args, **kwargs)
+
+      Works the same way as :meth:`Signature.bind`, but allows the omission of
+      some required arguments (mimics :func:`functools.partial` behavior.)
+      Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the
+      passed arguments do not match the signature.
+
+   .. method:: Signature.replace(*[, parameters][, return_annotation])
+
+      Create a new Signature instance based on the instance replace was invoked
+      on.  It is possible to pass different ``parameters`` and/or
+      ``return_annotation`` to override the corresponding properties of the base
+      signature.  To remove return_annotation from the copied Signature, pass in
+      :attr:`Signature.empty`.
+
+      ::
+
+         >>> def test(a, b):
+         ...     pass
+         >>> sig = signature(test)
+         >>> new_sig = sig.replace(return_annotation="new return anno")
+         >>> str(new_sig)
+         "(a, b) -> 'new return anno'"
+
+
+.. class:: Parameter
+
+   Parameter objects are *immutable*.  Instead of modifying a Parameter object,
+   you can use :meth:`Parameter.replace` to create a modified copy.
+
+   .. attribute:: Parameter.empty
+
+      A special class-level marker to specify absence of default values and
+      annotations.
+
+   .. attribute:: Parameter.name
+
+      The name of the parameter as a string.  Must be a valid python identifier
+      name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have
+      it set to ``None``).
+
+   .. attribute:: Parameter.default
+
+      The default value for the parameter.  If the parameter has no default
+      value, this attribute is set to :attr:`Parameter.empty`.
+
+   .. attribute:: Parameter.annotation
+
+      The annotation for the parameter.  If the parameter has no annotation,
+      this attribute is set to :attr:`Parameter.empty`.
+
+   .. attribute:: Parameter.kind
+
+      Describes how argument values are bound to the parameter.  Possible values
+      (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):
+
+      +------------------------+----------------------------------------------+
+      |    Name                | Meaning                                      |
+      +========================+==============================================+
+      | *POSITIONAL_ONLY*      | Value must be supplied as a positional       |
+      |                        | argument.                                    |
+      |                        |                                              |
+      |                        | Python has no explicit syntax for defining   |
+      |                        | positional-only parameters, but many built-in|
+      |                        | and extension module functions (especially   |
+      |                        | those that accept only one or two parameters)|
+      |                        | accept them.                                 |
+      +------------------------+----------------------------------------------+
+      | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
+      |                        | positional argument (this is the standard    |
+      |                        | binding behaviour for functions implemented  |
+      |                        | in Python.)                                  |
+      +------------------------+----------------------------------------------+
+      | *VAR_POSITIONAL*       | A tuple of positional arguments that aren't  |
+      |                        | bound to any other parameter. This           |
+      |                        | corresponds to a ``*args`` parameter in a    |
+      |                        | Python function definition.                  |
+      +------------------------+----------------------------------------------+
+      | *KEYWORD_ONLY*         | Value must be supplied as a keyword argument.|
+      |                        | Keyword only parameters are those which      |
+      |                        | appear after a ``*`` or ``*args`` entry in a |
+      |                        | Python function definition.                  |
+      +------------------------+----------------------------------------------+
+      | *VAR_KEYWORD*          | A dict of keyword arguments that aren't bound|
+      |                        | to any other parameter. This corresponds to a|
+      |                        | ``**kwargs`` parameter in a Python function  |
+      |                        | definition.                                  |
+      +------------------------+----------------------------------------------+
+
+      Example: print all keyword-only arguments without default values::
+
+         >>> def foo(a, b, *, c, d=10):
+         ...     pass
+
+         >>> sig = signature(foo)
+         >>> for param in sig.parameters.values():
+         ...     if (param.kind == param.KEYWORD_ONLY and
+         ...                        param.default is param.empty):
+         ...         print('Parameter:', param)
+         Parameter: c
+
+   .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
+
+      Create a new Parameter instance based on the instance replaced was invoked
+      on.  To override a :class:`Parameter` attribute, pass the corresponding
+      argument.  To remove a default value or/and an annotation from a
+      Parameter, pass :attr:`Parameter.empty`.
+
+      ::
+
+         >>> from funcsigs import Parameter
+         >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)
+         >>> str(param)
+         'foo=42'
+
+         >>> str(param.replace()) # Will create a shallow copy of 'param'
+         'foo=42'
+
+         >>> str(param.replace(default=Parameter.empty, annotation='spam'))
+         "foo:'spam'"
+
+
+.. class:: BoundArguments
+
+   Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.
+   Holds the mapping of arguments to the function's parameters.
+
+   .. attribute:: BoundArguments.arguments
+
+      An ordered, mutable mapping (:class:`collections.OrderedDict`) of
+      parameters' names to arguments' values.  Contains only explicitly bound
+      arguments.  Changes in :attr:`arguments` will reflect in :attr:`args` and
+      :attr:`kwargs`.
+
+      Should be used in conjunction with :attr:`Signature.parameters` for any
+      argument processing purposes.
+
+      .. note::
+
+         Arguments for which :meth:`Signature.bind` or
+         :meth:`Signature.bind_partial` relied on a default value are skipped.
+         However, if needed, it is easy to include them.
+
+      ::
+
+        >>> def foo(a, b=10):
+        ...     pass
+
+        >>> sig = signature(foo)
+        >>> ba = sig.bind(5)
+
+        >>> ba.args, ba.kwargs
+        ((5,), {})
+
+        >>> for param in sig.parameters.values():
+        ...     if param.name not in ba.arguments:
+        ...         ba.arguments[param.name] = param.default
+
+        >>> ba.args, ba.kwargs
+        ((5, 10), {})
+
+
+   .. attribute:: BoundArguments.args
+
+      A tuple of positional arguments values.  Dynamically computed from the
+      :attr:`arguments` attribute.
+
+   .. attribute:: BoundArguments.kwargs
+
+      A dict of keyword arguments values.  Dynamically computed from the
+      :attr:`arguments` attribute.
+
+   The :attr:`args` and :attr:`kwargs` properties can be used to invoke
+   functions::
+
+      def test(a, *, b):
+         ...
+
+      sig = signature(test)
+      ba = sig.bind(10, b=20)
+      test(*ba.args, **ba.kwargs)
+
+
+.. seealso::
+
+   :pep:`362` - Function Signature Object.
+      The detailed specification, implementation details and examples.
+
+Copyright
+---------
+
+*funcsigs* is a derived work of CPython under the terms of the `PSF License
+Agreement`_. The original CPython inspect module, its unit tests and
+documentation are the copyright of the Python Software Foundation. The derived
+work is distributed under the `Apache License Version 2.0`_.
+
+.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+.. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0
+.. _GitHub: https://github.com/testing-cabal/funcsigs
+.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+.. _Travis CI: http://travis-ci.org/
+.. _Read The Docs: http://funcsigs.readthedocs.org/
+.. _PEP 362: http://www.python.org/dev/peps/pep-0362/
+.. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object
+.. _issues system: https://github.com/testing-cabal/funcsigs/issues
+
+.. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master
+   :target: http://travis-ci.org/#!/aliles/funcsigs
+   :alt: Current build status
+
+.. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master
+   :target: https://coveralls.io/r/aliles/funcsigs?branch=master
+   :alt: Coverage status
+
+.. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png
+   :target: https://crate.io/packages/funcsigs/
+   :alt: Latest PyPI version
+
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/docs/Makefile
@@ -0,0 +1,153 @@
+# 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) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+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 "  singlehtml to make a single large HTML file"
+	@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 "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@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."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+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/funcsigs.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/funcsigs.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/funcsigs"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/funcsigs"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+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."
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/docs/_templates/page.html
@@ -0,0 +1,9 @@
+{% extends "!page.html" %}
+{% block extrahead %}
+    <a href="https://github.com/aliles/funcsigs">
+        <img style="position: absolute; top: 0; right: 0; border: 0;"
+             src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+             alt="Fork me on GitHub">
+    </a>
+    {{ super() }}
+{% endblock %}
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/docs/conf.py
@@ -0,0 +1,251 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# funcsigs documentation build configuration file, created by
+# sphinx-quickstart on Fri Apr 20 20:27:52 2012.
+#
+# 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.
+
+import sys, os
+
+# 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.insert(0, os.path.abspath('..'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# 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.viewcode']
+
+# 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-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'funcsigs'
+copyright = '2013, Aaron Iles'
+
+# 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.
+from funcsigs import __version__
+version = '.'.join(__version__.split('.')[:2])
+# 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 patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_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.  See the documentation for
+# a list of builtin themes.
+html_theme = 'agogo'
+
+# 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 = []
+
+# 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_domain_indices = 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, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = 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 = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'funcsigsdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'funcsigs.tex', 'funcsigs Documentation',
+   'Aaron Iles', '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
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'funcsigs', 'funcsigs Documentation',
+     ['Aaron Iles'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'funcsigs', 'funcsigs Documentation',
+   'Aaron Iles', 'funcsigs', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {
+        'python3': ('http://docs.python.org/py3k', None),
+        'python': ('http://docs.python.org/', None)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/docs/index.rst
@@ -0,0 +1,353 @@
+.. funcsigs documentation master file, created by
+   sphinx-quickstart on Fri Apr 20 20:27:52 2012.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Introducing funcsigs
+====================
+
+The Funcsigs Package
+--------------------
+
+``funcsigs`` is a backport of the `PEP 362`_ function signature features from
+Python 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7
+as well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and
+pip no longer supporting 3.2, we cannot make any statement about 3.2
+compatibility.
+
+Compatibility
+`````````````
+
+The ``funcsigs`` backport has been tested against:
+
+* CPython 2.6
+* CPython 2.7
+* CPython 3.3
+* CPython 3.4
+* CPython 3.5
+* CPython nightlies
+* PyPy and PyPy3(currently failing CI)
+
+Continuous integration testing is provided by `Travis CI`_.
+
+Under Python 2.x there is a compatibility issue when a function is assigned to
+the ``__wrapped__`` property of a class after it has been constructed.
+Similiarily there under PyPy directly passing the ``__call__`` method of a
+builtin is also a compatibility issues.  Otherwise the functionality is
+believed to be uniform between both Python2 and Python3.
+
+Issues
+``````
+
+Source code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature
+requests can be made using GitHub's `issues system`_. |build_status| |coverage|
+
+Example
+-------
+
+To obtain a `Signature` object, pass the target function to the
+``funcsigs.signature`` function.
+
+.. code-block:: python
+
+    >>> from funcsigs import signature
+    >>> def foo(a, b=None, *args, **kwargs):
+    ...     pass
+    ...
+    >>> sig = signature(foo)
+    >>> sig
+    <funcsigs.Signature object at 0x...>
+    >>> sig.parameters
+    OrderedDict([('a', <Parameter at 0x... 'a'>), ('b', <Parameter at 0x... 'b'>), ('args', <Parameter at 0x... 'args'>), ('kwargs', <Parameter at 0x... 'kwargs'>)])
+    >>> sig.return_annotation
+    <class 'funcsigs._empty'>
+
+Introspecting callables with the Signature object
+-------------------------------------------------
+
+.. note::
+
+   This section of documentation is a direct reproduction of the Python
+   standard library documentation for the inspect module.
+
+The Signature object represents the call signature of a callable object and its
+return annotation.  To retrieve a Signature object, use the :func:`signature`
+function.
+
+.. function:: signature(callable)
+
+   Return a :class:`Signature` object for the given ``callable``::
+
+      >>> from funcsigs import signature
+      >>> def foo(a, *, b:int, **kwargs):
+      ...     pass
+
+      >>> sig = signature(foo)
+
+      >>> str(sig)
+      '(a, *, b:int, **kwargs)'
+
+      >>> str(sig.parameters['b'])
+      'b:int'
+
+      >>> sig.parameters['b'].annotation
+      <class 'int'>
+
+   Accepts a wide range of python callables, from plain functions and classes to
+   :func:`functools.partial` objects.
+
+   .. note::
+
+      Some callables may not be introspectable in certain implementations of
+      Python.  For example, in CPython, built-in functions defined in C provide
+      no metadata about their arguments.
+
+
+.. class:: Signature
+
+   A Signature object represents the call signature of a function and its return
+   annotation.  For each parameter accepted by the function it stores a
+   :class:`Parameter` object in its :attr:`parameters` collection.
+
+   Signature objects are *immutable*.  Use :meth:`Signature.replace` to make a
+   modified copy.
+
+   .. attribute:: Signature.empty
+
+      A special class-level marker to specify absence of a return annotation.
+
+   .. attribute:: Signature.parameters
+
+      An ordered mapping of parameters' names to the corresponding
+      :class:`Parameter` objects.
+
+   .. attribute:: Signature.return_annotation
+
+      The "return" annotation for the callable.  If the callable has no "return"
+      annotation, this attribute is set to :attr:`Signature.empty`.
+
+   .. method:: Signature.bind(*args, **kwargs)
+
+      Create a mapping from positional and keyword arguments to parameters.
+      Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the
+      signature, or raises a :exc:`TypeError`.
+
+   .. method:: Signature.bind_partial(*args, **kwargs)
+
+      Works the same way as :meth:`Signature.bind`, but allows the omission of
+      some required arguments (mimics :func:`functools.partial` behavior.)
+      Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the
+      passed arguments do not match the signature.
+
+   .. method:: Signature.replace(*[, parameters][, return_annotation])
+
+      Create a new Signature instance based on the instance replace was invoked
+      on.  It is possible to pass different ``parameters`` and/or
+      ``return_annotation`` to override the corresponding properties of the base
+      signature.  To remove return_annotation from the copied Signature, pass in
+      :attr:`Signature.empty`.
+
+      ::
+
+         >>> def test(a, b):
+         ...     pass
+         >>> sig = signature(test)
+         >>> new_sig = sig.replace(return_annotation="new return anno")
+         >>> str(new_sig)
+         "(a, b) -> 'new return anno'"
+
+
+.. class:: Parameter
+
+   Parameter objects are *immutable*.  Instead of modifying a Parameter object,
+   you can use :meth:`Parameter.replace` to create a modified copy.
+
+   .. attribute:: Parameter.empty
+
+      A special class-level marker to specify absence of default values and
+      annotations.
+
+   .. attribute:: Parameter.name
+
+      The name of the parameter as a string.  Must be a valid python identifier
+      name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have
+      it set to ``None``).
+
+   .. attribute:: Parameter.default
+
+      The default value for the parameter.  If the parameter has no default
+      value, this attribute is set to :attr:`Parameter.empty`.
+
+   .. attribute:: Parameter.annotation
+
+      The annotation for the parameter.  If the parameter has no annotation,
+      this attribute is set to :attr:`Parameter.empty`.
+
+   .. attribute:: Parameter.kind
+
+      Describes how argument values are bound to the parameter.  Possible values
+      (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):
+
+      +------------------------+----------------------------------------------+
+      |    Name                | Meaning                                      |
+      +========================+==============================================+
+      | *POSITIONAL_ONLY*      | Value must be supplied as a positional       |
+      |                        | argument.                                    |
+      |                        |                                              |
+      |                        | Python has no explicit syntax for defining   |
+      |                        | positional-only parameters, but many built-in|
+      |                        | and extension module functions (especially   |
+      |                        | those that accept only one or two parameters)|
+      |                        | accept them.                                 |
+      +------------------------+----------------------------------------------+
+      | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
+      |                        | positional argument (this is the standard    |
+      |                        | binding behaviour for functions implemented  |
+      |                        | in Python.)                                  |
+      +------------------------+----------------------------------------------+
+      | *VAR_POSITIONAL*       | A tuple of positional arguments that aren't  |
+      |                        | bound to any other parameter. This           |
+      |                        | corresponds to a ``*args`` parameter in a    |
+      |                        | Python function definition.                  |
+      +------------------------+----------------------------------------------+
+      | *KEYWORD_ONLY*         | Value must be supplied as a keyword argument.|
+      |                        | Keyword only parameters are those which      |
+      |                        | appear after a ``*`` or ``*args`` entry in a |
+      |                        | Python function definition.                  |
+      +------------------------+----------------------------------------------+
+      | *VAR_KEYWORD*          | A dict of keyword arguments that aren't bound|
+      |                        | to any other parameter. This corresponds to a|
+      |                        | ``**kwargs`` parameter in a Python function  |
+      |                        | definition.                                  |
+      +------------------------+----------------------------------------------+
+
+      Example: print all keyword-only arguments without default values::
+
+         >>> def foo(a, b, *, c, d=10):
+         ...     pass
+
+         >>> sig = signature(foo)
+         >>> for param in sig.parameters.values():
+         ...     if (param.kind == param.KEYWORD_ONLY and
+         ...                        param.default is param.empty):
+         ...         print('Parameter:', param)
+         Parameter: c
+
+   .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
+
+      Create a new Parameter instance based on the instance replaced was invoked
+      on.  To override a :class:`Parameter` attribute, pass the corresponding
+      argument.  To remove a default value or/and an annotation from a
+      Parameter, pass :attr:`Parameter.empty`.
+
+      ::
+
+         >>> from funcsigs import Parameter
+         >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)
+         >>> str(param)
+         'foo=42'
+
+         >>> str(param.replace()) # Will create a shallow copy of 'param'
+         'foo=42'
+
+         >>> str(param.replace(default=Parameter.empty, annotation='spam'))
+         "foo:'spam'"
+
+
+.. class:: BoundArguments
+
+   Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.
+   Holds the mapping of arguments to the function's parameters.
+
+   .. attribute:: BoundArguments.arguments
+
+      An ordered, mutable mapping (:class:`collections.OrderedDict`) of
+      parameters' names to arguments' values.  Contains only explicitly bound
+      arguments.  Changes in :attr:`arguments` will reflect in :attr:`args` and
+      :attr:`kwargs`.
+
+      Should be used in conjunction with :attr:`Signature.parameters` for any
+      argument processing purposes.
+
+      .. note::
+
+         Arguments for which :meth:`Signature.bind` or
+         :meth:`Signature.bind_partial` relied on a default value are skipped.
+         However, if needed, it is easy to include them.
+
+      ::
+
+        >>> def foo(a, b=10):
+        ...     pass
+
+        >>> sig = signature(foo)
+        >>> ba = sig.bind(5)
+
+        >>> ba.args, ba.kwargs
+        ((5,), {})
+
+        >>> for param in sig.parameters.values():
+        ...     if param.name not in ba.arguments:
+        ...         ba.arguments[param.name] = param.default
+
+        >>> ba.args, ba.kwargs
+        ((5, 10), {})
+
+
+   .. attribute:: BoundArguments.args
+
+      A tuple of positional arguments values.  Dynamically computed from the
+      :attr:`arguments` attribute.
+
+   .. attribute:: BoundArguments.kwargs
+
+      A dict of keyword arguments values.  Dynamically computed from the
+      :attr:`arguments` attribute.
+
+   The :attr:`args` and :attr:`kwargs` properties can be used to invoke
+   functions::
+
+      def test(a, *, b):
+         ...
+
+      sig = signature(test)
+      ba = sig.bind(10, b=20)
+      test(*ba.args, **ba.kwargs)
+
+
+.. seealso::
+
+   :pep:`362` - Function Signature Object.
+      The detailed specification, implementation details and examples.
+
+Copyright
+---------
+
+*funcsigs* is a derived work of CPython under the terms of the `PSF License
+Agreement`_. The original CPython inspect module, its unit tests and
+documentation are the copyright of the Python Software Foundation. The derived
+work is distributed under the `Apache License Version 2.0`_.
+
+.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+.. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0
+.. _GitHub: https://github.com/testing-cabal/funcsigs
+.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
+.. _Travis CI: http://travis-ci.org/
+.. _Read The Docs: http://funcsigs.readthedocs.org/
+.. _PEP 362: http://www.python.org/dev/peps/pep-0362/
+.. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object
+.. _issues system: https://github.com/testing-cabal/funcsigs/issues
+
+.. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master
+   :target: http://travis-ci.org/#!/aliles/funcsigs
+   :alt: Current build status
+
+.. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master
+   :target: https://coveralls.io/r/aliles/funcsigs?branch=master
+   :alt: Coverage status
+
+.. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png
+   :target: https://crate.io/packages/funcsigs/
+   :alt: Latest PyPI version
+
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/funcsigs/__init__.py
@@ -0,0 +1,829 @@
+# Copyright 2001-2013 Python Software Foundation; All Rights Reserved
+"""Function signature objects for callables
+
+Back port of Python 3.3's function signature tools from the inspect module,
+modified to be compatible with Python 2.6, 2.7 and 3.3+.
+"""
+from __future__ import absolute_import, division, print_function
+import itertools
+import functools
+import re
+import types
+
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
+
+from funcsigs.version import __version__
+
+__all__ = ['BoundArguments', 'Parameter', 'Signature', 'signature']
+
+
+_WrapperDescriptor = type(type.__call__)
+_MethodWrapper = type(all.__call__)
+
+_NonUserDefinedCallables = (_WrapperDescriptor,
+                            _MethodWrapper,
+                            types.BuiltinFunctionType)
+
+
+def formatannotation(annotation, base_module=None):
+    if isinstance(annotation, type):
+        if annotation.__module__ in ('builtins', '__builtin__', base_module):
+            return annotation.__name__
+        return annotation.__module__+'.'+annotation.__name__
+    return repr(annotation)
+
+
+def _get_user_defined_method(cls, method_name, *nested):
+    try:
+        if cls is type:
+            return
+        meth = getattr(cls, method_name)
+        for name in nested:
+            meth = getattr(meth, name, meth)
+    except AttributeError:
+        return
+    else:
+        if not isinstance(meth, _NonUserDefinedCallables):
+            # Once '__signature__' will be added to 'C'-level
+            # callables, this check won't be necessary
+            return meth
+
+
+def signature(obj):
+    '''Get a signature object for the passed callable.'''
+
+    if not callable(obj):
+        raise TypeError('{0!r} is not a callable object'.format(obj))
+
+    if isinstance(obj, types.MethodType):
+        sig = signature(obj.__func__)
+        if obj.__self__ is None:
+            # Unbound method - preserve as-is.
+            return sig
+        else:
+            # Bound method. Eat self - if we can.
+            params = tuple(sig.parameters.values())
+
+            if not params or params[0].kind in (_VAR_KEYWORD, _KEYWORD_ONLY):
+                raise ValueError('invalid method signature')
+
+            kind = params[0].kind
+            if kind in (_POSITIONAL_OR_KEYWORD, _POSITIONAL_ONLY):
+                # Drop first parameter:
+                # '(p1, p2[, ...])' -> '(p2[, ...])'
+                params = params[1:]
+            else:
+                if kind is not _VAR_POSITIONAL:
+                    # Unless we add a new parameter type we never
+                    # get here
+                    raise ValueError('invalid argument type')
+                # It's a var-positional parameter.
+                # Do nothing. '(*args[, ...])' -> '(*args[, ...])'
+
+            return sig.replace(parameters=params)
+
+    try:
+        sig = obj.__signature__
+    except AttributeError:
+        pass
+    else:
+        if sig is not None:
+            return sig
+
+    try:
+        # Was this function wrapped by a decorator?
+        wrapped = obj.__wrapped__
+    except AttributeError:
+        pass
+    else:
+        return signature(wrapped)
+
+    if isinstance(obj, types.FunctionType):
+        return Signature.from_function(obj)
+
+    if isinstance(obj, functools.partial):
+        sig = signature(obj.func)
+
+        new_params = OrderedDict(sig.parameters.items())
+
+        partial_args = obj.args or ()
+        partial_keywords = obj.keywords or {}
+        try:
+            ba = sig.bind_partial(*partial_args, **partial_keywords)
+        except TypeError as ex:
+            msg = 'partial object {0!r} has incorrect arguments'.format(obj)
+            raise ValueError(msg)
+
+        for arg_name, arg_value in ba.arguments.items():
+            param = new_params[arg_name]
+            if arg_name in partial_keywords:
+                # We set a new default value, because the following code
+                # is correct:
+                #
+                #   >>> def foo(a): print(a)
+                #   >>> print(partial(partial(foo, a=10), a=20)())
+                #   20
+                #   >>> print(partial(partial(foo, a=10), a=20)(a=30))
+                #   30
+                #
+                # So, with 'partial' objects, passing a keyword argument is
+                # like setting a new default value for the corresponding
+                # parameter
+                #
+                # We also mark this parameter with '_partial_kwarg'
+                # flag.  Later, in '_bind', the 'default' value of this
+                # parameter will be added to 'kwargs', to simulate
+                # the 'functools.partial' real call.
+                new_params[arg_name] = param.replace(default=arg_value,
+                                                     _partial_kwarg=True)
+
+            elif (param.kind not in (_VAR_KEYWORD, _VAR_POSITIONAL) and
+                            not param._partial_kwarg):
+                new_params.pop(arg_name)
+
+        return sig.replace(parameters=new_params.values())
+
+    sig = None
+    if isinstance(obj, type):
+        # obj is a class or a metaclass
+
+        # First, let's see if it has an overloaded __call__ defined
+        # in its metaclass
+        call = _get_user_defined_method(type(obj), '__call__')
+        if call is not None:
+            sig = signature(call)
+        else:
+            # Now we check if the 'obj' class has a '__new__' method
+            new = _get_user_defined_method(obj, '__new__')
+            if new is not None:
+                sig = signature(new)
+            else:
+                # Finally, we should have at least __init__ implemented
+                init = _get_user_defined_method(obj, '__init__')
+                if init is not None:
+                    sig = signature(init)
+    elif not isinstance(obj, _NonUserDefinedCallables):
+        # An object with __call__
+        # We also check that the 'obj' is not an instance of
+        # _WrapperDescriptor or _MethodWrapper to avoid
+        # infinite recursion (and even potential segfault)
+        call = _get_user_defined_method(type(obj), '__call__', 'im_func')
+        if call is not None:
+            sig = signature(call)
+
+    if sig is not None:
+        # For classes and objects we skip the first parameter of their
+        # __call__, __new__, or __init__ methods
+        return sig.replace(parameters=tuple(sig.parameters.values())[1:])
+
+    if isinstance(obj, types.BuiltinFunctionType):
+        # Raise a nicer error message for builtins
+        msg = 'no signature found for builtin function {0!r}'.format(obj)
+        raise ValueError(msg)
+
+    raise ValueError('callable {0!r} is not supported by signature'.format(obj))
+
+
+class _void(object):
+    '''A private marker - used in Parameter & Signature'''
+
+
+class _empty(object):
+    pass
+
+
+class _ParameterKind(int):
+    def __new__(self, *args, **kwargs):
+        obj = int.__new__(self, *args)
+        obj._name = kwargs['name']
+        return obj
+
+    def __str__(self):
+        return self._name
+
+    def __repr__(self):
+        return '<_ParameterKind: {0!r}>'.format(self._name)
+
+
+_POSITIONAL_ONLY        = _ParameterKind(0, name='POSITIONAL_ONLY')
+_POSITIONAL_OR_KEYWORD  = _ParameterKind(1, name='POSITIONAL_OR_KEYWORD')
+_VAR_POSITIONAL         = _ParameterKind(2, name='VAR_POSITIONAL')
+_KEYWORD_ONLY           = _ParameterKind(3, name='KEYWORD_ONLY')
+_VAR_KEYWORD            = _ParameterKind(4, name='VAR_KEYWORD')
+
+
+class Parameter(object):
+    '''Represents a parameter in a function signature.
+
+    Has the following public attributes:
+
+    * name : str
+        The name of the parameter as a string.
+    * default : object
+        The default value for the parameter if specified.  If the
+        parameter has no default value, this attribute is not set.
+    * annotation
+        The annotation for the parameter if specified.  If the
+        parameter has no annotation, this attribute is not set.
+    * kind : str
+        Describes how argument values are bound to the parameter.
+        Possible values: `Parameter.POSITIONAL_ONLY`,
+        `Parameter.POSITIONAL_OR_KEYWORD`, `Parameter.VAR_POSITIONAL`,
+        `Parameter.KEYWORD_ONLY`, `Parameter.VAR_KEYWORD`.
+    '''
+
+    __slots__ = ('_name', '_kind', '_default', '_annotation', '_partial_kwarg')
+
+    POSITIONAL_ONLY         = _POSITIONAL_ONLY
+    POSITIONAL_OR_KEYWORD   = _POSITIONAL_OR_KEYWORD
+    VAR_POSITIONAL          = _VAR_POSITIONAL
+    KEYWORD_ONLY            = _KEYWORD_ONLY
+    VAR_KEYWORD             = _VAR_KEYWORD
+
+    empty = _empty
+
+    def __init__(self, name, kind, default=_empty, annotation=_empty,
+                 _partial_kwarg=False):
+
+        if kind not in (_POSITIONAL_ONLY, _POSITIONAL_OR_KEYWORD,
+                        _VAR_POSITIONAL, _KEYWORD_ONLY, _VAR_KEYWORD):
+            raise ValueError("invalid value for 'Parameter.kind' attribute")
+        self._kind = kind
+
+        if default is not _empty:
+            if kind in (_VAR_POSITIONAL, _VAR_KEYWORD):
+                msg = '{0} parameters cannot have default values'.format(kind)
+                raise ValueError(msg)
+        self._default = default
+        self._annotation = annotation
+
+        if name is None:
+            if kind != _POSITIONAL_ONLY:
+                raise ValueError("None is not a valid name for a "
+                                 "non-positional-only parameter")
+            self._name = name
+        else:
+            name = str(name)
+            if kind != _POSITIONAL_ONLY and not re.match(r'[a-z_]\w*$', name, re.I):
+                msg = '{0!r} is not a valid parameter name'.format(name)
+                raise ValueError(msg)
+            self._name = name
+
+        self._partial_kwarg = _partial_kwarg
+
+    @property
+    def name(self):
+        return self._name
+
+    @property
+    def default(self):
+        return self._default
+
+    @property
+    def annotation(self):
+        return self._annotation
+
+    @property
+    def kind(self):
+        return self._kind
+
+    def replace(self, name=_void, kind=_void, annotation=_void,
+                default=_void, _partial_kwarg=_void):
+        '''Creates a customized copy of the Parameter.'''
+
+        if name is _void:
+            name = self._name
+
+        if kind is _void:
+            kind = self._kind
+
+        if annotation is _void:
+            annotation = self._annotation
+
+        if default is _void:
+            default = self._default
+
+        if _partial_kwarg is _void:
+            _partial_kwarg = self._partial_kwarg
+
+        return type(self)(name, kind, default=default, annotation=annotation,
+                          _partial_kwarg=_partial_kwarg)
+
+    def __str__(self):
+        kind = self.kind
+
+        formatted = self._name
+        if kind == _POSITIONAL_ONLY:
+            if formatted is None:
+                formatted = ''
+            formatted = '<{0}>'.format(formatted)
+
+        # Add annotation and default value
+        if self._annotation is not _empty:
+            formatted = '{0}:{1}'.format(formatted,
+                                       formatannotation(self._annotation))
+
+        if self._default is not _empty:
+            formatted = '{0}={1}'.format(formatted, repr(self._default))
+
+        if kind == _VAR_POSITIONAL:
+            formatted = '*' + formatted
+        elif kind == _VAR_KEYWORD:
+            formatted = '**' + formatted
+
+        return formatted
+
+    def __repr__(self):
+        return '<{0} at {1:#x} {2!r}>'.format(self.__class__.__name__,
+                                           id(self), self.name)
+
+    def __hash__(self):
+        msg = "unhashable type: '{0}'".format(self.__class__.__name__)
+        raise TypeError(msg)
+
+    def __eq__(self, other):
+        return (issubclass(other.__class__, Parameter) and
+                self._name == other._name and
+                self._kind == other._kind and
+                self._default == other._default and
+                self._annotation == other._annotation)
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+
+class BoundArguments(object):
+    '''Result of `Signature.bind` call.  Holds the mapping of arguments
+    to the function's parameters.
+
+    Has the following public attributes:
+
+    * arguments : OrderedDict
+        An ordered mutable mapping of parameters' names to arguments' values.
+        Does not contain arguments' default values.
+    * signature : Signature
+        The Signature object that created this instance.
+    * args : tuple
+        Tuple of positional arguments values.
+    * kwargs : dict
+        Dict of keyword arguments values.
+    '''
+
+    def __init__(self, signature, arguments):
+        self.arguments = arguments
+        self._signature = signature
+
+    @property
+    def signature(self):
+        return self._signature
+
+    @property
+    def args(self):
+        args = []
+        for param_name, param in self._signature.parameters.items():
+            if (param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY) or
+                                                    param._partial_kwarg):
+                # Keyword arguments mapped by 'functools.partial'
+                # (Parameter._partial_kwarg is True) are mapped
+                # in 'BoundArguments.kwargs', along with VAR_KEYWORD &
+                # KEYWORD_ONLY
+                break
+
+            try:
+                arg = self.arguments[param_name]
+            except KeyError:
+                # We're done here. Other arguments
+                # will be mapped in 'BoundArguments.kwargs'
+                break
+            else:
+                if param.kind == _VAR_POSITIONAL:
+                    # *args
+                    args.extend(arg)
+                else:
+                    # plain argument
+                    args.append(arg)
+
+        return tuple(args)
+
+    @property
+    def kwargs(self):
+        kwargs = {}
+        kwargs_started = False
+        for param_name, param in self._signature.parameters.items():
+            if not kwargs_started:
+                if (param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY) or
+                                                param._partial_kwarg):
+                    kwargs_started = True
+                else:
+                    if param_name not in self.arguments:
+                        kwargs_started = True
+                        continue
+
+            if not kwargs_started:
+                continue
+
+            try:
+                arg = self.arguments[param_name]
+            except KeyError:
+                pass
+            else:
+                if param.kind == _VAR_KEYWORD:
+                    # **kwargs
+                    kwargs.update(arg)
+                else:
+                    # plain keyword argument
+                    kwargs[param_name] = arg
+
+        return kwargs
+
+    def __hash__(self):
+        msg = "unhashable type: '{0}'".format(self.__class__.__name__)
+        raise TypeError(msg)
+
+    def __eq__(self, other):
+        return (issubclass(other.__class__, BoundArguments) and
+                self.signature == other.signature and
+                self.arguments == other.arguments)
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+
+class Signature(object):
+    '''A Signature object represents the overall signature of a function.
+    It stores a Parameter object for each parameter accepted by the
+    function, as well as information specific to the function itself.
+
+    A Signature object has the following public attributes and methods:
+
+    * parameters : OrderedDict
+        An ordered mapping of parameters' names to the corresponding
+        Parameter objects (keyword-only arguments are in the same order
+        as listed in `code.co_varnames`).
+    * return_annotation : object
+        The annotation for the return type of the function if specified.
+        If the function has no annotation for its return type, this
+        attribute is not set.
+    * bind(*args, **kwargs) -> BoundArguments
+        Creates a mapping from positional and keyword arguments to
+        parameters.
+    * bind_partial(*args, **kwargs) -> BoundArguments
+        Creates a partial mapping from positional and keyword arguments
+        to parameters (simulating 'functools.partial' behavior.)
+    '''
+
+    __slots__ = ('_return_annotation', '_parameters')
+
+    _parameter_cls = Parameter
+    _bound_arguments_cls = BoundArguments
+
+    empty = _empty
+
+    def __init__(self, parameters=None, return_annotation=_empty,
+                 __validate_parameters__=True):
+        '''Constructs Signature from the given list of Parameter
+        objects and 'return_annotation'.  All arguments are optional.
+        '''
+
+        if parameters is None:
+            params = OrderedDict()
+        else:
+            if __validate_parameters__:
+                params = OrderedDict()
+                top_kind = _POSITIONAL_ONLY
+
+                for idx, param in enumerate(parameters):
+                    kind = param.kind
+                    if kind < top_kind:
+                        msg = 'wrong parameter order: {0} before {1}'
+                        msg = msg.format(top_kind, param.kind)
+                        raise ValueError(msg)
+                    else:
+                        top_kind = kind
+
+                    name = param.name
+                    if name is None:
+                        name = str(idx)
+                        param = param.replace(name=name)
+
+                    if name in params:
+                        msg = 'duplicate parameter name: {0!r}'.format(name)
+                        raise ValueError(msg)
+                    params[name] = param
+            else:
+                params = OrderedDict(((param.name, param)
+                                                for param in parameters))
+
+        self._parameters = params
+        self._return_annotation = return_annotation
+
+    @classmethod
+    def from_function(cls, func):
+        '''Constructs Signature for the given python function'''
+
+        if not isinstance(func, types.FunctionType):
+            raise TypeError('{0!r} is not a Python function'.format(func))
+
+        Parameter = cls._parameter_cls
+
+        # Parameter information.
+        func_code = func.__code__
+        pos_count = func_code.co_argcount
+        arg_names = func_code.co_varnames
+        positional = tuple(arg_names[:pos_count])
+        keyword_only_count = getattr(func_code, 'co_kwonlyargcount', 0)
+        keyword_only = arg_names[pos_count:(pos_count + keyword_only_count)]
+        annotations = getattr(func, '__annotations__', {})
+        defaults = func.__defaults__
+        kwdefaults = getattr(func, '__kwdefaults__', None)
+
+        if defaults:
+            pos_default_count = len(defaults)
+        else:
+            pos_default_count = 0
+
+        parameters = []
+
+        # Non-keyword-only parameters w/o defaults.
+        non_default_count = pos_count - pos_default_count
+        for name in positional[:non_default_count]:
+            annotation = annotations.get(name, _empty)
+            parameters.append(Parameter(name, annotation=annotation,
+                                        kind=_POSITIONAL_OR_KEYWORD))
+
+        # ... w/ defaults.
+        for offset, name in enumerate(positional[non_default_count:]):
+            annotation = annotations.get(name, _empty)
+            parameters.append(Parameter(name, annotation=annotation,
+                                        kind=_POSITIONAL_OR_KEYWORD,
+                                        default=defaults[offset]))
+
+        # *args
+        if func_code.co_flags & 0x04:
+            name = arg_names[pos_count + keyword_only_count]
+            annotation = annotations.get(name, _empty)
+            parameters.append(Parameter(name, annotation=annotation,
+                                        kind=_VAR_POSITIONAL))
+
+        # Keyword-only parameters.
+        for name in keyword_only:
+            default = _empty
+            if kwdefaults is not None:
+                default = kwdefaults.get(name, _empty)
+
+            annotation = annotations.get(name, _empty)
+            parameters.append(Parameter(name, annotation=annotation,
+                                        kind=_KEYWORD_ONLY,
+                                        default=default))
+        # **kwargs
+        if func_code.co_flags & 0x08:
+            index = pos_count + keyword_only_count
+            if func_code.co_flags & 0x04:
+                index += 1
+
+            name = arg_names[index]
+            annotation = annotations.get(name, _empty)
+            parameters.append(Parameter(name, annotation=annotation,
+                                        kind=_VAR_KEYWORD))
+
+        return cls(parameters,
+                   return_annotation=annotations.get('return', _empty),
+                   __validate_parameters__=False)
+
+    @property
+    def parameters(self):
+        try:
+            return types.MappingProxyType(self._parameters)
+        except AttributeError:
+            return OrderedDict(self._parameters.items())
+
+    @property
+    def return_annotation(self):
+        return self._return_annotation
+
+    def replace(self, parameters=_void, return_annotation=_void):
+        '''Creates a customized copy of the Signature.
+        Pass 'parameters' and/or 'return_annotation' arguments
+        to override them in the new copy.
+        '''
+
+        if parameters is _void:
+            parameters = self.parameters.values()
+
+        if return_annotation is _void:
+            return_annotation = self._return_annotation
+
+        return type(self)(parameters,
+                          return_annotation=return_annotation)
+
+    def __hash__(self):
+        msg = "unhashable type: '{0}'".format(self.__class__.__name__)
+        raise TypeError(msg)
+
+    def __eq__(self, other):
+        if (not issubclass(type(other), Signature) or
+                    self.return_annotation != other.return_annotation or
+                    len(self.parameters) != len(other.parameters)):
+            return False
+
+        other_positions = dict((param, idx)
+                           for idx, param in enumerate(other.parameters.keys()))
+
+        for idx, (param_name, param) in enumerate(self.parameters.items()):
+            if param.kind == _KEYWORD_ONLY:
+                try:
+                    other_param = other.parameters[param_name]
+                except KeyError:
+                    return False
+                else:
+                    if param != other_param:
+                        return False
+            else:
+                try:
+                    other_idx = other_positions[param_name]
+                except KeyError:
+                    return False
+                else:
+                    if (idx != other_idx or
+                                    param != other.parameters[param_name]):
+                        return False
+
+        return True
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def _bind(self, args, kwargs, partial=False):
+        '''Private method.  Don't use directly.'''
+
+        arguments = OrderedDict()
+
+        parameters = iter(self.parameters.values())
+        parameters_ex = ()
+        arg_vals = iter(args)
+
+        if partial:
+            # Support for binding arguments to 'functools.partial' objects.
+            # See 'functools.partial' case in 'signature()' implementation
+            # for details.
+            for param_name, param in self.parameters.items():
+                if (param._partial_kwarg and param_name not in kwargs):
+                    # Simulating 'functools.partial' behavior
+                    kwargs[param_name] = param.default
+
+        while True:
+            # Let's iterate through the positional arguments and corresponding
+            # parameters
+            try:
+                arg_val = next(arg_vals)
+            except StopIteration:
+                # No more positional arguments
+                try:
+                    param = next(parameters)
+                except StopIteration:
+                    # No more parameters. That's it. Just need to check that
+                    # we have no `kwargs` after this while loop
+                    break
+                else:
+                    if param.kind == _VAR_POSITIONAL:
+                        # That's OK, just empty *args.  Let's start parsing
+                        # kwargs
+                        break
+                    elif param.name in kwargs:
+                        if param.kind == _POSITIONAL_ONLY:
+                            msg = '{arg!r} parameter is positional only, ' \
+                                  'but was passed as a keyword'
+                            msg = msg.format(arg=param.name)
+                            raise TypeError(msg)
+                        parameters_ex = (param,)
+                        break
+                    elif (param.kind == _VAR_KEYWORD or
+                                                param.default is not _empty):
+                        # That's fine too - we have a default value for this
+                        # parameter.  So, lets start parsing `kwargs`, starting
+                        # with the current parameter
+                        parameters_ex = (param,)
+                        break
+                    else:
+                        if partial:
+                            parameters_ex = (param,)
+                            break
+                        else:
+                            msg = '{arg!r} parameter lacking default value'
+                            msg = msg.format(arg=param.name)
+                            raise TypeError(msg)
+            else:
+                # We have a positional argument to process
+                try:
+                    param = next(parameters)
+                except StopIteration:
+                    raise TypeError('too many positional arguments')
+                else:
+                    if param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY):
+                        # Looks like we have no parameter for this positional
+                        # argument
+                        raise TypeError('too many positional arguments')
+
+                    if param.kind == _VAR_POSITIONAL:
+                        # We have an '*args'-like argument, let's fill it with
+                        # all positional arguments we have left and move on to
+                        # the next phase
+                        values = [arg_val]
+                        values.extend(arg_vals)
+                        arguments[param.name] = tuple(values)
+                        break
+
+                    if param.name in kwargs:
+                        raise TypeError('multiple values for argument '
+                                        '{arg!r}'.format(arg=param.name))
+
+                    arguments[param.name] = arg_val
+
+        # Now, we iterate through the remaining parameters to process
+        # keyword arguments
+        kwargs_param = None
+        for param in itertools.chain(parameters_ex, parameters):
+            if param.kind == _POSITIONAL_ONLY:
+                # This should never happen in case of a properly built
+                # Signature object (but let's have this check here
+                # to ensure correct behaviour just in case)
+                raise TypeError('{arg!r} parameter is positional only, '
+                                'but was passed as a keyword'. \
+                                format(arg=param.name))
+
+            if param.kind == _VAR_KEYWORD:
+                # Memorize that we have a '**kwargs'-like parameter
+                kwargs_param = param
+                continue
+
+            param_name = param.name
+            try:
+                arg_val = kwargs.pop(param_name)
+            except KeyError:
+                # We have no value for this parameter.  It's fine though,
+                # if it has a default value, or it is an '*args'-like
+                # parameter, left alone by the processing of positional
+                # arguments.
+                if (not partial and param.kind != _VAR_POSITIONAL and
+                                                    param.default is _empty):
+                    raise TypeError('{arg!r} parameter lacking default value'. \
+                                    format(arg=param_name))
+
+            else:
+                arguments[param_name] = arg_val
+
+        if kwargs:
+            if kwargs_param is not None:
+                # Process our '**kwargs'-like parameter
+                arguments[kwargs_param.name] = kwargs
+            else:
+                raise TypeError('too many keyword arguments %r' % kwargs)
+
+        return self._bound_arguments_cls(self, arguments)
+
+    def bind(*args, **kwargs):
+        '''Get a BoundArguments object, that maps the passed `args`
+        and `kwargs` to the function's signature.  Raises `TypeError`
+        if the passed arguments can not be bound.
+        '''
+        return args[0]._bind(args[1:], kwargs)
+
+    def bind_partial(self, *args, **kwargs):
+        '''Get a BoundArguments object, that partially maps the
+        passed `args` and `kwargs` to the function's signature.
+        Raises `TypeError` if the passed arguments can not be bound.
+        '''
+        return self._bind(args, kwargs, partial=True)
+
+    def __str__(self):
+        result = []
+        render_kw_only_separator = True
+        for idx, param in enumerate(self.parameters.values()):
+            formatted = str(param)
+
+            kind = param.kind
+            if kind == _VAR_POSITIONAL:
+                # OK, we have an '*args'-like parameter, so we won't need
+                # a '*' to separate keyword-only arguments
+                render_kw_only_separator = False
+            elif kind == _KEYWORD_ONLY and render_kw_only_separator:
+                # We have a keyword-only parameter to render and we haven't
+                # rendered an '*args'-like parameter before, so add a '*'
+                # separator to the parameters list ("foo(arg1, *, arg2)" case)
+                result.append('*')
+                # This condition should be only triggered once, so
+                # reset the flag
+                render_kw_only_separator = False
+
+            result.append(formatted)
+
+        rendered = '({0})'.format(', '.join(result))
+
+        if self.return_annotation is not _empty:
+            anno = formatannotation(self.return_annotation)
+            rendered += ' -> {0}'.format(anno)
+
+        return rendered
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/funcsigs/version.py
@@ -0,0 +1,1 @@
+__version__ = "1.0.2"
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/setup.cfg
@@ -0,0 +1,8 @@
+[wheel]
+universal = 1
+
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/setup.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+from setuptools import setup
+import re
+import sys
+
+def load_version(filename='funcsigs/version.py'):
+    "Parse a __version__ number from a source file"
+    with open(filename) as source:
+        text = source.read()
+        match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", text)
+        if not match:
+            msg = "Unable to find version number in {}".format(filename)
+            raise RuntimeError(msg)
+        version = match.group(1)
+        return version
+
+
+setup(
+    name="funcsigs",
+    version=load_version(),
+    packages=['funcsigs'],
+    zip_safe=False,
+    author="Testing Cabal",
+    author_email="testing-in-python@lists.idyll.org",
+    url="http://funcsigs.readthedocs.org",
+    description="Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+",
+    long_description=open('README.rst').read(),
+    license="ASL",
+    extras_require = {
+        ':python_version<"2.7"': ['ordereddict'],
+    },
+    setup_requires = ["setuptools>=17.1"],
+    classifiers = [
+        'Development Status :: 4 - Beta',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: Apache Software License',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
+        'Topic :: Software Development :: Libraries :: Python Modules'
+    ],
+    tests_require = ['unittest2'],
+    test_suite = 'unittest2.collector',
+)
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/tests/test_formatannotation.py
@@ -0,0 +1,17 @@
+import funcsigs
+
+import unittest2 as unittest
+
+class TestFormatAnnotation(unittest.TestCase):
+    def test_string (self):
+        self.assertEqual(funcsigs.formatannotation("annotation"),
+                         "'annotation'")
+
+    def test_builtin_type (self):
+        self.assertEqual(funcsigs.formatannotation(int),
+                         "int")
+
+    def test_user_type (self):
+        class dummy (object): pass
+        self.assertEqual(funcsigs.formatannotation(dummy),
+                         "tests.test_formatannotation.dummy")
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/tests/test_funcsigs.py
@@ -0,0 +1,91 @@
+import unittest2 as unittest
+
+import doctest
+import sys
+
+import funcsigs as inspect
+
+
+class TestFunctionSignatures(unittest.TestCase):
+
+    @staticmethod
+    def signature(func):
+        sig = inspect.signature(func)
+        return (tuple((param.name,
+                       (Ellipsis if param.default is param.empty else param.default),
+                       (Ellipsis if param.annotation is param.empty
+                                                        else param.annotation),
+                       str(param.kind).lower())
+                                    for param in sig.parameters.values()),
+                (Ellipsis if sig.return_annotation is sig.empty
+                                            else sig.return_annotation))
+
+    def test_zero_arguments(self):
+        def test():
+            pass
+        self.assertEqual(self.signature(test),
+                ((), Ellipsis))
+
+    def test_single_positional_argument(self):
+        def test(a):
+            pass
+        self.assertEqual(self.signature(test),
+                (((('a', Ellipsis, Ellipsis, "positional_or_keyword")),), Ellipsis))
+
+    def test_single_keyword_argument(self):
+        def test(a=None):
+            pass
+        self.assertEqual(self.signature(test),
+                (((('a', None, Ellipsis, "positional_or_keyword")),), Ellipsis))
+
+    def test_var_args(self):
+        def test(*args):
+            pass
+        self.assertEqual(self.signature(test),
+                (((('args', Ellipsis, Ellipsis, "var_positional")),), Ellipsis))
+
+    def test_keywords_args(self):
+        def test(**kwargs):
+            pass
+        self.assertEqual(self.signature(test),
+                (((('kwargs', Ellipsis, Ellipsis, "var_keyword")),), Ellipsis))
+
+    def test_multiple_arguments(self):
+        def test(a, b=None, *args, **kwargs):
+            pass
+        self.assertEqual(self.signature(test), ((
+            ('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+            ('b', None, Ellipsis, "positional_or_keyword"),
+            ('args', Ellipsis, Ellipsis, "var_positional"),
+            ('kwargs', Ellipsis, Ellipsis, "var_keyword"),
+            ), Ellipsis))
+
+    def test_has_version(self):
+        self.assertTrue(inspect.__version__)
+
+    def test_readme(self):
+        # XXX: This fails but doesn't fail the build.
+	# (and the syntax isn't valid on all pythons so that seems a little
+	# hard to get right.
+        doctest.testfile('../README.rst')
+
+    def test_unbound_method(self):
+        self_kind = "positional_or_keyword"
+        class Test(object):
+            def method(self):
+                pass
+            def method_with_args(self, a):
+                pass
+            def method_with_varargs(*args):
+                pass
+        self.assertEqual(
+            self.signature(Test.method),
+            (((('self', Ellipsis, Ellipsis, self_kind)),), Ellipsis))
+        self.assertEqual(
+            self.signature(Test.method_with_args),
+            ((('self', Ellipsis, Ellipsis, self_kind),
+              ('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                ), Ellipsis))
+        self.assertEqual(
+            self.signature(Test.method_with_varargs),
+            ((('args', Ellipsis, Ellipsis, "var_positional"),), Ellipsis))
new file mode 100644
--- /dev/null
+++ b/third_party/python/funcsigs/tests/test_inspect.py
@@ -0,0 +1,1002 @@
+# Copyright 2001-2013 Python Software Foundation; All Rights Reserved
+from __future__ import absolute_import, division, print_function
+import collections
+import functools
+import sys
+
+import unittest2 as unittest
+
+import funcsigs as inspect
+
+
+class TestSignatureObject(unittest.TestCase):
+    @staticmethod
+    def signature(func):
+        sig = inspect.signature(func)
+        return (tuple((param.name,
+                       (Ellipsis if param.default is param.empty else param.default),
+                       (Ellipsis if param.annotation is param.empty
+                                                        else param.annotation),
+                       str(param.kind).lower())
+                                    for param in sig.parameters.values()),
+                (Ellipsis if sig.return_annotation is sig.empty
+                                            else sig.return_annotation))
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_object(self):
+    S = inspect.Signature
+    P = inspect.Parameter
+
+    self.assertEqual(str(S()), '()')
+
+    def test(po, pk, *args, ko, **kwargs):
+        pass
+    sig = inspect.signature(test)
+    po = sig.parameters['po'].replace(kind=P.POSITIONAL_ONLY)
+    pk = sig.parameters['pk']
+    args = sig.parameters['args']
+    ko = sig.parameters['ko']
+    kwargs = sig.parameters['kwargs']
+
+    S((po, pk, args, ko, kwargs))
+
+    with self.assertRaisesRegex(ValueError, 'wrong parameter order'):
+        S((pk, po, args, ko, kwargs))
+
+    with self.assertRaisesRegex(ValueError, 'wrong parameter order'):
+        S((po, args, pk, ko, kwargs))
+
+    with self.assertRaisesRegex(ValueError, 'wrong parameter order'):
+        S((args, po, pk, ko, kwargs))
+
+    with self.assertRaisesRegex(ValueError, 'wrong parameter order'):
+        S((po, pk, args, kwargs, ko))
+
+    kwargs2 = kwargs.replace(name='args')
+    with self.assertRaisesRegex(ValueError, 'duplicate parameter name'):
+        S((po, pk, args, kwargs2, ko))
+""")
+
+    def test_signature_immutability(self):
+        def test(a):
+            pass
+        sig = inspect.signature(test)
+
+        with self.assertRaises(AttributeError):
+            sig.foo = 'bar'
+
+        # Python2 does not have MappingProxyType class
+        if sys.version_info[:2] < (3, 3):
+            return
+
+        with self.assertRaises(TypeError):
+            sig.parameters['a'] = None
+
+    def test_signature_on_noarg(self):
+        def test():
+            pass
+        self.assertEqual(self.signature(test), ((), Ellipsis))
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_wargs(self):
+    def test(a, b:'foo') -> 123:
+        pass
+    self.assertEqual(self.signature(test),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', Ellipsis, 'foo', "positional_or_keyword")),
+                      123))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_wkwonly(self):
+    def test(*, a:float, b:str) -> int:
+        pass
+    self.assertEqual(self.signature(test),
+                     ((('a', Ellipsis, float, "keyword_only"),
+                       ('b', Ellipsis, str, "keyword_only")),
+                       int))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_complex_args(self):
+    def test(a, b:'foo'=10, *args:'bar', spam:'baz', ham=123, **kwargs:int):
+        pass
+    self.assertEqual(self.signature(test),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', 10, 'foo', "positional_or_keyword"),
+                       ('args', Ellipsis, 'bar', "var_positional"),
+                       ('spam', Ellipsis, 'baz', "keyword_only"),
+                       ('ham', 123, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, int, "var_keyword")),
+                      Ellipsis))
+""")
+
+    def test_signature_on_builtin_function(self):
+        with self.assertRaisesRegex(ValueError, 'not supported by signature'):
+            inspect.signature(type)
+        with self.assertRaisesRegex(ValueError, 'not supported by signature'):
+            # support for 'wrapper_descriptor'
+            inspect.signature(type.__call__)
+            if hasattr(sys, 'pypy_version_info'):
+                raise ValueError('not supported by signature')
+        with self.assertRaisesRegex(ValueError, 'not supported by signature'):
+            # support for 'method-wrapper'
+            inspect.signature(min.__call__)
+            if hasattr(sys, 'pypy_version_info'):
+                raise ValueError('not supported by signature')
+        with self.assertRaisesRegex(ValueError,
+                                     'no signature found for builtin function'):
+            # support for 'method-wrapper'
+            inspect.signature(min)
+
+    def test_signature_on_non_function(self):
+        with self.assertRaisesRegex(TypeError, 'is not a callable object'):
+            inspect.signature(42)
+
+        with self.assertRaisesRegex(TypeError, 'is not a Python function'):
+            inspect.Signature.from_function(42)
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_method(self):
+    class Test:
+        def foo(self, arg1, arg2=1) -> int:
+            pass
+
+    meth = Test().foo
+
+    self.assertEqual(self.signature(meth),
+                     ((('arg1', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('arg2', 1, Ellipsis, "positional_or_keyword")),
+                      int))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_classmethod(self):
+    class Test:
+        @classmethod
+        def foo(cls, arg1, *, arg2=1):
+            pass
+
+    meth = Test().foo
+    self.assertEqual(self.signature(meth),
+                     ((('arg1', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('arg2', 1, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    meth = Test.foo
+    self.assertEqual(self.signature(meth),
+                     ((('arg1', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('arg2', 1, Ellipsis, "keyword_only")),
+                      Ellipsis))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_staticmethod(self):
+    class Test:
+        @staticmethod
+        def foo(cls, *, arg):
+            pass
+
+    meth = Test().foo
+    self.assertEqual(self.signature(meth),
+                     ((('cls', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('arg', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    meth = Test.foo
+    self.assertEqual(self.signature(meth),
+                     ((('cls', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('arg', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_partial(self):
+    from functools import partial
+
+    def test():
+        pass
+
+    self.assertEqual(self.signature(partial(test)), ((), Ellipsis))
+
+    with self.assertRaisesRegex(ValueError, "has incorrect arguments"):
+        inspect.signature(partial(test, 1))
+
+    with self.assertRaisesRegex(ValueError, "has incorrect arguments"):
+        inspect.signature(partial(test, a=1))
+
+    def test(a, b, *, c, d):
+        pass
+
+    self.assertEqual(self.signature(partial(test)),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('c', Ellipsis, Ellipsis, "keyword_only"),
+                       ('d', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, 1)),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('c', Ellipsis, Ellipsis, "keyword_only"),
+                       ('d', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, 1, c=2)),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('c', 2, Ellipsis, "keyword_only"),
+                       ('d', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, b=1, c=2)),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', 1, Ellipsis, "positional_or_keyword"),
+                       ('c', 2, Ellipsis, "keyword_only"),
+                       ('d', Ellipsis, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, 0, b=1, c=2)),
+                     ((('b', 1, Ellipsis, "positional_or_keyword"),
+                       ('c', 2, Ellipsis, "keyword_only"),
+                       ('d', Ellipsis, Ellipsis, "keyword_only"),),
+                      Ellipsis))
+
+    def test(a, *args, b, **kwargs):
+        pass
+
+    self.assertEqual(self.signature(partial(test, 1)),
+                     ((('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', Ellipsis, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, 1, 2, 3)),
+                     ((('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', Ellipsis, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+
+    self.assertEqual(self.signature(partial(test, 1, 2, 3, test=True)),
+                     ((('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', Ellipsis, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, 1, 2, 3, test=1, b=0)),
+                     ((('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', 0, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, b=0)),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', 0, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(partial(test, b=0, test=1)),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('args', Ellipsis, Ellipsis, "var_positional"),
+                       ('b', 0, Ellipsis, "keyword_only"),
+                       ('kwargs', Ellipsis, Ellipsis, "var_keyword")),
+                      Ellipsis))
+
+    def test(a, b, c:int) -> 42:
+        pass
+
+    sig = test.__signature__ = inspect.signature(test)
+
+    self.assertEqual(self.signature(partial(partial(test, 1))),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('c', Ellipsis, int, "positional_or_keyword")),
+                      42))
+
+    self.assertEqual(self.signature(partial(partial(test, 1), 2)),
+                     ((('c', Ellipsis, int, "positional_or_keyword"),),
+                      42))
+
+    psig = inspect.signature(partial(partial(test, 1), 2))
+
+    def foo(a):
+        return a
+    _foo = partial(partial(foo, a=10), a=20)
+    self.assertEqual(self.signature(_foo),
+                     ((('a', 20, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+    # check that we don't have any side-effects in signature(),
+    # and the partial object is still functioning
+    self.assertEqual(_foo(), 20)
+
+    def foo(a, b, c):
+        return a, b, c
+    _foo = partial(partial(foo, 1, b=20), b=30)
+    self.assertEqual(self.signature(_foo),
+                     ((('b', 30, Ellipsis, "positional_or_keyword"),
+                       ('c', Ellipsis, Ellipsis, "positional_or_keyword")),
+                      Ellipsis))
+    self.assertEqual(_foo(c=10), (1, 30, 10))
+    _foo = partial(_foo, 2) # now 'b' has two values -
+                            # positional and keyword
+    with self.assertRaisesRegex(ValueError, "has incorrect arguments"):
+        inspect.signature(_foo)
+
+    def foo(a, b, c, *, d):
+        return a, b, c, d
+    _foo = partial(partial(foo, d=20, c=20), b=10, d=30)
+    self.assertEqual(self.signature(_foo),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', 10, Ellipsis, "positional_or_keyword"),
+                       ('c', 20, Ellipsis, "positional_or_keyword"),
+                       ('d', 30, Ellipsis, "keyword_only")),
+                      Ellipsis))
+    ba = inspect.signature(_foo).bind(a=200, b=11)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (200, 11, 20, 30))
+
+    def foo(a=1, b=2, c=3):
+        return a, b, c
+    _foo = partial(foo, a=10, c=13)
+    ba = inspect.signature(_foo).bind(11)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (11, 2, 13))
+    ba = inspect.signature(_foo).bind(11, 12)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (11, 12, 13))
+    ba = inspect.signature(_foo).bind(11, b=12)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (11, 12, 13))
+    ba = inspect.signature(_foo).bind(b=12)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (10, 12, 13))
+    _foo = partial(_foo, b=10)
+    ba = inspect.signature(_foo).bind(12, 14)
+    self.assertEqual(_foo(*ba.args, **ba.kwargs), (12, 14, 13))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_decorated(self):
+    import functools
+
+    def decorator(func):
+        @functools.wraps(func)
+        def wrapper(*args, **kwargs) -> int:
+            return func(*args, **kwargs)
+        return wrapper
+
+    class Foo:
+        @decorator
+        def bar(self, a, b):
+            pass
+
+    self.assertEqual(self.signature(Foo.bar),
+                     ((('self', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', Ellipsis, Ellipsis, "positional_or_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(Foo().bar),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', Ellipsis, Ellipsis, "positional_or_keyword")),
+                      Ellipsis))
+
+    # Test that we handle method wrappers correctly
+    def decorator(func):
+        @functools.wraps(func)
+        def wrapper(*args, **kwargs) -> int:
+            return func(42, *args, **kwargs)
+        sig = inspect.signature(func)
+        new_params = tuple(sig.parameters.values())[1:]
+        wrapper.__signature__ = sig.replace(parameters=new_params)
+        return wrapper
+
+    class Foo:
+        @decorator
+        def __call__(self, a, b):
+            pass
+
+    self.assertEqual(self.signature(Foo.__call__),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('b', Ellipsis, Ellipsis, "positional_or_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(Foo().__call__),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_on_class(self):
+    class C:
+        def __init__(self, a):
+            pass
+
+    self.assertEqual(self.signature(C),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+
+    class CM(type):
+        def __call__(cls, a):
+            pass
+    class C(metaclass=CM):
+        def __init__(self, b):
+            pass
+
+    self.assertEqual(self.signature(C),
+                     ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+
+    class CM(type):
+        def __new__(mcls, name, bases, dct, *, foo=1):
+            return super().__new__(mcls, name, bases, dct)
+    class C(metaclass=CM):
+        def __init__(self, b):
+            pass
+
+    self.assertEqual(self.signature(C),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(CM),
+                     ((('name', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('bases', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('dct', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('foo', 1, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    class CMM(type):
+        def __new__(mcls, name, bases, dct, *, foo=1):
+            return super().__new__(mcls, name, bases, dct)
+        def __call__(cls, nm, bs, dt):
+            return type(nm, bs, dt)
+    class CM(type, metaclass=CMM):
+        def __new__(mcls, name, bases, dct, *, bar=2):
+            return super().__new__(mcls, name, bases, dct)
+    class C(metaclass=CM):
+        def __init__(self, b):
+            pass
+
+    self.assertEqual(self.signature(CMM),
+                     ((('name', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('bases', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('dct', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('foo', 1, Ellipsis, "keyword_only")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(CM),
+                     ((('nm', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('bs', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('dt', Ellipsis, Ellipsis, "positional_or_keyword")),
+                      Ellipsis))
+
+    self.assertEqual(self.signature(C),
+                     ((('b', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                      Ellipsis))
+
+    class CM(type):
+        def __init__(cls, name, bases, dct, *, bar=2):
+            return super().__init__(name, bases, dct)
+    class C(metaclass=CM):
+        def __init__(self, b):
+            pass
+
+    self.assertEqual(self.signature(CM),
+                     ((('name', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('bases', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('dct', Ellipsis, Ellipsis, "positional_or_keyword"),
+                       ('bar', 2, Ellipsis, "keyword_only")),
+                      Ellipsis))
+""")
+
+    def test_signature_on_callable_objects(self):
+        class Foo(object):
+            def __call__(self, a):
+                pass
+
+        self.assertEqual(self.signature(Foo()),
+                         ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                          Ellipsis))
+
+        class Spam(object):
+            pass
+        with self.assertRaisesRegex(TypeError, "is not a callable object"):
+            inspect.signature(Spam())
+
+        class Bar(Spam, Foo):
+            pass
+
+        self.assertEqual(self.signature(Bar()),
+                         ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                          Ellipsis))
+
+        class ToFail(object):
+            __call__ = type
+        with self.assertRaisesRegex(ValueError, "not supported by signature"):
+            inspect.signature(ToFail())
+
+        if sys.version_info[0] < 3:
+            return
+
+        class Wrapped(object):
+            pass
+        Wrapped.__wrapped__ = lambda a: None
+        self.assertEqual(self.signature(Wrapped),
+                         ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
+                          Ellipsis))
+
+    def test_signature_on_lambdas(self):
+        self.assertEqual(self.signature((lambda a=10: a)),
+                         ((('a', 10, Ellipsis, "positional_or_keyword"),),
+                          Ellipsis))
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_equality(self):
+    def foo(a, *, b:int) -> float: pass
+    self.assertNotEqual(inspect.signature(foo), 42)
+
+    def bar(a, *, b:int) -> float: pass
+    self.assertEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def bar(a, *, b:int) -> int: pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def bar(a, *, b:int): pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def bar(a, *, b:int=42) -> float: pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def bar(a, *, c) -> float: pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def bar(a, b:int) -> float: pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+    def spam(b:int, a) -> float: pass
+    self.assertNotEqual(inspect.signature(spam), inspect.signature(bar))
+
+    def foo(*, a, b, c): pass
+    def bar(*, c, b, a): pass
+    self.assertEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def foo(*, a=1, b, c): pass
+    def bar(*, c, b, a=1): pass
+    self.assertEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def foo(pos, *, a=1, b, c): pass
+    def bar(pos, *, c, b, a=1): pass
+    self.assertEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def foo(pos, *, a, b, c): pass
+    def bar(pos, *, c, b, a=1): pass
+    self.assertNotEqual(inspect.signature(foo), inspect.signature(bar))
+
+    def foo(pos, *args, a=42, b, c, **kwargs:int): pass
+    def bar(pos, *args, c, b, a=42, **kwargs:int): pass
+    self.assertEqual(inspect.signature(foo), inspect.signature(bar))
+""")
+
+    def test_signature_unhashable(self):
+        def foo(a): pass
+        sig = inspect.signature(foo)
+        with self.assertRaisesRegex(TypeError, 'unhashable type'):
+            hash(sig)
+
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_str(self):
+    def foo(a:int=1, *, b, c=None, **kwargs) -> 42:
+        pass
+    self.assertEqual(str(inspect.signature(foo)),
+                     '(a:int=1, *, b, c=None, **kwargs) -> 42')
+
+    def foo(a:int=1, *args, b, c=None, **kwargs) -> 42:
+        pass
+    self.assertEqual(str(inspect.signature(foo)),
+                     '(a:int=1, *args, b, c=None, **kwargs) -> 42')
+
+    def foo():
+        pass
+    self.assertEqual(str(inspect.signature(foo)), '()')
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_str_positional_only(self):
+    P = inspect.Parameter
+
+    def test(a_po, *, b, **kwargs):
+        return a_po, kwargs
+
+    sig = inspect.signature(test)
+    new_params = list(sig.parameters.values())
+    new_params[0] = new_params[0].replace(kind=P.POSITIONAL_ONLY)
+    test.__signature__ = sig.replace(parameters=new_params)
+
+    self.assertEqual(str(inspect.signature(test)),
+                     '(<a_po>, *, b, **kwargs)')
+
+    sig = inspect.signature(test)
+    new_params = list(sig.parameters.values())
+    new_params[0] = new_params[0].replace(name=None)
+    test.__signature__ = sig.replace(parameters=new_params)
+    self.assertEqual(str(inspect.signature(test)),
+                     '(<0>, *, b, **kwargs)')
+""")
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_replace_anno(self):
+    def test() -> 42:
+        pass
+
+    sig = inspect.signature(test)
+    sig = sig.replace(return_annotation=None)
+    self.assertIs(sig.return_annotation, None)
+    sig = sig.replace(return_annotation=sig.empty)
+    self.assertIs(sig.return_annotation, sig.empty)
+    sig = sig.replace(return_annotation=42)
+    self.assertEqual(sig.return_annotation, 42)
+    self.assertEqual(sig, inspect.signature(test))
+""")
+
+
+class TestParameterObject(unittest.TestCase):
+
+    def test_signature_parameter_kinds(self):
+        P = inspect.Parameter
+        self.assertTrue(P.POSITIONAL_ONLY < P.POSITIONAL_OR_KEYWORD < \
+                        P.VAR_POSITIONAL < P.KEYWORD_ONLY < P.VAR_KEYWORD)
+
+        self.assertEqual(str(P.POSITIONAL_ONLY), 'POSITIONAL_ONLY')
+        self.assertTrue('POSITIONAL_ONLY' in repr(P.POSITIONAL_ONLY))
+
+    def test_signature_parameter_object(self):
+        p = inspect.Parameter('foo', default=10,
+                              kind=inspect.Parameter.POSITIONAL_ONLY)
+        self.assertEqual(p.name, 'foo')
+        self.assertEqual(p.default, 10)
+        self.assertIs(p.annotation, p.empty)
+        self.assertEqual(p.kind, inspect.Parameter.POSITIONAL_ONLY)
+
+        with self.assertRaisesRegex(ValueError, 'invalid value'):
+            inspect.Parameter('foo', default=10, kind='123')
+
+        with self.assertRaisesRegex(ValueError, 'not a valid parameter name'):
+            inspect.Parameter('1', kind=inspect.Parameter.VAR_KEYWORD)
+
+        with self.assertRaisesRegex(ValueError,
+                                     'non-positional-only parameter'):
+            inspect.Parameter(None, kind=inspect.Parameter.VAR_KEYWORD)
+
+        with self.assertRaisesRegex(ValueError, 'cannot have default values'):
+            inspect.Parameter('a', default=42,
+                              kind=inspect.Parameter.VAR_KEYWORD)
+
+        with self.assertRaisesRegex(ValueError, 'cannot have default values'):
+            inspect.Parameter('a', default=42,
+                              kind=inspect.Parameter.VAR_POSITIONAL)
+
+        p = inspect.Parameter('a', default=42,
+                              kind=inspect.Parameter.POSITIONAL_OR_KEYWORD)
+        with self.assertRaisesRegex(ValueError, 'cannot have default values'):
+            p.replace(kind=inspect.Parameter.VAR_POSITIONAL)
+
+        self.assertTrue(repr(p).startswith('<Parameter'))
+
+    def test_signature_parameter_equality(self):
+        P = inspect.Parameter
+        p = P('foo', default=42, kind=inspect.Parameter.KEYWORD_ONLY)
+
+        self.assertEqual(p, p)
+        self.assertNotEqual(p, 42)
+
+        self.assertEqual(p, P('foo', default=42,
+                              kind=inspect.Parameter.KEYWORD_ONLY))
+
+    def test_signature_parameter_unhashable(self):
+        p = inspect.Parameter('foo', default=42,
+                              kind=inspect.Parameter.KEYWORD_ONLY)
+
+        with self.assertRaisesRegex(TypeError, 'unhashable type'):
+            hash(p)
+
+    def test_signature_parameter_replace(self):
+        p = inspect.Parameter('foo', default=42,
+                              kind=inspect.Parameter.KEYWORD_ONLY)
+
+        self.assertIsNot(p, p.replace())
+        self.assertEqual(p, p.replace())
+
+        p2 = p.replace(annotation=1)
+        self.assertEqual(p2.annotation, 1)
+        p2 = p2.replace(annotation=p2.empty)
+        self.assertEqual(p, p2)
+
+        p2 = p2.replace(name='bar')
+        self.assertEqual(p2.name, 'bar')
+        self.assertNotEqual(p2, p)
+
+        with self.assertRaisesRegex(ValueError, 'not a valid parameter name'):
+            p2 = p2.replace(name=p2.empty)
+
+        p2 = p2.replace(name='foo', default=None)
+        self.assertIs(p2.default, None)
+        self.assertNotEqual(p2, p)
+
+        p2 = p2.replace(name='foo', default=p2.empty)
+        self.assertIs(p2.default, p2.empty)
+
+
+        p2 = p2.replace(default=42, kind=p2.POSITIONAL_OR_KEYWORD)
+        self.assertEqual(p2.kind, p2.POSITIONAL_OR_KEYWORD)
+        self.assertNotEqual(p2, p)
+
+        with self.assertRaisesRegex(ValueError, 'invalid value for'):
+            p2 = p2.replace(kind=p2.empty)
+
+        p2 = p2.replace(kind=p2.KEYWORD_ONLY)
+        self.assertEqual(p2, p)
+
+    def test_signature_parameter_positional_only(self):
+        p = inspect.Parameter(None, kind=inspect.Parameter.POSITIONAL_ONLY)
+        self.assertEqual(str(p), '<>')
+
+        p = p.replace(name='1')
+        self.assertEqual(str(p), '<1>')
+
+    def test_signature_parameter_immutability(self):
+        p = inspect.Parameter(None, kind=inspect.Parameter.POSITIONAL_ONLY)
+
+        with self.assertRaises(AttributeError):
+            p.foo = 'bar'
+
+        with self.assertRaises(AttributeError):
+            p.kind = 123
+
+
+class TestSignatureBind(unittest.TestCase):
+    @staticmethod
+    def call(func, *args, **kwargs):
+        sig = inspect.signature(func)
+        ba = sig.bind(*args, **kwargs)
+        return func(*ba.args, **ba.kwargs)
+
+    def test_signature_bind_empty(self):
+        def test():
+            return 42
+
+        self.assertEqual(self.call(test), 42)
+        with self.assertRaisesRegex(TypeError, 'too many positional arguments'):
+            self.call(test, 1)
+        with self.assertRaisesRegex(TypeError, 'too many positional arguments'):
+            self.call(test, 1, spam=10)
+        with self.assertRaisesRegex(TypeError, 'too many keyword arguments'):
+            self.call(test, spam=1)
+
+    def test_signature_bind_var(self):
+        def test(*args, **kwargs):
+            return args, kwargs
+
+        self.assertEqual(self.call(test), ((), {}))
+        self.assertEqual(self.call(test, 1), ((1,), {}))
+        self.assertEqual(self.call(test, 1, 2), ((1, 2), {}))
+        self.assertEqual(self.call(test, foo='bar'), ((), {'foo': 'bar'}))
+        self.assertEqual(self.call(test, 1, foo='bar'), ((1,), {'foo': 'bar'}))
+        self.assertEqual(self.call(test, args=10), ((), {'args': 10}))
+        self.assertEqual(self.call(test, 1, 2, foo='bar'),
+                         ((1, 2), {'foo': 'bar'}))
+
+    def test_signature_bind_just_args(self):
+        def test(a, b, c):
+            return a, b, c
+
+        self.assertEqual(self.call(test, 1, 2, 3), (1, 2, 3))
+
+        with self.assertRaisesRegex(TypeError, 'too many positional arguments'):
+            self.call(test, 1, 2, 3, 4)
+
+        with self.assertRaisesRegex(TypeError, "'b' parameter lacking default"):
+            self.call(test, 1)
+
+        with self.assertRaisesRegex(TypeError, "'a' parameter lacking default"):
+            self.call(test)
+
+        def test(a, b, c=10):
+            return a, b, c
+        self.assertEqual(self.call(test, 1, 2, 3), (1, 2, 3))
+        self.assertEqual(self.call(test, 1, 2), (1, 2, 10))
+
+        def test(a=1, b=2, c=3):
+            return a, b, c
+        self.assertEqual(self.call(test, a=10, c=13), (10, 2, 13))
+        self.assertEqual(self.call(test, a=10), (10, 2, 3))
+        self.assertEqual(self.call(test, b=10), (1, 10, 3))
+
+    def test_signature_bind_varargs_order(self):
+        def test(*args):
+            return args
+
+        self.assertEqual(self.call(test), ())
+        self.assertEqual(self.call(test, 1, 2, 3), (1, 2, 3))
+
+    def test_signature_bind_args_and_varargs(self):
+        def test(a, b, c=3, *args):
+            return a, b, c, args
+
+        self.assertEqual(self.call(test, 1, 2, 3, 4, 5), (1, 2, 3, (4, 5)))
+        self.assertEqual(self.call(test, 1, 2), (1, 2, 3, ()))
+        self.assertEqual(self.call(test, b=1, a=2), (2, 1, 3, ()))
+        self.assertEqual(self.call(test, 1, b=2), (1, 2, 3, ()))
+
+        with self.assertRaisesRegex(TypeError,
+                                     "multiple values for argument 'c'"):
+            self.call(test, 1, 2, 3, c=4)
+
+    def test_signature_bind_just_kwargs(self):
+        def test(**kwargs):
+            return kwargs
+
+        self.assertEqual(self.call(test), {})
+        self.assertEqual(self.call(test, foo='bar', spam='ham'),
+                         {'foo': 'bar', 'spam': 'ham'})
+
+    def test_signature_bind_args_and_kwargs(self):
+        def test(a, b, c=3, **kwargs):
+            return a, b, c, kwargs
+
+        self.assertEqual(self.call(test, 1, 2), (1, 2, 3, {}))
+        self.assertEqual(self.call(test, 1, 2, foo='bar', spam='ham'),
+                         (1, 2, 3, {'foo': 'bar', 'spam': 'ham'}))
+        self.assertEqual(self.call(test, b=2, a=1, foo='bar', spam='ham'),
+                         (1, 2, 3, {'foo': 'bar', 'spam': 'ham'}))
+        self.assertEqual(self.call(test, a=1, b=2, foo='bar', spam='ham'),
+                         (1, 2, 3, {'foo': 'bar', 'spam': 'ham'}))
+        self.assertEqual(self.call(test, 1, b=2, foo='bar', spam='ham'),
+                         (1, 2, 3, {'foo': 'bar', 'spam': 'ham'}))
+        self.assertEqual(self.call(test, 1, b=2, c=4, foo='bar', spam='ham'),
+                         (1, 2, 4, {'foo': 'bar', 'spam': 'ham'}))
+        self.assertEqual(self.call(test, 1, 2, 4, foo='bar'),
+                         (1, 2, 4, {'foo': 'bar'}))
+        self.assertEqual(self.call(test, c=5, a=4, b=3),
+                         (4, 3, 5, {}))
+
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_bind_kwonly(self):
+    def test(*, foo):
+        return foo
+    with self.assertRaisesRegex(TypeError,
+                                 'too many positional arguments'):
+        self.call(test, 1)
+    self.assertEqual(self.call(test, foo=1), 1)
+
+    def test(a, *, foo=1, bar):
+        return foo
+    with self.assertRaisesRegex(TypeError,
+                                 "'bar' parameter lacking default value"):
+        self.call(test, 1)
+
+    def test(foo, *, bar):
+        return foo, bar
+    self.assertEqual(self.call(test, 1, bar=2), (1, 2))
+    self.assertEqual(self.call(test, bar=2, foo=1), (1, 2))
+
+    with self.assertRaisesRegex(TypeError,
+                                 'too many keyword arguments'):
+        self.call(test, bar=2, foo=1, spam=10)
+
+    with self.assertRaisesRegex(TypeError,
+                                 'too many positional arguments'):
+        self.call(test, 1, 2)
+
+    with self.assertRaisesRegex(TypeError,
+                                 'too many positional arguments'):
+        self.call(test, 1, 2, bar=2)
+
+    with self.assertRaisesRegex(TypeError,
+                                 'too many keyword arguments'):
+        self.call(test, 1, bar=2, spam='ham')
+
+    with self.assertRaisesRegex(TypeError,
+                                 "'bar' parameter lacking default value"):
+        self.call(test, 1)
+
+    def test(foo, *, bar, **bin):
+        return foo, bar, bin
+    self.assertEqual(self.call(test, 1, bar=2), (1, 2, {}))
+    self.assertEqual(self.call(test, foo=1, bar=2), (1, 2, {}))
+    self.assertEqual(self.call(test, 1, bar=2, spam='ham'),
+                     (1, 2, {'spam': 'ham'}))
+    self.assertEqual(self.call(test, spam='ham', foo=1, bar=2),
+                     (1, 2, {'spam': 'ham'}))
+    with self.assertRaisesRegex(TypeError,
+                                 "'foo' parameter lacking default value"):
+        self.call(test, spam='ham', bar=2)
+    self.assertEqual(self.call(test, 1, bar=2, bin=1, spam=10),
+                     (1, 2, {'bin': 1, 'spam': 10}))
+""")
+#
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_bind_arguments(self):
+    def test(a, *args, b, z=100, **kwargs):
+        pass
+    sig = inspect.signature(test)
+    ba = sig.bind(10, 20, b=30, c=40, args=50, kwargs=60)
+    # we won't have 'z' argument in the bound arguments object, as we didn't
+    # pass it to the 'bind'
+    self.assertEqual(tuple(ba.arguments.items()),
+                     (('a', 10), ('args', (20,)), ('b', 30),
+                      ('kwargs', {'c': 40, 'args': 50, 'kwargs': 60})))
+    self.assertEqual(ba.kwargs,
+                     {'b': 30, 'c': 40, 'args': 50, 'kwargs': 60})
+    self.assertEqual(ba.args, (10, 20))
+""")
+#
+    if sys.version_info[0] > 2:
+        exec("""
+def test_signature_bind_positional_only(self):
+    P = inspect.Parameter
+
+    def test(a_po, b_po, c_po=3, foo=42, *, bar=50, **kwargs):
+        return a_po, b_po, c_po, foo, bar, kwargs
+
+    sig = inspect.signature(test)
+    new_params = collections.OrderedDict(tuple(sig.parameters.items()))
+    for name in ('a_po', 'b_po', 'c_po'):
+        new_params[name] = new_params[name].replace(kind=P.POSITIONAL_ONLY)
+    new_sig = sig.replace(parameters=new_params.values())
+    test.__signature__ = new_sig
+
+    self.assertEqual(self.call(test, 1, 2, 4, 5, bar=6),
+                     (1, 2, 4, 5, 6, {}))
+
+    with self.assertRaisesRegex(TypeError, "parameter is positional only"):
+        self.call(test, 1, 2, c_po=4)
+
+    with self.assertRaisesRegex(TypeError, "parameter is positional only"):
+        self.call(test, a_po=1, b_po=2)
+""")
+
+    def test_bind_self(self):
+        class F:
+            def f(a, self):
+                return a, self
+        an_f = F()
+        partial_f = functools.partial(F.f, an_f)
+        ba = inspect.signature(partial_f).bind(self=10)
+        self.assertEqual((an_f, 10), partial_f(*ba.args, **ba.kwargs))
+
+
+class TestBoundArguments(unittest.TestCase):
+
+    def test_signature_bound_arguments_unhashable(self):
+        def foo(a): pass
+        ba = inspect.signature(foo).bind(1)
+
+        with self.assertRaisesRegex(TypeError, 'unhashable type'):
+            hash(ba)
+
+    def test_signature_bound_arguments_equality(self):
+        def foo(a): pass
+        ba = inspect.signature(foo).bind(1)
+        self.assertEqual(ba, ba)
+
+        ba2 = inspect.signature(foo).bind(1)
+        self.assertEqual(ba, ba2)
+
+        ba3 = inspect.signature(foo).bind(2)
+        self.assertNotEqual(ba, ba3)
+        ba3.arguments['a'] = 1
+        self.assertEqual(ba, ba3)
+
+        def bar(b): pass
+        ba4 = inspect.signature(bar).bind(1)
+        self.assertNotEqual(ba, ba4)
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Erik Rose
+
+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, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/MANIFEST.in
@@ -0,0 +1,8 @@
+include README.rst
+include LICENSE
+include docs/*.rst
+include docs/Makefile
+include docs/make.bat
+include docs/conf.py
+include fabfile.py
+include tox.ini
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/PKG-INFO
@@ -0,0 +1,321 @@
+Metadata-Version: 1.1
+Name: more-itertools
+Version: 4.2.0
+Summary: More routines for operating on iterables, beyond itertools
+Home-page: https://github.com/erikrose/more-itertools
+Author: Erik Rose
+Author-email: erikrose@grinchcentral.com
+License: MIT
+Description: ==============
+        More Itertools
+        ==============
+        
+        .. image:: https://coveralls.io/repos/github/erikrose/more-itertools/badge.svg?branch=master
+          :target: https://coveralls.io/github/erikrose/more-itertools?branch=master
+        
+        Python's ``itertools`` library is a gem - you can compose elegant solutions
+        for a variety of problems with the functions it provides. In ``more-itertools``
+        we collect additional building blocks, recipes, and routines for working with
+        Python iterables.
+        
+        Getting started
+        ===============
+        
+        To get started, install the library with `pip <https://pip.pypa.io/en/stable/>`_:
+        
+        .. code-block:: shell
+        
+            pip install more-itertools
+        
+        The recipes from the `itertools docs <https://docs.python.org/3/library/itertools.html#itertools-recipes>`_
+        are included in the top-level package:
+        
+        .. code-block:: python
+        
+            >>> from more_itertools import flatten
+            >>> iterable = [(0, 1), (2, 3)]
+            >>> list(flatten(iterable))
+            [0, 1, 2, 3]
+        
+        Several new recipes are available as well:
+        
+        .. code-block:: python
+        
+            >>> from more_itertools import chunked
+            >>> iterable = [0, 1, 2, 3, 4, 5, 6, 7, 8]
+            >>> list(chunked(iterable, 3))
+            [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
+        
+            >>> from more_itertools import spy
+            >>> iterable = (x * x for x in range(1, 6))
+            >>> head, iterable = spy(iterable, n=3)
+            >>> list(head)
+            [1, 4, 9]
+            >>> list(iterable)
+            [1, 4, 9, 16, 25]
+        
+        
+        
+        For the full listing of functions, see the `API documentation <https://more-itertools.readthedocs.io/en/latest/api.html>`_.
+        
+        Development
+        ===========
+        
+        ``more-itertools`` is maintained by `@erikrose <https://github.com/erikrose>`_
+        and `@bbayles <https://github.com/bbayles>`_, with help from `many others <https://github.com/erikrose/more-itertools/graphs/contributors>`_.
+        If you have a problem or suggestion, please file a bug or pull request in this
+        repository. Thanks for contributing!
+        
+        
+        Version History
+        ===============
+        
+        
+        
+        4.2.0
+        -----
+        
+        * New itertools:
+            * map_reduce (thanks to pylang)
+            * prepend (from the `Python 3.7 docs <https://docs.python.org/3.7/library/itertools.html#itertools-recipes>`_)
+        
+        * Improvements to existing itertools:
+            * bucket now complies with PEP 479 (thanks to irmen)
+        
+        * Other changes:
+           * Python 3.7 is now supported (thanks to irmen)
+           * Python 3.3 is no longer supported
+           * The test suite no longer requires third-party modules to run
+           * The API docs now include links to source code
+        
+        4.1.0
+        -----
+        
+        * New itertools:
+            * split_at (thanks to michael-celani)
+            * circular_shifts (thanks to hiqua)
+            * make_decorator - see the blog post `Yo, I heard you like decorators <https://sites.google.com/site/bbayles/index/decorator_factory>`_
+              for a tour (thanks to pylang)
+            * always_reversible (thanks to michael-celani)
+            * nth_combination (from the `Python 3.7 docs <https://docs.python.org/3.7/library/itertools.html#itertools-recipes>`_)
+        
+        * Improvements to existing itertools:
+            * seekable now has an ``elements`` method to return cached items.
+            * The performance tradeoffs between roundrobin and
+              interleave_longest are now documented (thanks michael-celani,
+              pylang, and MSeifert04)
+        
+        4.0.1
+        -----
+        
+        * No code changes - this release fixes how the docs display on PyPI.
+        
+        4.0.0
+        -----
+        
+        * New itertools:
+            * consecutive_groups (Based on the example in the `Python 2.4 docs <https://docs.python.org/release/2.4.4/lib/itertools-example.html>`_)
+            * seekable (If you're looking for how to "reset" an iterator,
+              you're in luck!)
+            * exactly_n (thanks to michael-celani)
+            * run_length.encode and run_length.decode
+            * difference
+        
+        * Improvements to existing itertools:
+            * The number of items between filler elements in intersperse can
+              now be specified (thanks to pylang)
+            * distinct_permutations and peekable got some minor
+              adjustments (thanks to MSeifert04)
+            * always_iterable now returns an iterator object. It also now
+              allows different types to be considered iterable (thanks to jaraco)
+            * bucket can now limit the keys it stores in memory
+            * one now allows for custom exceptions (thanks to kalekundert)
+        
+        * Other changes:
+            * A few typos were fixed (thanks to EdwardBetts)
+            * All tests can now be run with ``python setup.py test``
+        
+        The major version update is due to the change in the return value of always_iterable.
+        It now always returns iterator objects:
+        
+        .. code-block:: python
+        
+            >>> from more_itertools import always_iterable
+            # Non-iterable objects are wrapped with iter(tuple(obj))
+            >>> always_iterable(12345)
+            <tuple_iterator object at 0x7fb24c9488d0>
+            >>> list(always_iterable(12345))
+            [12345]
+            # Iterable objects are wrapped with iter()
+            >>> always_iterable([1, 2, 3, 4, 5])
+            <list_iterator object at 0x7fb24c948c50>
+        
+        3.2.0
+        -----
+        
+        * New itertools:
+            * lstrip, rstrip, and strip
+              (thanks to MSeifert04 and pylang)
+            * islice_extended
+        * Improvements to existing itertools:
+            * Some bugs with slicing peekable-wrapped iterables were fixed
+        
+        3.1.0
+        -----
+        
+        * New itertools:
+            * numeric_range (Thanks to BebeSparkelSparkel and MSeifert04)
+            * count_cycle (Thanks to BebeSparkelSparkel)
+            * locate (Thanks to pylang and MSeifert04)
+        * Improvements to existing itertools:
+            * A few itertools are now slightly faster due to some function
+              optimizations. (Thanks to MSeifert04)
+        * The docs have been substantially revised with installation notes,
+          categories for library functions, links, and more. (Thanks to pylang)
+        
+        
+        3.0.0
+        -----
+        
+        * Removed itertools:
+            * ``context`` has been removed due to a design flaw - see below for
+              replacement options. (thanks to NeilGirdhar)
+        * Improvements to existing itertools:
+            * ``side_effect`` now supports ``before`` and ``after`` keyword
+              arguments. (Thanks to yardsale8)
+        * PyPy and PyPy3 are now supported.
+        
+        The major version change is due to the removal of the ``context`` function.
+        Replace it with standard ``with`` statement context management:
+        
+        .. code-block:: python
+        
+            # Don't use context() anymore
+            file_obj = StringIO()
+            consume(print(x, file=f) for f in context(file_obj) for x in u'123')
+        
+            # Use a with statement instead
+            file_obj = StringIO()
+            with file_obj as f:
+                consume(print(x, file=f) for x in u'123')
+        
+        2.6.0
+        -----
+        
+        * New itertools:
+            * ``adjacent`` and ``groupby_transform`` (Thanks to diazona)
+            * ``always_iterable`` (Thanks to jaraco)
+            * (Removed in 3.0.0) ``context`` (Thanks to yardsale8)
+            * ``divide`` (Thanks to mozbhearsum)
+        * Improvements to existing itertools:
+            * ``ilen`` is now slightly faster. (Thanks to wbolster)
+            * ``peekable`` can now prepend items to an iterable. (Thanks to diazona)
+        
+        2.5.0
+        -----
+        
+        * New itertools:
+            * ``distribute`` (Thanks to mozbhearsum and coady)
+            * ``sort_together`` (Thanks to clintval)
+            * ``stagger`` and ``zip_offset`` (Thanks to joshbode)
+            * ``padded``
+        * Improvements to existing itertools:
+            * ``peekable`` now handles negative indexes and slices with negative
+              components properly.
+            * ``intersperse`` is now slightly faster. (Thanks to pylang)
+            * ``windowed`` now accepts a ``step`` keyword argument.
+              (Thanks to pylang)
+        * Python 3.6 is now supported.
+        
+        2.4.1
+        -----
+        
+        * Move docs 100% to readthedocs.io.
+        
+        2.4
+        -----
+        
+        * New itertools:
+            * ``accumulate``, ``all_equal``, ``first_true``, ``partition``, and
+              ``tail`` from the itertools documentation.
+            * ``bucket`` (Thanks to Rosuav and cvrebert)
+            * ``collapse`` (Thanks to abarnet)
+            * ``interleave`` and ``interleave_longest`` (Thanks to abarnet)
+            * ``side_effect`` (Thanks to nvie)
+            * ``sliced`` (Thanks to j4mie and coady)
+            * ``split_before`` and ``split_after`` (Thanks to astronouth7303)
+            * ``spy`` (Thanks to themiurgo and mathieulongtin)
+        * Improvements to existing itertools:
+            * ``chunked`` is now simpler and more friendly to garbage collection.
+              (Contributed by coady, with thanks to piskvorky)
+            * ``collate`` now delegates to ``heapq.merge`` when possible.
+              (Thanks to kmike and julianpistorius)
+            * ``peekable``-wrapped iterables are now indexable and sliceable.
+              Iterating through ``peekable``-wrapped iterables is also faster.
+            * ``one`` and ``unique_to_each`` have been simplified.
+              (Thanks to coady)
+        
+        
+        2.3
+        -----
+        
+        * Added ``one`` from ``jaraco.util.itertools``. (Thanks, jaraco!)
+        * Added ``distinct_permutations`` and ``unique_to_each``. (Contributed by
+          bbayles)
+        * Added ``windowed``. (Contributed by bbayles, with thanks to buchanae,
+          jaraco, and abarnert)
+        * Simplified the implementation of ``chunked``. (Thanks, nvie!)
+        * Python 3.5 is now supported. Python 2.6 is no longer supported.
+        * Python 3 is now supported directly; there is no 2to3 step.
+        
+        2.2
+        -----
+        
+        * Added ``iterate`` and ``with_iter``. (Thanks, abarnert!)
+        
+        2.1
+        -----
+        
+        * Added (tested!) implementations of the recipes from the itertools
+          documentation. (Thanks, Chris Lonnen!)
+        * Added ``ilen``. (Thanks for the inspiration, Matt Basta!)
+        
+        2.0
+        -----
+        
+        * ``chunked`` now returns lists rather than tuples. After all, they're
+          homogeneous. This slightly backward-incompatible change is the reason for
+          the major version bump.
+        * Added ``@consumer``.
+        * Improved test machinery.
+        
+        1.1
+        -----
+        
+        * Added ``first`` function.
+        * Added Python 3 support.
+        * Added a default arg to ``peekable.peek()``.
+        * Noted how to easily test whether a peekable iterator is exhausted.
+        * Rewrote documentation.
+        
+        1.0
+        -----
+        
+        * Initial release, with ``collate``, ``peekable``, and ``chunked``. Could
+          really use better docs.
+Keywords: itertools,iterator,iteration,filter,peek,peekable,collate,chunk,chunked
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Natural Language :: English
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Topic :: Software Development :: Libraries
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/README.rst
@@ -0,0 +1,59 @@
+==============
+More Itertools
+==============
+
+.. image:: https://coveralls.io/repos/github/erikrose/more-itertools/badge.svg?branch=master
+  :target: https://coveralls.io/github/erikrose/more-itertools?branch=master
+
+Python's ``itertools`` library is a gem - you can compose elegant solutions
+for a variety of problems with the functions it provides. In ``more-itertools``
+we collect additional building blocks, recipes, and routines for working with
+Python iterables.
+
+Getting started
+===============
+
+To get started, install the library with `pip <https://pip.pypa.io/en/stable/>`_:
+
+.. code-block:: shell
+
+    pip install more-itertools
+
+The recipes from the `itertools docs <https://docs.python.org/3/library/itertools.html#itertools-recipes>`_
+are included in the top-level package:
+
+.. code-block:: python
+
+    >>> from more_itertools import flatten
+    >>> iterable = [(0, 1), (2, 3)]
+    >>> list(flatten(iterable))
+    [0, 1, 2, 3]
+
+Several new recipes are available as well:
+
+.. code-block:: python
+
+    >>> from more_itertools import chunked
+    >>> iterable = [0, 1, 2, 3, 4, 5, 6, 7, 8]
+    >>> list(chunked(iterable, 3))
+    [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
+
+    >>> from more_itertools import spy
+    >>> iterable = (x * x for x in range(1, 6))
+    >>> head, iterable = spy(iterable, n=3)
+    >>> list(head)
+    [1, 4, 9]
+    >>> list(iterable)
+    [1, 4, 9, 16, 25]
+
+
+
+For the full listing of functions, see the `API documentation <https://more-itertools.readthedocs.io/en/latest/api.html>`_.
+
+Development
+===========
+
+``more-itertools`` is maintained by `@erikrose <https://github.com/erikrose>`_
+and `@bbayles <https://github.com/bbayles>`_, with help from `many others <https://github.com/erikrose/more-itertools/graphs/contributors>`_.
+If you have a problem or suggestion, please file a bug or pull request in this
+repository. Thanks for contributing!
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/docs/Makefile
@@ -0,0 +1,153 @@
+# 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) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+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 "  singlehtml to make a single large HTML file"
+	@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 "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@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."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+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/more-itertools.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/more-itertools.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/more-itertools"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/more-itertools"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+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."
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/docs/api.rst
@@ -0,0 +1,234 @@
+=============
+API Reference
+=============
+
+.. automodule:: more_itertools
+
+Grouping
+========
+
+These tools yield groups of items from a source iterable.
+
+----
+
+**New itertools**
+
+.. autofunction:: chunked
+.. autofunction:: sliced
+.. autofunction:: distribute
+.. autofunction:: divide
+.. autofunction:: split_at
+.. autofunction:: split_before
+.. autofunction:: split_after
+.. autofunction:: bucket
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: grouper
+.. autofunction:: partition
+
+
+Lookahead and lookback
+======================
+
+These tools peek at an iterable's values without advancing it.
+
+----
+
+**New itertools**
+
+
+.. autofunction:: spy
+.. autoclass:: peekable
+.. autoclass:: seekable
+
+
+Windowing
+=========
+
+These tools yield windows of items from an iterable.
+
+----
+
+**New itertools**
+
+.. autofunction:: windowed
+.. autofunction:: stagger
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: pairwise
+
+
+Augmenting
+==========
+
+These tools yield items from an iterable, plus additional data.
+
+----
+
+**New itertools**
+
+.. autofunction:: count_cycle
+.. autofunction:: intersperse
+.. autofunction:: padded
+.. autofunction:: adjacent
+.. autofunction:: groupby_transform
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: padnone
+.. autofunction:: ncycles
+
+
+Combining
+=========
+
+These tools combine multiple iterables.
+
+----
+
+**New itertools**
+
+.. autofunction:: collapse
+.. autofunction:: sort_together
+.. autofunction:: interleave
+.. autofunction:: interleave_longest
+.. autofunction:: collate(*iterables, key=lambda a: a, reverse=False)
+.. autofunction:: zip_offset(*iterables, offsets, longest=False, fillvalue=None)
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: dotproduct
+.. autofunction:: flatten
+.. autofunction:: roundrobin
+.. autofunction:: prepend
+
+
+Summarizing
+===========
+
+These tools return summarized or aggregated data from an iterable.
+
+----
+
+**New itertools**
+
+.. autofunction:: ilen
+.. autofunction:: first(iterable[, default])
+.. autofunction:: one
+.. autofunction:: unique_to_each
+.. autofunction:: locate(iterable, pred=bool)
+.. autofunction:: consecutive_groups(iterable, ordering=lambda x: x)
+.. autofunction:: exactly_n(iterable, n, predicate=bool)
+.. autoclass:: run_length
+.. autofunction:: map_reduce
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: all_equal
+.. autofunction:: first_true
+.. autofunction:: nth
+.. autofunction:: quantify(iterable, pred=bool)
+
+
+Selecting
+=========
+
+These tools yield certain items from an iterable.
+
+----
+
+**New itertools**
+
+.. autofunction:: islice_extended(start, stop, step)
+.. autofunction:: strip
+.. autofunction:: lstrip
+.. autofunction:: rstrip
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: take
+.. autofunction:: tail
+.. autofunction:: unique_everseen
+.. autofunction:: unique_justseen
+
+
+Combinatorics
+=============
+
+These tools yield combinatorial arrangements of items from iterables.
+
+----
+
+**New itertools**
+
+.. autofunction:: distinct_permutations
+.. autofunction:: circular_shifts
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: powerset
+.. autofunction:: random_product
+.. autofunction:: random_permutation
+.. autofunction:: random_combination
+.. autofunction:: random_combination_with_replacement
+.. autofunction:: nth_combination
+
+
+Wrapping
+========
+
+These tools provide wrappers to smooth working with objects that produce or
+consume iterables.
+
+----
+
+**New itertools**
+
+.. autofunction:: always_iterable
+.. autofunction:: consumer
+.. autofunction:: with_iter
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: iter_except
+
+
+Others
+======
+
+**New itertools**
+
+.. autofunction:: numeric_range(start, stop, step)
+.. autofunction:: always_reversible
+.. autofunction:: side_effect
+.. autofunction:: iterate
+.. autofunction:: difference(iterable, func=operator.sub)
+.. autofunction:: make_decorator
+.. autoclass:: SequenceView
+
+----
+
+**Itertools recipes**
+
+.. autofunction:: consume
+.. autofunction:: accumulate(iterable, func=operator.add)
+.. autofunction:: tabulate
+.. autofunction:: repeatfunc
new file mode 100644
--- /dev/null
+++ b/third_party/python/more-itertools/docs/conf.py
@@ -0,0 +1,244 @@
+# -*- coding: utf-8 -*-
+#
+# more-itertools documentation build configuration file, created by
+# sphinx-quickstart on Mon Jun 25 20:42:39 2012.
+#
+# 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.
+
+import sys, os
+
+import sphinx_rtd_theme
+
+# 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.insert(0, os.path.abspath('..'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# 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.viewcode']
+
+# 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-sig'
+