distributed
distributed copied to clipboard
Avoid signaling outside main thread when starting jupyter server
Closes #6886
@mrocklin dunno if I was taking @Carreau too literally here but this does resolve the issue (i.e. the example from the issue now succeeds). Not sure if it's bad form to be actually overriding these class methods, maybe we want to subclass or something?
Unit Test Results
See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.
15 files ± 0 15 suites ±0 6h 26m 26s :stopwatch: + 13m 13s 3 107 tests + 6 3 021 :heavy_check_mark: + 6 85 :zzz: ±0 1 :x: ±0 22 997 runs +43 22 090 :heavy_check_mark: +43 906 :zzz: ±0 1 :x: ±0
For more details on these failures, see this check.
Results for commit 8439f353. ± Comparison against base commit 1fd07f03.
:recycle: This comment has been updated with latest results.
You took me literally enough. Though I think you need to patch the class (or subclass) before creating the instance.
Huh I would have thought so too but evidently not...
[ins] In [23]: class A():
...: def f(self):
...: print("A")
...: a = A()
...: a.f()
...:
...: A.f = lambda self: print("B")
...: a.f()
A
B
but regardless yeah I agree that seems like the right thing to do
@mrocklin any thoughts on this? obviously kind of a niche use case within a niche use case but seems pretty safe to me...?
Seems reasonable to me -- I'd like an explanatory comment, but otherwise LGTM
Thanks @jrbourbeau and @ian-r-rose, I added a simple test and comment