|
7 | 7 | 'Float', 'tuplify', 'detuplify', 'replicate', 'uniqueify', 'setify', 'merge', 'is_listy', 'range_of', |
8 | 8 | 'groupby', 'last_index', 'shufflish', 'IterLen', 'ReindexCollection', 'num_methods', 'rnum_methods', |
9 | 9 | 'inum_methods', 'fastuple', 'trace', 'compose', 'maps', 'partialler', 'mapped', 'instantiate', 'using_attr', |
10 | | - 'Self', 'Self', 'save_pickle', 'load_pickle', 'remove_patches_path', 'bunzip', 'join_path_file', 'urlread', |
11 | | - 'urljson', 'run', 'do_request', 'sort_by_run', 'PrettyString', 'round_multiple', 'even_mults', 'num_cpus', |
12 | | - 'add_props', 'ContextManagers', 'set_num_threads', 'ProcessPoolExecutor', 'ThreadPoolExecutor', 'parallel', |
13 | | - 'run_procs', 'parallel_gen'] |
| 10 | + 'Self', 'Self', 'save_pickle', 'load_pickle', 'bunzip', 'join_path_file', 'urlread', 'urljson', 'run', |
| 11 | + 'do_request', 'sort_by_run', 'PrettyString', 'round_multiple', 'even_mults', 'num_cpus', 'add_props', |
| 12 | + 'ContextManagers', 'set_num_threads', 'ProcessPoolExecutor', 'ThreadPoolExecutor', 'parallel', 'run_procs', |
| 13 | + 'parallel_gen'] |
14 | 14 |
|
15 | 15 | # Cell |
16 | 16 | from .imports import * |
@@ -545,19 +545,6 @@ def __repr__(self:Path): |
545 | 545 | except: pass |
546 | 546 | return f"Path({self.as_posix()!r})" |
547 | 547 |
|
548 | | -# Cell |
549 | | -_patched = ['read', 'readlines', 'write', 'save', 'load', 'ls'] |
550 | | - |
551 | | -@contextmanager |
552 | | -def remove_patches_path(): |
553 | | - "A context manager for disabling Path extensions." |
554 | | - patches = L(getattr(Path, n) for n in _patched) |
555 | | - try: |
556 | | - for n in _patched: delattr(Path, n) |
557 | | - yield |
558 | | - finally: |
559 | | - for (n, f) in zip(_patched, patches): setattr(Path, n, f) |
560 | | - |
561 | 548 | # Cell |
562 | 549 | def bunzip(fn): |
563 | 550 | "bunzip `fn`, raising exception if output already exists" |
|
0 commit comments