Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias Assign NameStore Call NameLoad Str ListLoad Str Str Str ClassDef bases NameLoad body Assign NameStore NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Lambda arguments args NameParam defaults BinOpAdd NameLoad NameLoad decorator_list Assign NameStore Call NameLoad TupleLoad Call NameLoad Num Num FunctionDef arguments args defaults body Expr Str Import alias identifier Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Lambda arguments args defaults vararg kwarg Call AttributeLoad NameLoad attr decorator_list Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr FunctionDef arguments args defaults vararg kwarg body Expr Str Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Call NameLoad NameLoad ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad GeneratorExp TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults vararg kwarg body If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Return Call NameLoad NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Delete AttributeDel NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assert UnaryOpNot Call NameLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Raise Call AttributeLoad AttributeLoad NameLoad attr attr orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Return UnaryOpNot AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign TupleStore AttributeStore NameLoad attr NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Yield NameLoad handlers ExceptHandler type NameLoad body Return decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr While UnaryOpNot Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Return Call Call AttributeLoad NameLoad attr NameLoad Lambda arguments args defaults vararg kwarg ListComp Call NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad decorator_list
N/A N/A 
Provides methods for tests.
 N/A functools N/A itertools N/A multiprocessing N/A multiprocessing.queues N/A traceback collections namedtuple N/A mock N/A vimap.exception_handling N/A vimap.pool N/A vimap.real_worker_routine N/A DebugResult N/A namedtuple DebugResult N/A uid input output UnpickleableAndUnprintable N/A tuple N/A N/A __str__ __repr__ NotImplemented N/A get_func N/A N/A x N/A N/A N/A N/A N/A N/A y N/A N/A x y N/A N/A unpickleable N/A UnpickleableAndUnprintable N/A N/A get_func 3 3 no_warnings N/A N/A N/A N/A N/A Make vimap.exception_handling.print_warning fail tests. N/A testify T N/A N/A N/A N/A mock patch object N/A vimap exception_handling print_warning N/A N/A N/A N/A args kwargs N/A N/A T assert_not_reached N/A N/A _original_queue_feed N/A N/A N/A multiprocessing queues Queue _feed queue_feed_routine_ignoring_ioerrors N/A N/A N/A args kwargs N/A N/A Mock routine, which you can patch in, in the stead of
    multiprocessing.queues.Queue._feed. For convenience, just
    use the queue_feed_ignore_ioerrors_mock decorator.

    On certain tests, where workers die in unexpected places,
    IOErrors will be printed for queue feeding. It doesn't seem
    we are handling these edge cases incorrectly, so for now we
    silence the exceptions (as to not be distracted by them and
    possibly overlook other ones). The exceptions look like,

    Traceback (most recent call last):
      File "/usr/lib64/python2.7/multiprocessing/queues.py", line 266, in _feed
        send(obj)
    IOError: [Errno 32] Broken pipe

    They are only raised by the queue threads, so won't be caught
    by our testing framework anyway.
     N/A N/A _original_queue_feed args kwargs N/A N/A N/A N/A mock patch object traceback print_exc N/A N/A N/A N/A None N/A queue_feed_ignore_ioerrors_mock N/A N/A N/A mock patch object N/A N/A multiprocessing queues Queue _feed N/A staticmethod queue_feed_routine_ignoring_ioerrors DebugPool N/A N/A N/A vimap pool VimapPool N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super DebugPool self __init__ args kwargs N/A N/A self debug_results N/A N/A output_for_input N/A N/A self N/A N/A N/A N/A dict N/A N/A N/A r input N/A r output N/A r N/A self debug_results N/A property get_corresponding_input N/A N/A self uid output N/A N/A N/A Dummy method for mocking. N/A input_ N/A N/A N/A super DebugPool self get_corresponding_input uid output N/A N/A N/A N/A self debug_results append N/A DebugResult uid input_ output N/A input_ N/A join_and_consume_output N/A N/A self N/A N/A N/A N/A N/A _requires_queue N/A N/A fcn N/A N/A inner N/A N/A self N/A args kwargs N/A N/A N/A N/A hasattr self queue N/A N/A N/A ValueError Queue is closed! N/A N/A fcn self args kwargs N/A N/A N/A functools wraps fcn N/A inner N/A SerialQueue N/A object N/A N/A 
    This method mocks the multiprocessing.queues.Queue class, providing an
    interface to get and put items.

    Details: We can't reliably use the multiprocessing.queues.Queue class from
    serial thread pools, because it uses helper threads to load and retrieve
    data. If the main thread doesn't happen to have a sleep call (or IO-related
    call) to make it yield [so these helper threads can actually run], the
    process could hang indefinitely.
     __init__ N/A N/A self N/A args kwargs N/A N/A N/A self queue N/A N/A close N/A N/A self N/A N/A N/A Sets the queue to closed, and raises errors if any interface
        functions are called.
         N/A N/A self queue N/A join_thread N/A N/A self N/A N/A N/A N/A N/A hasattr self queue you must call close() first. N/A get_nowait N/A N/A self timeout N/A None N/A N/A N/A N/A self queue N/A N/A N/A N/A N/A multiprocessing queues Empty N/A N/A N/A N/A N/A self queue pop 0 N/A _requires_queue N/A get get_nowait put_nowait N/A N/A self item timeout N/A None N/A N/A N/A N/A N/A self queue append item N/A _requires_queue N/A put put_nowait empty N/A N/A self N/A N/A N/A N/A N/A self queue N/A _requires_queue N/A SerialQueueManager N/A N/A N/A vimap queue_manager VimapQueueManager N/A N/A queue_class SerialQueue N/A SerialProcess N/A N/A multiprocessing Process N/A N/A A process that doesn't actually fork. N/A _is_alive False is_alive N/A N/A self N/A N/A N/A N/A self _is_alive N/A start N/A N/A self N/A N/A N/A N/A self _is_alive True N/A join N/A N/A self N/A N/A N/A N/A N/A SerialWorkerRoutine N/A N/A N/A vimap real_worker_routine WorkerRoutine N/A N/A A routine that doesn't need queues for input/output. explicitly_close_queues N/A N/A self N/A N/A N/A Don't close queues, since we haven't actually forked! N/A N/A worker_input_generator N/A N/A self N/A N/A N/A Only step our workers once. N/A N/A N/A N/A N/A self input_index next_input N/A N/A N/A self input_queue get N/A N/A next_input N/A N/A N/A TypeError N/A N/A N/A N/A SerialPool N/A DebugPool N/A N/A A pool that processes input serially.

    This pool does not fork. This makes attaching debuggers to worker processes
    easier.

    The pool will spool input to workers in cyclical order, to simulate how
    work might be distributed in the multi-process case.
     N/A process_class SerialProcess N/A worker_routine_class SerialWorkerRoutine N/A queue_manager_class SerialQueueManager spool_input N/A N/A self close_if_done N/A True N/A N/A Instead of just spooling input, immediately do the work too.
         N/A N/A N/A N/A self qm spool_input N/A self all_input_serialized N/A workers N/A N/A itertools cycle N/A self processes N/A N/A N/A N/A N/A N/A self qm input_queue empty N/A N/A worker_proc N/A N/A workers next N/A N/A N/A worker_proc _target N/A worker_proc _args N/A worker_proc _kwargs N/A N/A repeat_test_to_catch_flakiness N/A N/A times N/A N/A N/A Decorator that repeats a test to help catch flakiness.

    :param times: Number of times to repeat
    :type times: int
     fcn_helper N/A N/A fcn N/A N/A N/A N/A N/A N/A functools wraps fcn N/A N/A N/A N/A args kwargs N/A N/A fcn args kwargs N/A _ N/A xrange times N/A N/A fcn_helper N/A mock_debug_pool N/A N/A N/A N/A N/A N/A N/A N/A mock patch object N/A vimap pool VimapPool DebugPool N/A mock_serial_pool N/A N/A N/A N/A N/A N/A N/A N/A mock patch object N/A vimap pool VimapPool SerialPool N/A