-
-
Notifications
You must be signed in to change notification settings - Fork 732
Importing utils_test
opens ports
#7139
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
Comments
I don't see this is macOS. I'm curious what My guess is that this doesn't happen for folks using Python installed via conda and so this hasn't come up before. |
When I tried this initially I also wasn't able to reproduce. But when I went to my "Security & Privacy" settings I saw that I had my firewall turned off. When I enabled the firewall and then ran |
I'm not surprised about this. For instance we have stuff like
distributed/distributed/utils.py Lines 178 to 185 in be7d8f8
However, I don't see anything in utils_test that would do something like that |
Thanks for repro-ing @jrbourbeau As an outside observer — I think it's fine to do these where necessary — but in a fixture with e.g. To answer the question above — I have python installed with brew. |
I think we all agree here. I don't think this was put in on purpose but rather due to negligence/ignorance. I'm very open to change how the tests are setup. Would you be interested in helping out cleaning this up a bit? |
Thanks @fjetter
I appreciate the question and empathize with the sentiment. Unfortunately between xarray & PRQL I have my hands full (and, to be transparent, can get around the problem when running xarray tests by uninstalling dask...) |
This is related to #6806 & #6897, but I thought it was separate enough to open an issue.
We import
utils_test
in xarray's test suite. Currently importingdistributed.utils_test
does work, including opening ports.I'm guessing this is caused by
distributed/distributed/utils_test.py
Line 113 in 8b3dcad
Beyond just doing more work than I'd expect on import — on a MacOS machine, it pops open a system dialog asking whether that's OK, every time. And if someone is running something on each file save, this happens on every file save. By default, VSCode will search for tests on every file save, so will trigger this.
I don't have enough context to know for sure whether there's some immovable constraint that requires this. But would it be possible to put that in a fixture?
Thanks as ever!
The text was updated successfully, but these errors were encountered: