New Upstream Snapshot - ros-osrf-pycommon

Ready changes

Summary

Merged new upstream version: 2.1.1+git20221117.1.709f831 (was: 2.1.1).

Diff

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 037c9cd..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,56 +0,0 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-bin/
-build/
-develop-eggs/
-dist/
-eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.cache
-nosetests.xml
-coverage.xml
-
-# Translations
-*.mo
-
-# Mr Developer
-.mr.developer.cfg
-.project
-.pydevproject
-
-# Rope
-.ropeproject
-
-# Django stuff:
-*.log
-*.pot
-
-# Sphinx documentation
-docs/_build/
-
-deb_dist
-.pytest_cache
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index c988426..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: python
-python:
-  - "3.5"
-  - "3.6"
-  - "3.7"
-  - "3.8"
-install:
-  - pip install coverage nose flake8 mock importlib-metadata
-  - pip install git+https://github.com/PyCQA/flake8-import-order.git
-script:
-  - PYTHONASYNCIODEBUG=1 python setup.py nosetests -s --with-coverage --cover-inclusive
-notifications:
-  email: false
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..e22e76e
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,17 @@
+Metadata-Version: 2.1
+Name: osrf_pycommon
+Version: 2.1.1
+Summary: Commonly needed Python modules, used by Python software developed at OSRF
+Home-page: http://osrf-pycommon.readthedocs.org/
+Author: William Woodall
+Author-email: william@osrfoundation.org
+Maintainer: William Woodall
+Maintainer-email: william@openrobotics.org
+License: Apache 2.0
+Keywords: osrf,utilities
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Programming Language :: Python
+Requires-Python: >=3.5
+Provides-Extra: test
+License-File: LICENSE
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index 2f7efbe..0000000
--- a/_config.yml
+++ /dev/null
@@ -1 +0,0 @@
-theme: jekyll-theme-minimal
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 2d7508c..3fdadbb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ros-osrf-pycommon (2.1.1+git20221117.1.709f831-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 08 Feb 2023 19:56:56 -0000
+
 ros-osrf-pycommon (2.1.1-2) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644
index e35d885..0000000
--- a/docs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-_build
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index f99fec1..0000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,177 +0,0 @@
-# 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/osrf_pycommon.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/osrf_pycommon.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/osrf_pycommon"
-	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/osrf_pycommon"
-	@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."
diff --git a/docs/cli_utils.rst b/docs/cli_utils.rst
deleted file mode 100644
index abf4225..0000000
--- a/docs/cli_utils.rst
+++ /dev/null
@@ -1,189 +0,0 @@
-The ``cli_utils`` Module
-========================
-
-This module provides functions and patterns for creating Command Line Interface (CLI) tools.
-
-Common CLI Functions
---------------------
-
-.. automodule:: osrf_pycommon.cli_utils.common
-    :members:
-
-The Verb Pattern
-----------------
-
-The verb pattern is a pattern where a single command aggregates multiple related commands by taking a required positional argument which is the "verb" for the action you want to perform.
-For example, ``catkin build`` is an example of a ``command`` and ``verb`` pair, where ``catkin`` is the command and ``build`` is the verb.
-In this example, the ``catkin`` command groups "actions" which are related to catkin together using verbs like ``build`` which will build a workspace of catkin packages.
-
-Command Boilerplate
-^^^^^^^^^^^^^^^^^^^
-
-This is an example boilerplate of a command which will use verbs:
-
-.. code-block:: python
-
-    from __future__ import print_function
-
-    import argparse
-    import sys
-
-    from osrf_pycommon.cli_utils.verb_pattern import create_subparsers
-    from osrf_pycommon.cli_utils.verb_pattern import list_verbs
-    from osrf_pycommon.cli_utils.verb_pattern import split_arguments_by_verb
-
-    COMMAND_NAME = '<INSERT COMMAND NAME HERE>'
-
-    VERBS_ENTRY_POINT = '{0}.verbs'.format(COMMAND_NAME)
-
-
-    def main(sysargs=None):
-        # Assign sysargs if not set
-        sysargs = sys.argv[1:] if sysargs is None else sysargs
-
-        # Create a top level parser
-        parser = argparse.ArgumentParser(
-            description="{0} command".format(COMMAND_NAME)
-        )
-
-        # Generate a list of verbs available
-        verbs = list_verbs(VERBS_ENTRY_POINT)
-
-        # Create the subparsers for each verb and collect the arg preprocessors
-        argument_preprocessors, verb_subparsers = create_subparsers(
-            parser,
-            COMMAND_NAME,
-            verbs,
-            VERBS_ENTRY_POINT,
-            sysargs,
-        )
-
-        # Determine the verb, splitting arguments into pre and post verb
-        verb, pre_verb_args, post_verb_args = split_arguments_by_verb(sysargs)
-
-        # Short circuit -h and --help
-        if '-h' in pre_verb_args or '--help' in pre_verb_args:
-            parser.print_help()
-            sys.exit(0)
-
-        # Error on no verb provided
-        if verb is None:
-            print(parser.format_usage())
-            sys.exit("Error: No verb provided.")
-        # Error on unknown verb provided
-        if verb not in verbs:
-            print(parser.format_usage())
-            sys.exit("Error: Unknown verb '{0}' provided.".format(verb))
-
-        # Short circuit -h and --help for verbs
-        if '-h' in post_verb_args or '--help' in post_verb_args:
-            verb_subparsers[verb].print_help()
-            sys.exit(0)
-
-        # First allow the verb's argument preprocessor to strip any args
-        # and return any "extra" information it wants as a dict
-        processed_post_verb_args, extras = \
-            argument_preprocessors[verb](post_verb_args)
-        # Then allow argparse to process the left over post-verb arguments along
-        # with the pre-verb arguments and the verb itself
-        args = parser.parse_args(pre_verb_args + [verb] + processed_post_verb_args)
-        # Extend the argparse result with the extras from the preprocessor
-        for key, value in extras.items():
-            setattr(args, key, value)
-
-        # Finally call the subparser's main function with the processed args
-        # and the extras which the preprocessor may have returned
-        sys.exit(args.main(args) or 0)
-
-This function is mostly boilerplate in that it will likely not change much between commands of different types, but it would also be less transparent to have this function created for you.
-If you are using this boilerplate to implement your command, then you should be careful to update ``COMMAND_NAME`` to reflect your command's name.
-
-This line defines the ``entry_point`` group for your command's verbs:
-
-.. code-block:: python
-
-    VERBS_ENTRY_POINT = '{0}.verbs'.format(COMMAND_NAME)
-
-In the case that your command is called ``foo`` then this would become ``foo.verbs``.
-This name is important because it is how verbs for this command can be provided by your Python package or others.
-For example, each verb for your command ``foo`` will need entry in the ``setup.py`` of its containing package, like this:
-
-.. code-block:: python
-
-    setup(
-        ...
-        entry_points={
-            ...
-            'foo.verbs': [
-                'bar = foo.verbs.bar:entry_point_data',
-            ],
-        }
-    )
-
-You can see here that you are defining ``bar`` to be a an entry_point of type ``foo.verbs`` which in turn points to a module and reference ``foo.verbs.bar`` and ``entry_point_data``.
-At run time this verb pattern will let your command lookup all things defined as ``foo.verbs`` and load up the reference to which they point.
-
-Adding Verbs
-^^^^^^^^^^^^
-
-In order to add a verb to your command, a few things must happen.
-
-First you must have an entry in the ``setup.py`` as described above.
-This allows the command to find the ``entry_point`` for your verb at run time.
-The ``entry_point`` for these verbs should point to a dictionary which describes the verb being added.
-
-This is an example of an ``entry_point_data`` dictionary for a verb:
-
-.. code-block:: python
-
-    entry_point_data = dict(
-        verb='build',
-        description='Builds a workspace of packages',
-        # Called for execution, given parsed arguments object
-        main=main,
-        # Called first to setup argparse, given argparse parser
-        prepare_arguments=prepare_arguments,
-        # Called after prepare_arguments, but before argparse.parse_args
-        argument_preprocessor=argument_preprocessor,
-    )
-
-As you can see this dictionary describes the verb and gives references to functions which allow the command to describe the verb, hook into argparse parameter creation for the verb, and to execute the verb.
-The ``verb``, ``description``, ``main``, and ``prepare_arguments`` keys of the dictionary are required, but the ``argument_preprocessor`` key is optional.
-
-- ``verb``: This is the name of the verb, and is how the command knows which verb implementation to match to a verb on the command line.
-- ``description``: This is used by the argument parsing to describe the verb in ``--help``.
-- ``prepare_arguments``: This function gets called to allow the verb to setup it's own argparse options. This function should always take one parameter which is the :py:class:`argparse.ArgumentParser` for this verb, to which arguments can be added. It can optionally take a second parameter which are the current command line arguments. This is not always needed, but can be useful in some cases. This function should always return the parser.
-- ``argument_preprocessor``: This function is optional, but allows your verb an opportunity to process the raw arguments before they are passed to argparse's ``parse_args`` function. This can be useful when argparse is not capable of processing the options correctly.
-- ``main``: This is the implementation of the verb, it gets called last and is passed the parsed arguments. The return type of this function is used for ``sys.exit``, a return type of ``None`` is interpreted as ``0``.
-
-Here is an invented example of ``main``, ``prepare_arguments``, and ``argument_preprocessor``:
-
-.. code-block:: python
-
-    def prepare_arguments(parser):
-        parser.add_argument('--some-argument', action='store_true', default=False)
-        return parser
-
-    def argument_preprocessor(args):
-        extras = {}
-
-        if '-strange-argument' in args:
-            args.remove('-strange-argument')
-            extras['strange_argument'] = True
-
-        return args, extras
-
-    def main(options):
-        print('--some-argument:', options.some_argument)
-        print('-strange-argument:', options.strange_argument)
-        if options.strange_argument:
-            return 1
-        return 0
-
-The above example is simply to illustrate the signature of these functions and how they might be used.
-
-Verb Pattern API
-^^^^^^^^^^^^^^^^
-
-.. automodule:: osrf_pycommon.cli_utils.verb_pattern
-    :members:
diff --git a/docs/conf.py b/docs/conf.py
deleted file mode 100644
index 736f751..0000000
--- a/docs/conf.py
+++ /dev/null
@@ -1,269 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# osrf_pycommon documentation build configuration file, created by
-# sphinx-quickstart on Thu May  8 16:45:32 2014.
-#
-# 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 os
-import sys
-
-# 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.coverage',
-    'sphinx.ext.doctest',
-    'sphinx.ext.intersphinx',
-    'sphinx.ext.todo',
-    '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 = u'osrf_pycommon'
-copyright = u'2014, Open Source Robotics Foundation'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '0.0'
-# The full version, including alpha/beta/rc tags.
-release = '0.0'
-
-# 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 = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-
-# -- 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 = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_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 = 'osrf_pycommondoc'
-
-
-# -- 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, or own class]).
-latex_documents = [
-    ('index', 'osrf_pycommon.tex', u'osrf\\_pycommon Documentation',
-     u'William Woodall', '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', 'osrf_pycommon', u'osrf_pycommon Documentation',
-     [u'William Woodall'], 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', 'osrf_pycommon', u'osrf_pycommon Documentation',
-     u'William Woodall', 'osrf_pycommon', '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'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
-
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/docs/index.rst b/docs/index.rst
deleted file mode 100644
index 86b0ddb..0000000
--- a/docs/index.rst
+++ /dev/null
@@ -1,95 +0,0 @@
-``osrf_pycommon``
-=================
-
-``osrf_pycommon`` is a python package which contains commonly used Python boilerplate code and patterns.
-Things like ansi terminal coloring, capturing colored output from programs using subprocess, or even a simple logging system which provides some nice functionality over the built-in Python logging system.
-
-The functionality provided here should be generic enough to be reused in arbitrary scenarios and should avoid bringing in dependencies which are not part of the standard Python library.
-Where possible Windows, Linux, and macOS should be supported, and where it cannot it should be gracefully degrading.
-Code should be pure Python 3.
-
-Contents:
-
-.. toctree::
-    :maxdepth: 2
-
-    cli_utils
-    process_utils
-    terminal_color
-    terminal_utils
-
-Installing from Source
-----------------------
-
-Given that you have a copy of the source code, you can install ``osrf_pycommon`` like this:
-
-.. code-block:: bash
-
-    $ python setup.py install
-
-.. note::
-
-    If you are installing to a system Python you may need to use ``sudo``.
-
-If you do not want to install ``osrf_pycommon`` into your system Python, or you don't have access to ``sudo``, then you can use a `virtualenv <https://virtualenv.pypa.io/>`_.
-
-Hacking
--------
-
-Because ``osrf_pycommon`` uses `setuptools <http://pythonhosted.org/setuptools/>`_ you can (and should) use the `develop <http://pythonhosted.org/setuptools/setuptools.html#development-mode>`_ feature:
-
-.. code-block:: bash
-
-    $ python setup.py develop
-
-.. note::
-
-    If you are developing against the system Python, you may need ``sudo``.
-
-This will "install" ``osrf_pycommon`` to your Python path, but rather than copying the source files, it will instead place a marker file in the ``PYTHONPATH`` redirecting Python to your source directory.
-This allows you to use it as if it were installed but where changes to the source code take immediate affect.
-
-When you are done with develop mode you can (and should) undo it like this:
-
-.. code-block:: bash
-
-    $ python setup.py develop -u
-
-.. note::
-
-    If you are developing against the system Python, you may need ``sudo``.
-
-That will "uninstall" the hooks into the ``PYTHONPATH`` which point to your source directory, but you should be wary that sometimes console scripts do not get removed from the bin folder.
-
-Testing
--------
-
-In order to run the tests you will need to install `flake8 <https://flake8.readthedocs.org/>`_.
-
-Once you have installed those, then run ``unittest``:
-
-.. code-block:: bash
-
-    $ python3 -m unittest discover -v tests
-
-Building the Documentation
---------------------------
-
-In order to build the docs you will need to first install `Sphinx <http://sphinx-doc.org/>`_.
-
-You can build the documentation by invoking the Sphinx provided make target in the ``docs`` folder:
-
-.. code-block:: bash
-
-    $ # In the docs folder
-    $ make html
-    $ open _build/html/index.html
-
-Sometimes Sphinx does not pickup on changes to modules in packages which utilize the ``__all__`` mechanism, so on repeat builds you may need to clean the docs first:
-
-.. code-block:: bash
-
-    $ # In the docs folder
-    $ make clean
-    $ make html
-    $ open _build/html/index.html
diff --git a/docs/make.bat b/docs/make.bat
deleted file mode 100644
index 4d51232..0000000
--- a/docs/make.bat
+++ /dev/null
@@ -1,242 +0,0 @@
-@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\osrf_pycommon.qhcp
-	echo.To view the help file:
-	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\osrf_pycommon.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
diff --git a/docs/process_utils.rst b/docs/process_utils.rst
deleted file mode 100644
index 3ee9e8a..0000000
--- a/docs/process_utils.rst
+++ /dev/null
@@ -1,73 +0,0 @@
-The ``process_utils`` Module
-=============================
-
-This module provides functions for doing process management.
-
-These are the main sections of this module:
-
-- `Asynchronous Process Utilities`_
-- `Synchronous Process Utilities`_
-- `Utility Functions`_
-
-Asynchronous Process Utilities
-------------------------------
-
-There is a function and class which can be used together with your custom `asyncio <https://docs.python.org/3/library/asyncio.html>`_ run loop.
-
-The :py:func:`osrf_pycommon.process_utils.async_execute_process` function is a `coroutine <https://docs.python.org/3/library/asyncio-task.html#coroutines>`_ which allows you to run a process and get the output back bit by bit in real-time, either with stdout and stderr separated or combined.
-This function also allows you to emulate the terminal using a pty simply by toggling a flag in the parameters.
-
-Along side this coroutine is a `Protocol <https://docs.python.org/3/library/asyncio-protocol.html#protocols>`_ class, :py:class:`osrf_pycommon.process_utils.AsyncSubprocessProtocol`, from which you can inherit in order to customize how the yielded output is handled.
-
-Because this coroutine is built on the ``asyncio`` framework's subprocess functions, it is portable and should behave the same on all major OS's. (including on Windows where an IOCP implementation is used)
-
-.. autofunction:: osrf_pycommon.process_utils.async_execute_process
-
-.. autoclass:: osrf_pycommon.process_utils.AsyncSubprocessProtocol
-    :members:
-
-In addtion to these functions, there is a utility function for getting the correct ``asyncio`` event loop:
-
-.. autofunction:: osrf_pycommon.process_utils.get_loop
-
-Treatment of File Descriptors
------------------------------
-
-Like Python 3.4's ``subprocess.Popen`` (and newer versions), all of the ``process_utils`` functions do not close `inheritable <https://docs.python.org/3.4/library/os.html#fd-inheritance>` file descriptors before starting subprocesses.
-This is equivalent to passing ``close_fds=False`` to ``subprocess.Popen`` on all Python versions.
-
-For historical context, in Python 3.2, the ``subprocess.Popen`` default for the ``close_fds`` option changed from ``False`` to ``True`` so that file descriptors opened by the parent process were closed before spawning the child process.
-In Python 3.4, `PEP 0446 <https://www.python.org/dev/peps/pep-0446/>`_ additionally made it so even when ``close_fds=False`` file descriptors which are `non-inheritable <https://docs.python.org/3.4/library/os.html#fd-inheritance>`_ are still closed before spawning the subprocess.
-
-If you want to be able to pass file descriptors to subprocesses in Python 3.4 or higher, you will need to make sure they are `inheritable <https://docs.python.org/3.4/library/os.html#fd-inheritance>`.
-
-Synchronous Process Utilities
------------------------------
-
-For synchronous execution and output capture of subprocess, there are two functions:
-
-- :py:func:`osrf_pycommon.process_utils.execute_process`
-- :py:func:`osrf_pycommon.process_utils.execute_process_split`
-
-These functions are not yet using the ``asyncio`` framework as a back-end and therefore on Windows will not stream the data from the subprocess as it does on Unix machines.
-Instead data will not be yielded until the subprocess is finished and all output is buffered (the normal warnings about long running programs with lots of output apply).
-
-The streaming of output does not work on Windows because on Windows the :py:func:`select.select` method only works on sockets and not file-like objects which are used with subprocess pipes.
-``asyncio`` implements Windows subprocess support by implementing a Proactor event loop based on Window's IOCP API.
-One future option will be to implement this synchronous style method using IOCP in this module, but another option is to just make synchronous the asynchronous calls, but there are issues with that as well.
-In the mean time, if you need streaming of output in both Windows and Unix, use the asynchronous calls.
-
-.. autofunction:: osrf_pycommon.process_utils.execute_process
-
-Availability: Unix (streaming), Windows (blocking)
-
-.. autofunction:: osrf_pycommon.process_utils.execute_process_split
-
-Availability: Unix (streaming), Windows (blocking)
-
-Utility Functions
------------------
-
-Currently there is only one utility function, a Python implementation of the ``which`` shell command.
-
-.. autofunction:: osrf_pycommon.process_utils.which
diff --git a/docs/terminal_color.rst b/docs/terminal_color.rst
deleted file mode 100644
index c536545..0000000
--- a/docs/terminal_color.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-The ``terminal_color`` Module
-=============================
-
-.. automodule:: osrf_pycommon.terminal_color
-    :members:
diff --git a/docs/terminal_utils.rst b/docs/terminal_utils.rst
deleted file mode 100644
index be5e0bb..0000000
--- a/docs/terminal_utils.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-The ``terminal_utils`` Module
-=============================
-
-.. automodule:: osrf_pycommon.terminal_utils
-    :members:
diff --git a/osrf_pycommon.egg-info/PKG-INFO b/osrf_pycommon.egg-info/PKG-INFO
new file mode 100644
index 0000000..818975f
--- /dev/null
+++ b/osrf_pycommon.egg-info/PKG-INFO
@@ -0,0 +1,17 @@
+Metadata-Version: 2.1
+Name: osrf-pycommon
+Version: 2.1.1
+Summary: Commonly needed Python modules, used by Python software developed at OSRF
+Home-page: http://osrf-pycommon.readthedocs.org/
+Author: William Woodall
+Author-email: william@osrfoundation.org
+Maintainer: William Woodall
+Maintainer-email: william@openrobotics.org
+License: Apache 2.0
+Keywords: osrf,utilities
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Programming Language :: Python
+Requires-Python: >=3.5
+Provides-Extra: test
+License-File: LICENSE
diff --git a/osrf_pycommon.egg-info/SOURCES.txt b/osrf_pycommon.egg-info/SOURCES.txt
new file mode 100644
index 0000000..3b115f2
--- /dev/null
+++ b/osrf_pycommon.egg-info/SOURCES.txt
@@ -0,0 +1,30 @@
+CHANGELOG.rst
+LICENSE
+MANIFEST.in
+README.md
+package.xml
+setup.py
+osrf_pycommon/__init__.py
+osrf_pycommon/terminal_utils.py
+osrf_pycommon.egg-info/PKG-INFO
+osrf_pycommon.egg-info/SOURCES.txt
+osrf_pycommon.egg-info/dependency_links.txt
+osrf_pycommon.egg-info/requires.txt
+osrf_pycommon.egg-info/top_level.txt
+osrf_pycommon.egg-info/zip-safe
+osrf_pycommon/cli_utils/__init__.py
+osrf_pycommon/cli_utils/common.py
+osrf_pycommon/cli_utils/verb_pattern.py
+osrf_pycommon/process_utils/__init__.py
+osrf_pycommon/process_utils/async_execute_process.py
+osrf_pycommon/process_utils/execute_process_nopty.py
+osrf_pycommon/process_utils/execute_process_pty.py
+osrf_pycommon/process_utils/get_loop_impl.py
+osrf_pycommon/process_utils/impl.py
+osrf_pycommon/process_utils/async_execute_process_asyncio/__init__.py
+osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py
+osrf_pycommon/terminal_color/__init__.py
+osrf_pycommon/terminal_color/ansi_re.py
+osrf_pycommon/terminal_color/impl.py
+osrf_pycommon/terminal_color/windows.py
+resource/osrf_pycommon
\ No newline at end of file
diff --git a/docs/_static/.gitignore b/osrf_pycommon.egg-info/dependency_links.txt
similarity index 100%
rename from docs/_static/.gitignore
rename to osrf_pycommon.egg-info/dependency_links.txt
diff --git a/osrf_pycommon.egg-info/requires.txt b/osrf_pycommon.egg-info/requires.txt
new file mode 100644
index 0000000..529523f
--- /dev/null
+++ b/osrf_pycommon.egg-info/requires.txt
@@ -0,0 +1,8 @@
+
+[:python_version < "3.8"]
+importlib-metadata
+
+[test]
+flake8
+flake8_import_order
+pytest
diff --git a/osrf_pycommon.egg-info/top_level.txt b/osrf_pycommon.egg-info/top_level.txt
new file mode 100644
index 0000000..ea3da2b
--- /dev/null
+++ b/osrf_pycommon.egg-info/top_level.txt
@@ -0,0 +1 @@
+osrf_pycommon
diff --git a/osrf_pycommon.egg-info/zip-safe b/osrf_pycommon.egg-info/zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/osrf_pycommon.egg-info/zip-safe
@@ -0,0 +1 @@
+
diff --git a/package.xml b/package.xml
index bedd456..d6057f7 100644
--- a/package.xml
+++ b/package.xml
@@ -6,10 +6,13 @@
   <name>osrf_pycommon</name>
   <version>2.1.1</version>
   <description>Commonly needed Python modules, used by Python software developed at OSRF.</description>
-  <maintainer email="william@osrfoundation.org">William Woodall</maintainer>
+
+  <maintainer email="william@openrobotics.org">William Woodall</maintainer>
 
   <license>Apache License 2.0</license>
 
+  <author email="william@osrfoundation.org">William Woodall</author>
+
   <exec_depend>python3-importlib-metadata</exec_depend>
 
   <export>
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..8bfd5a1
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+
diff --git a/setup.py b/setup.py
index 1ed8237..cb17b7c 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ setup(
     author='William Woodall',
     author_email='william@osrfoundation.org',
     maintainer='William Woodall',
-    maintainer_email='william@osrfoundation.org',
+    maintainer_email='william@openrobotics.org',
     url='http://osrf-pycommon.readthedocs.org/',
     keywords=['osrf', 'utilities'],
     classifiers=[
diff --git a/stdeb.cfg b/stdeb.cfg
deleted file mode 100644
index 276596f..0000000
--- a/stdeb.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-Depends3: python3-setuptools, python3-importlib-metadata
-Conflicts3: python-osrf-pycommon
-Suite3: focal jammy bullseye
-X-Python3-Version: >= 3.8
-No-Python2:
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/test_code_format.py b/tests/test_code_format.py
deleted file mode 100644
index 2a2e25b..0000000
--- a/tests/test_code_format.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import os
-import subprocess
-import sys
-
-
-def test_flake8():
-    """Test source code for pyFlakes and PEP8 conformance"""
-    this_dir = os.path.dirname(os.path.abspath(__file__))
-    source_dir = os.path.join(this_dir, '..', 'osrf_pycommon')
-    cmd = [sys.executable, '-m', 'flake8', source_dir, '--count']
-    # if flake8_import_order is installed, set the style to google
-    try:
-        import flake8_import_order  # noqa
-        cmd.extend(['--import-order-style=google'])
-    except ImportError:
-        pass
-    # ignore error codes from plugins this package doesn't comply with
-    cmd.extend(['--ignore=C,D,Q,I'])
-    # work around for https://gitlab.com/pycqa/flake8/issues/179
-    cmd.extend(['--jobs', '1'])
-    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-    stdout, stderr = p.communicate()
-    print(stdout)
-    assert p.returncode == 0, \
-        "Command '{0}' returned non-zero exit code '{1}'".format(' '.join(cmd), p.returncode)
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/test_cli_utils/__init__.py b/tests/unit/test_cli_utils/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/test_cli_utils/test_common.py b/tests/unit/test_cli_utils/test_common.py
deleted file mode 100644
index 9c5821c..0000000
--- a/tests/unit/test_cli_utils/test_common.py
+++ /dev/null
@@ -1,86 +0,0 @@
-from osrf_pycommon.cli_utils import common
-
-
-def test_extract_jobs_flags():
-    extract_jobs_flags = common.extract_jobs_flags
-    valid_mflags = [
-        '-j8 -l8', 'j8 ', '-j', 'j', '-l8', 'l8',
-        '-l', 'l', '-j18', ' -j8 l9', '-j1 -l1',
-        '--jobs=8', '--jobs 8', '--jobs', '--load-average',
-        '--load-average=8', '--load-average 8', '--jobs=8 -l9'
-    ]
-    results = [
-        '-j8 -l8', 'j8', '-j', 'j', '-l8', 'l8',
-        '-l', 'l', '-j18', '-j8 l9', '-j1 -l1',
-        '--jobs=8', '--jobs 8', '--jobs', '--load-average',
-        '--load-average=8', '--load-average 8', '--jobs=8 -l9'
-    ]
-    leftover_results = [
-        '', ' ', '', '', '', '',
-        '', '', '', '', '',
-        '', '', '', '',
-        '', '', ''
-    ]
-    for mflag, result in zip(valid_mflags, zip(results, leftover_results)):
-        result, leftover_result = result
-        matches, leftovers = extract_jobs_flags(mflag)
-        print('--')
-        print("input:    '{0}'".format(mflag))
-        print("matched:  '{0}'".format(matches))
-        print("expected: '{0}'".format(result))
-        assert matches == result, "should match '{0}'".format(mflag)
-        assert leftovers == leftover_result, "expected leftovers '{0}': '{1}'"\
-            .format(leftovers)
-    invalid_mflags = ['', '--jobs= 8', '--jobs8']
-    for mflag in invalid_mflags:
-        matches, leftovers = extract_jobs_flags(mflag)
-        assert matches == '', "should not match '{0}'".format(mflag)
-        assert leftovers == mflag, "'{0}' should be in leftovers: '{1}'"\
-            .format(mflag, leftovers)
-    mixed_flags = [
-        'target -j8 -l8 --other-option'
-    ]
-    results = [
-        ('-j8 -l8', 'target --other-option')
-    ]
-    for args, result in zip(mixed_flags, results):
-        expected_matches, expected_leftovers = result
-        matches, leftovers = extract_jobs_flags(args)
-        assert matches == expected_matches, "should have matched '{0}'"\
-            .format(expected_matches)
-        assert leftovers == expected_leftovers, "should have left '{0}' '{1}'"\
-            .format(expected_leftovers, leftovers)
-
-
-def test_extract_argument_group():
-    extract_argument_group = common.extract_argument_group
-    # Example 1 from docstring
-    args = ['foo', '--args', 'bar', '--baz']
-    expected = (['foo'], ['bar', '--baz'])
-    results = extract_argument_group(args, '--args')
-    assert expected == results, (args, expected, results)
-    # Example 2 from docstring
-    args = ['foo', '--args', 'bar', '--baz', '---', '--', '--foo-option']
-    expected = (['foo', '--foo-option'], ['bar', '--baz', '--'])
-    results = extract_argument_group(args, '--args')
-    assert expected == results, (args, expected, results)
-    # Example 3 from docstring
-    args = ['foo',
-            '--args', 'ping', '--',
-            'bar',
-            '--args', 'pong', '--',
-            'baz',
-            '--args', '--']
-    expected = (['foo', 'bar', 'baz'], ['ping', 'pong'])
-    results = extract_argument_group(args, '--args')
-    assert expected == results, (args, expected, results)
-    # Example with delimiter but no arguments
-    args = ['foo', '--args']
-    expected = (['foo'], [])
-    results = extract_argument_group(args, '--args')
-    assert expected == results, (args, expected, results)
-    # Example with no delimiter
-    args = ['foo', 'bar']
-    expected = (['foo', 'bar'], [])
-    results = extract_argument_group(args, '--args')
-    assert expected == results, (args, expected, results)
diff --git a/tests/unit/test_cli_utils/test_verb_pattern.py b/tests/unit/test_cli_utils/test_verb_pattern.py
deleted file mode 100644
index fd443da..0000000
--- a/tests/unit/test_cli_utils/test_verb_pattern.py
+++ /dev/null
@@ -1,139 +0,0 @@
-import sys
-import unittest
-
-from osrf_pycommon.cli_utils import verb_pattern
-
-called = None
-
-
-class TestCliUtilsVerbPattern(unittest.TestCase):
-    def test_call_prepare_arguments(self):
-        global called
-        cpa = verb_pattern.call_prepare_arguments
-
-        # Try with basic, one parameter
-        called = False
-
-        def fake_prepare_arguments(parser):
-            global called
-            called = True
-            if called:
-                pass
-            return parser
-
-        r = cpa(fake_prepare_arguments, None)
-        self.assertTrue(called)
-        self.assertIsNone(r)
-
-        # Try with args
-        called = False
-
-        def fake_prepare_arguments(parser, args):
-            global called
-            called = True
-            if called:
-                pass
-            return parser
-
-        r = cpa(fake_prepare_arguments, None)
-        self.assertTrue(called)
-        self.assertIsNone(r)
-
-        # Try with self
-        called = False
-
-        class Foo:
-            def fake_prepare_arguments(self, parser, args):
-                global called
-                called = True
-                if called:
-                    pass
-                return parser
-
-        f = Foo()
-        r = cpa(f.fake_prepare_arguments, None)
-        self.assertTrue(called)
-        self.assertIsNone(r)
-
-        # Try with more than needed
-        called = False
-
-        class Foo:
-            def fake_prepare_arguments(self, parser, args, extra):
-                global called
-                called = True
-                if called:
-                    pass
-                return parser
-
-        f = Foo()
-
-        # Remove the following if condition and keep else condition once
-        # Xenial is dropped
-        if sys.version_info[0] < 3:
-            with self.assertRaisesRegexp(ValueError, 'one or two parameters'):
-                r = cpa(f.fake_prepare_arguments, None)
-
-        else:
-            with self.assertRaisesRegex(ValueError, 'one or two parameters'):
-                r = cpa(f.fake_prepare_arguments, None)
-
-        # Try with less than needed
-        called = False
-
-        class Foo:
-            def fake_prepare_arguments(self):
-                global called
-                called = True
-                if called:
-                    pass
-                return 'Should not get here'
-
-        f = Foo()
-
-        # Remove the following if condition and keep else condition once
-        # Xenial is dropped
-        if sys.version_info[0] < 3:
-            with self.assertRaisesRegexp(ValueError, 'one or two parameters'):
-                r = cpa(f.fake_prepare_arguments, None)
-
-        else:
-            with self.assertRaisesRegex(ValueError, 'one or two parameters'):
-                r = cpa(f.fake_prepare_arguments, None)
-
-        # Try with additional optional argument
-        called = False
-
-        class Foo:
-            def fake_prepare_arguments(self, parser, args, optional=None):
-                global called
-                called = True
-                if called:
-                    pass
-                return parser
-
-        f = Foo()
-        r = cpa(f.fake_prepare_arguments, None)
-        self.assertTrue(called)
-        self.assertIsNone(r)
-
-    def test_split_arguments_by_verb(self):
-        args = ['--cmd-arg1', 'verb', '--verb-arg1', '--verb-arg2']
-        expected = ('verb', ['--cmd-arg1'], ['--verb-arg1', '--verb-arg2'])
-        self.assertEqual(verb_pattern.split_arguments_by_verb(args), expected)
-
-        args = ['verb', '--verb-arg1', '--verb-arg2']
-        expected = ('verb', [], ['--verb-arg1', '--verb-arg2'])
-        self.assertEqual(verb_pattern.split_arguments_by_verb(args), expected)
-
-        args = ['--cmd-arg1', 'verb']
-        expected = ('verb', ['--cmd-arg1'], [])
-        self.assertEqual(verb_pattern.split_arguments_by_verb(args), expected)
-
-        args = ['verb']
-        expected = ('verb', [], [])
-        self.assertEqual(verb_pattern.split_arguments_by_verb(args), expected)
-
-        args = ['--cmd-arg1']
-        expected = (None, ['--cmd-arg1'], [])
-        self.assertEqual(verb_pattern.split_arguments_by_verb(args), expected)
diff --git a/tests/unit/test_process_utils/__init__.py b/tests/unit/test_process_utils/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/execute_process/stdout_stderr_ordering.py b/tests/unit/test_process_utils/fixtures/execute_process/stdout_stderr_ordering.py
deleted file mode 100755
index fab8fe2..0000000
--- a/tests/unit/test_process_utils/fixtures/execute_process/stdout_stderr_ordering.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from __future__ import print_function
-
-import sys
-
-print("out 1")
-print("err 1", file=sys.stderr)
-print("out 2")
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/bin/bin_only.exe b/tests/unit/test_process_utils/fixtures/impl_which/bin/bin_only.exe
deleted file mode 100755
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/bin/exc1.exe b/tests/unit/test_process_utils/fixtures/impl_which/bin/exc1.exe
deleted file mode 100755
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/bin/exc2.exe b/tests/unit/test_process_utils/fixtures/impl_which/bin/exc2.exe
deleted file mode 100755
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/usr/bin/exc1.exe b/tests/unit/test_process_utils/fixtures/impl_which/usr/bin/exc1.exe
deleted file mode 100755
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/usr/bin/exc2.exe b/tests/unit/test_process_utils/fixtures/impl_which/usr/bin/exc2.exe
deleted file mode 100755
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/fixtures/impl_which/usr/local/bin/exc2 b/tests/unit/test_process_utils/fixtures/impl_which/usr/local/bin/exc2
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/test_process_utils/impl_aep_asyncio.py b/tests/unit/test_process_utils/impl_aep_asyncio.py
deleted file mode 100644
index a478304..0000000
--- a/tests/unit/test_process_utils/impl_aep_asyncio.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from osrf_pycommon.process_utils.async_execute_process import async_execute_process
-from osrf_pycommon.process_utils import get_loop
-
-from .impl_aep_protocol import create_protocol
-
-loop = get_loop()
-
-
-async def run(cmd, **kwargs):
-    transport, protocol = await async_execute_process(
-        create_protocol(), cmd, **kwargs)
-    retcode = await protocol.complete
-    return protocol.stdout_buffer, protocol.stderr_buffer, retcode
diff --git a/tests/unit/test_process_utils/impl_aep_protocol.py b/tests/unit/test_process_utils/impl_aep_protocol.py
deleted file mode 100644
index cf11eaf..0000000
--- a/tests/unit/test_process_utils/impl_aep_protocol.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from osrf_pycommon.process_utils import AsyncSubprocessProtocol
-
-
-def create_protocol():
-    class CustomProtocol(AsyncSubprocessProtocol):
-        def __init__(self, **kwargs):
-            self.stdout_buffer = b""
-            self.stderr_buffer = b""
-            AsyncSubprocessProtocol.__init__(self, **kwargs)
-
-        def on_stdout_received(self, data):
-            self.stdout_buffer += data
-
-        def on_stderr_received(self, data):
-            self.stderr_buffer += data
-    return CustomProtocol
diff --git a/tests/unit/test_process_utils/test_async_execute_process.py b/tests/unit/test_process_utils/test_async_execute_process.py
deleted file mode 100644
index 736f014..0000000
--- a/tests/unit/test_process_utils/test_async_execute_process.py
+++ /dev/null
@@ -1,103 +0,0 @@
-import atexit
-import os
-import sys
-import unittest
-
-from .impl_aep_asyncio import run
-from .impl_aep_asyncio import loop
-
-this_dir = os.path.dirname(os.path.abspath(__file__))
-
-test_script = os.path.join(
-    this_dir,
-    'fixtures',
-    'execute_process',
-    'stdout_stderr_ordering.py')
-test_script_quoted = '"%s"' % test_script if ' ' in test_script else test_script
-python = sys.executable
-
-
-# This atexit handler ensures the loop is closed after all tests were run.
-@atexit.register
-def close_loop():
-    if not loop.is_closed():
-        loop.close()
-
-
-class TestProcessUtilsAsyncExecuteProcess(unittest.TestCase):
-    def test_async_execute_process_no_emulation_shell_false_combined(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script]))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stdout)
-        self.assertIn('out 2', stdout)
-        self.assertEqual('', stderr)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_no_emulation_shell_true_combined(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script_quoted], shell=True))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stdout)
-        self.assertIn('out 2', stdout)
-        self.assertEqual('', stderr)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_no_emulation_shell_false(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script], stderr_to_stdout=False))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stderr)
-        self.assertIn('out 2', stdout)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_no_emulation_shell_true(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script_quoted], stderr_to_stdout=False, shell=True))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stderr)
-        self.assertIn('out 2', stdout)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_with_emulation_shell_false_combined(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script], emulate_tty=True))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stdout)
-        self.assertIn('out 2', stdout)
-        self.assertEqual('', stderr)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_with_emulation_shell_true_combined(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script_quoted], emulate_tty=True, shell=True))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stdout)
-        self.assertIn('out 2', stdout)
-        self.assertEqual('', stderr)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_with_emulation_shell_false(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script], emulate_tty=True, stderr_to_stdout=False))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stderr)
-        self.assertIn('out 2', stdout)
-        self.assertEqual(0, retcode)
-
-    def test_async_execute_process_with_emulation_shell_true(self):
-        stdout, stderr, retcode = loop.run_until_complete(run(
-            [python, test_script_quoted], emulate_tty=True, stderr_to_stdout=False,
-            shell=True))
-        stdout, stderr = stdout.decode(), stderr.decode()
-        self.assertIn('out 1', stdout)
-        self.assertIn('err 1', stderr)
-        self.assertIn('out 2', stdout)
-        self.assertEqual(0, retcode)
diff --git a/tests/unit/test_process_utils/test_execute_process_nopty.py b/tests/unit/test_process_utils/test_execute_process_nopty.py
deleted file mode 100644
index 045f503..0000000
--- a/tests/unit/test_process_utils/test_execute_process_nopty.py
+++ /dev/null
@@ -1,136 +0,0 @@
-import os
-import sys
-import unittest
-
-from osrf_pycommon.process_utils import execute_process_nopty
-
-this_dir = os.path.dirname(os.path.abspath(__file__))
-
-test_script = os.path.join(
-    this_dir,
-    'fixtures',
-    'execute_process',
-    'stdout_stderr_ordering.py')
-python = sys.executable
-
-file_nl = b"""
-"""
-nl = os.linesep.encode()
-
-
-class TestProcessUtilsExecuteNoPty(unittest.TestCase):
-    def test__process_incomming_lines(self):
-        pil = execute_process_nopty._process_incoming_lines
-
-        # Test with no left overs and no new incoming
-        left_overs = b''
-        incoming = b''
-        self.assertEqual((None, left_overs), pil(incoming, left_overs))
-
-        # Test with left overs, but no new incoming
-        left_overs = b'something'
-        incoming = b''
-        self.assertEqual((b'', left_overs), pil(incoming, left_overs))
-
-        # Test with no left overs, but new incoming
-        left_overs = b''
-        incoming = nl.join([b'one', b'two'])
-        self.assertEqual((b'one' + nl, b'two'), pil(incoming, left_overs))
-
-        # Test with left overs and new incoming with prefixed nl
-        left_overs = b'something'
-        incoming = (nl + b'else')
-        expected = (b'something' + nl, b'else')
-        self.assertEqual(expected, pil(incoming, left_overs))
-
-    def test__execute_process_nopty_combined_unbuffered(self):
-        exc_nopty = execute_process_nopty._execute_process_nopty
-
-        # Test ordering with stdout and stderr combined and Python unbuffered
-        cmd = [python, "-u", test_script]
-        result = b""
-        for out, err, ret in exc_nopty(cmd, None, None, False, True):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = b"""\
-out 1
-err 1
-out 2
-"""
-        expected = expected.replace(file_nl, nl)
-        expected = sorted(expected.splitlines(True))
-        result = sorted(result.splitlines(True))
-        self.assertEqual(expected, result)
-
-    def test__execute_process_nopty_unbuffered(self):
-        exc_nopty = execute_process_nopty._execute_process_nopty
-
-        # Test ordering with stdout and stderr combined and Python unbuffered
-        cmd = [python, "-u", test_script]
-        result = b""
-        for out, err, ret in exc_nopty(cmd, None, None, False, False):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = b"""\
-out 1
-err 1
-out 2
-"""
-        expected = expected.replace(file_nl, nl)
-        expected = sorted(expected.splitlines(True))
-        result = sorted(result.splitlines(True))
-        self.assertEqual(expected, result)
-
-    def test__execute_process_nopty_combined(self):
-        exc_nopty = execute_process_nopty._execute_process_nopty
-
-        # Test ordering with stdout and stderr combined
-        cmd = [python, test_script]
-        result = b""
-        for out, err, ret in exc_nopty(cmd, None, None, False, True):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = b"""\
-out 1
-err 1
-out 2
-"""
-        expected = expected.replace(file_nl, nl)
-        expected = sorted(expected.splitlines(True))
-        result = sorted(result.splitlines(True))
-        self.assertEqual(expected, result)
-
-    def test__execute_process_nopty(self):
-        exc_nopty = execute_process_nopty._execute_process_nopty
-
-        # Test ordering with stdout and stderr separate
-        cmd = [python, test_script]
-        result = b""
-        for out, err, ret in exc_nopty(cmd, None, None, False, False):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = b"""\
-out 1
-err 1
-out 2
-"""
-        expected = expected.replace(file_nl, nl)
-        expected = sorted(expected.splitlines(True))
-        result = sorted(result.splitlines(True))
-        self.assertEqual(expected, result)
diff --git a/tests/unit/test_process_utils/test_execute_process_pty.py b/tests/unit/test_process_utils/test_execute_process_pty.py
deleted file mode 100644
index e05ba76..0000000
--- a/tests/unit/test_process_utils/test_execute_process_pty.py
+++ /dev/null
@@ -1,104 +0,0 @@
-import os
-import sys
-import unittest
-
-this_dir = os.path.dirname(os.path.abspath(__file__))
-
-test_script = os.path.join(
-    this_dir,
-    'fixtures',
-    'execute_process',
-    'stdout_stderr_ordering.py')
-python = sys.executable
-
-
-def convert_file_linesep_with_pty_linesep(string):
-    return string.replace(b"""
-""", b"\r\n")
-
-
-@unittest.skipIf(sys.platform.startswith("win"), "Windows not supported")
-class TestProcessUtilsExecuteNoPty(unittest.TestCase):
-    def test__execute_process_pty_combined_unbuffered(self):
-        from osrf_pycommon.process_utils import execute_process_pty
-        exc_pty = execute_process_pty._execute_process_pty
-
-        # Test ordering with stdout and stderr combined and Python unbuffered
-        cmd = [python, "-u", test_script]
-        result = b""
-        for out, err, ret in exc_pty(cmd, None, None, False, True):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = convert_file_linesep_with_pty_linesep(b"""\
-out 1
-err 1
-out 2
-""")
-        self.assertEqual(expected, result)
-
-    def test__execute_process_pty_unbuffered(self):
-        from osrf_pycommon.process_utils import execute_process_pty
-        exc_pty = execute_process_pty._execute_process_pty
-
-        # Test ordering with stdout and stderr combined and Python unbuffered
-        cmd = [python, "-u", test_script]
-        result = b""
-        for out, err, ret in exc_pty(cmd, None, None, False, False):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = convert_file_linesep_with_pty_linesep(b"""\
-out 1
-err 1
-out 2
-""")
-        self.assertEqual(expected, result)
-
-    def test__execute_process_pty_combined(self):
-        from osrf_pycommon.process_utils import execute_process_pty
-        exc_pty = execute_process_pty._execute_process_pty
-
-        # Test ordering with stdout and stderr combined
-        cmd = [python, test_script]
-        result = b""
-        for out, err, ret in exc_pty(cmd, None, None, False, True):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = convert_file_linesep_with_pty_linesep(b"""\
-out 1
-err 1
-out 2
-""")
-        self.assertEqual(expected, result)
-
-    def test__execute_process_pty(self):
-        from osrf_pycommon.process_utils import execute_process_pty
-        exc_pty = execute_process_pty._execute_process_pty
-
-        # Test ordering with stdout and stderr separate
-        cmd = [python, test_script]
-        result = b""
-        for out, err, ret in exc_pty(cmd, None, None, False, False):
-            if out is not None:
-                result += out
-            if err is not None:
-                result += err
-            if ret is not None:
-                break
-        expected = convert_file_linesep_with_pty_linesep(b"""\
-out 1
-err 1
-out 2
-""")
-        self.assertEqual(expected, result)
diff --git a/tests/unit/test_process_utils/test_impl.py b/tests/unit/test_process_utils/test_impl.py
deleted file mode 100644
index 77073e9..0000000
--- a/tests/unit/test_process_utils/test_impl.py
+++ /dev/null
@@ -1,51 +0,0 @@
-from __future__ import unicode_literals
-
-import os
-import unittest
-
-from osrf_pycommon.process_utils import impl
-
-this_dir = os.path.dirname(os.path.abspath(__file__))
-
-
-class TestProcessUtilsImpl(unittest.TestCase):
-    def test_which(self):
-        which = impl.which
-        j = os.path.join
-        prefix = j(this_dir, 'fixtures', 'impl_which')
-        paths = os.pathsep.join([
-            j(prefix, 'usr', 'local', 'bin'),
-            j(prefix, 'usr', 'bin'),
-            j(prefix, 'bin'),
-        ])
-        # bin_only exists +x in bin only
-        expected = j(prefix, 'bin', 'bin_only.exe')
-        self.assertEqual(expected, which('bin_only.exe', path=paths))
-        self.assertEqual(expected, which(expected, path=paths))
-        # exc1 exists +x in bin and usr/bin
-        expected = j(prefix, 'usr', 'bin', 'exc1.exe')
-        self.assertEqual(expected, which('exc1.exe', path=paths))
-        self.assertEqual(expected, which(expected, path=paths))
-        # exc2 exists +x in bin and usr/bin, but -x in usr/local/bin
-        expected = j(prefix, 'usr', 'bin', 'exc2.exe')
-        self.assertEqual(expected, which('exc2.exe', path=paths))
-        self.assertEqual(expected, which(expected, path=paths))
-        # Same as above, with PATH
-        orig_path = os.environ['PATH']
-        try:
-            os.environ['PATH'] = paths
-            # bin_only exists +x in bin only
-            expected = j(prefix, 'bin', 'bin_only.exe')
-            self.assertEqual(expected, which('bin_only.exe'))
-            self.assertEqual(expected, which(expected))
-            # exc1 exists +x in bin and usr/bin
-            expected = j(prefix, 'usr', 'bin', 'exc1.exe')
-            self.assertEqual(expected, which('exc1.exe'))
-            self.assertEqual(expected, which(expected))
-            # exc2 exists +x in bin and usr/bin, but -x in usr/local/bin
-            expected = j(prefix, 'usr', 'bin', 'exc2.exe')
-            self.assertEqual(expected, which('exc2.exe'))
-            self.assertEqual(expected, which(expected))
-        finally:
-            os.environ['PATH'] = orig_path
-        which(str("exc1.exe"), path=paths)  # Make sure unicode/str works
diff --git a/tests/unit/test_terminal_color/__init__.py b/tests/unit/test_terminal_color/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/test_terminal_color/test_ansi_re.py b/tests/unit/test_terminal_color/test_ansi_re.py
deleted file mode 100644
index 9588ba9..0000000
--- a/tests/unit/test_terminal_color/test_ansi_re.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import unittest
-
-from osrf_pycommon.terminal_color import ansi_re
-
-
-class TestTerminalColorAnsiRe(unittest.TestCase):
-    test_str = "\x1b[31mred \033[1mbold red \x1b[0mnormal \x1b[41mred bg"
-
-    def test_split_by_ansi_escape_sequence(self):
-        split_ansi = ansi_re.split_by_ansi_escape_sequence
-        expected = [
-            "", "\x1b[31m", "red ", "\x1b[1m", "bold red ", "\x1b[0m",
-            "normal ", "\x1b[41m", "red bg"
-        ]
-        self.assertEqual(expected, split_ansi(self.test_str, True))
-        expected = ["", "red ", "bold red ", "normal ", "red bg"]
-        self.assertEqual(expected, split_ansi(self.test_str, False))
-
-    def test_remove_ansi_escape_sequences(self):
-        remove_ansi = ansi_re.remove_ansi_escape_sequences
-        expected = "red bold red normal red bg"
-        self.assertEqual(expected, remove_ansi(self.test_str))
-
-    def test_remove_ansi_escape_sequences_false_positives(self):
-        remove_ansi = ansi_re.remove_ansi_escape_sequences
-        false_positive = "Should not match: \1xb[1234m \033[m \1xb[3Om"
-        self.assertEqual(false_positive, remove_ansi(false_positive))
diff --git a/tests/unit/test_terminal_color/test_impl.py b/tests/unit/test_terminal_color/test_impl.py
deleted file mode 100644
index f0cd583..0000000
--- a/tests/unit/test_terminal_color/test_impl.py
+++ /dev/null
@@ -1,73 +0,0 @@
-import unittest
-
-from osrf_pycommon.terminal_color import impl
-
-assert impl._enabled is True
-
-
-class TestTerminalColorImpl(unittest.TestCase):
-    test_format_str = "@{r}red @!bold red @|normal @{rb}red bg"
-    test_str = "\x1b[31mred \033[1mbold red \x1b[0mnormal \x1b[41mred bg"
-
-    def test_ansi(self):
-        ansi = impl.ansi
-        self.assertEqual('\x1b[0m', ansi('reset'))
-        impl.disable_ansi_color_substitution_globally()
-        self.assertNotEqual('\x1b[0m', ansi('reset'))
-        self.assertEqual('@|', ansi('atbar'))
-        impl.enable_ansi_color_substitution_globally()
-        self.assertEqual('\x1b[0m', ansi('reset'))
-
-    def test_get_ansi_dict(self):
-        get_ansi_dict = impl.get_ansi_dict
-        ansi_dict = get_ansi_dict()
-        self.assertNotEqual({}, ansi_dict)
-        self.assertEqual('\x1b[0m', ansi_dict['reset'])
-        impl.disable_ansi_color_substitution_globally()
-        ansi_dict = get_ansi_dict()
-        self.assertEqual('\x1b[0m', ansi_dict['reset'])
-        self.assertEqual('@|', ansi_dict['atbar'])
-        self.assertNotEqual({}, ansi_dict)
-        impl.enable_ansi_color_substitution_globally()
-        ansi_dict = get_ansi_dict()
-        self.assertNotEqual({}, ansi_dict)
-        self.assertEqual('\x1b[0m', ansi_dict['reset'])
-
-    def test_enable_and_disable_ansi_color_substitution_globally(self):
-        enable = impl.enable_ansi_color_substitution_globally
-        disable = impl.disable_ansi_color_substitution_globally
-        is_windows = impl._is_windows
-        enabled = impl._enabled
-        try:
-            impl._is_windows = False
-            impl._enabled = True
-            enable()
-            self.assertEqual('\x1b[0m', impl.ansi('reset'))
-            self.assertEqual('\x1b[0m', impl.format_color('@|'))
-            disable()
-            self.assertEqual('', impl.ansi('reset'))
-            self.assertEqual('', impl.format_color('@|'))
-            enable()
-            self.assertEqual('\x1b[0m', impl.ansi('reset'))
-            self.assertEqual('\x1b[0m', impl.format_color('@|'))
-        finally:
-            impl._is_windows = is_windows
-            impl._enabled = enabled
-
-    def test_format_color(self):
-        is_windows = impl._is_windows
-        try:
-            impl._is_windows = False
-            format_color = impl.format_color
-            self.assertEqual(self.test_str, format_color(self.test_format_str))
-            sanitized_str = "|@@ Notice @{atbar}"
-            self.assertEqual("|@ Notice @|", format_color(sanitized_str))
-        finally:
-            impl._is_windows = is_windows
-
-    def test_sanitize(self):
-        sanitize = impl.sanitize
-        test_str = "Email: {email}@{org}"
-        self.assertEqual("Email: {{email}}@@{{org}}", sanitize(test_str))
-        test_str = "|@ Notice @|"
-        self.assertEqual("|@@ Notice @{atbar}", sanitize(test_str))
diff --git a/tests/unit/test_terminal_utils.py b/tests/unit/test_terminal_utils.py
deleted file mode 100644
index 49abfba..0000000
--- a/tests/unit/test_terminal_utils.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import unittest
-from unittest import mock
-
-from osrf_pycommon.terminal_utils import is_tty
-
-
-class TestTerminalUtils(unittest.TestCase):
-    def test_is_tty(self):
-        mock_stream = object()
-        self.assertFalse(is_tty(mock_stream))
-        mock_stream = mock.MagicMock()
-        mock_stream.isatty = mock.MagicMock(return_value=None)
-        self.assertFalse(is_tty(mock_stream))
-        mock_stream.isatty = mock.MagicMock(return_value=False)
-        self.assertFalse(is_tty(mock_stream))
-        mock_stream.isatty = mock.MagicMock(return_value=True)
-        self.assertTrue(is_tty(mock_stream))

More details

Full run details

Historical runs