Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Reconfigure existing streams #78

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Commits on Sep 9, 2019

  1. Backport contextlib.AbstractContextManager

    Creates compat.py with backport of contextlib.AbstractContextManager
    to Python 3.4, so that the external interface of StdioManager
    has a consistent MRO irrespective of the Python version.
    jayvdb committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    e71b42f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe5791a View commit details
    Browse the repository at this point in the history
  3. DEV: Add types module

    StdioTupleBase combines MultiItemTuple and TupleContextManager,
    and provides properties `stdin`, `stdout` and `stderr` for
    literate referencing the three members of the tuple.
    
    MultiItemTuple provides _map(), _all() and _any() for iterables,
    with suppress versions able to ignore exceptions.
    
    Base TupleContextManager creates a consistent MRO of tuple and
    AbstractContextManager.
    
    ClosingStdioTuple is a sample context manager which performs close()
    on each item in the tuple.
    
    TextIOTuple requires items to be a TextIOBase.
    
    AnyIOTuple can be used to create either a TextIOTuple or a FakeIOTuple,
    depending on whether the items are all a TextIOBase.  This will allow
    attaching different implementations to each.
    
    AnyIOTuple is used to capture `sys.__std*__` and `sys.std*` as they
    existed at module import.
    jayvdb committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    9446d6e View commit details
    Browse the repository at this point in the history
  4. DEV: Allow streams to not be context managers

    Many existing stdio capture and wrapper streams are only partial
    implementations, most commonly missing `__enter__` and `__exit__`.
    When StdioManager needs to integrate those streams into its service
    it needs to suppress exceptions caused by those missing methods.
    jayvdb committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    01d3d31 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1cf24da View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2019

  1. Building..

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    767cd97 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e7af637 View commit details
    Browse the repository at this point in the history
  3. Building again

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    773140f View commit details
    Browse the repository at this point in the history
  4. Add RandomFileIO

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    46cc6e0 View commit details
    Browse the repository at this point in the history
  5. Parameterize impl

    Also fix test_capture_stderr_warn: Use always filter
    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    52276a3 View commit details
    Browse the repository at this point in the history
  6. BufferInjectStdioManager green

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    ecfb3c5 View commit details
    Browse the repository at this point in the history
  7. Fix FileInject

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    477cc33 View commit details
    Browse the repository at this point in the history
  8. Fix lint

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    60237c4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cfe4cf2 View commit details
    Browse the repository at this point in the history
  10. More lint

    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    5fb32df View commit details
    Browse the repository at this point in the history
  11. .travis.yml: Disable pypy3 temporarily

    Azure jobs show the failure.
    jayvdb committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    3d9570f View commit details
    Browse the repository at this point in the history