question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing `utils_test` opens ports

See original GitHub issue

This is related to https://github.com/dask/distributed/issues/6806 & https://github.com/dask/distributed/issues/6897, but I thought it was separate enough to open an issue.

We import utils_test in xarray’s test suite. Currently importing distributed.utils_test does work, including opening ports.

I’m guessing this is caused by https://github.com/dask/distributed/blob/8b3dcadce88d55de81af2f0378d656203d5813ed/distributed/utils_test.py#L113

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!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jrbourbeaucommented, Oct 18, 2022

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 pytest distributed I got the network connection popups

0reactions
max-sixtycommented, Oct 18, 2022

Thanks @fjetter

Would you be interested in helping out cleaning this up a bit?

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…)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ways to check for open ports on RHEL
Hi, what are some of the ways to check for open ports on RHEL 7.5? ... import socket >>> clientsocket = socket.socket(socket.
Read more >
Sockets: Discover port availability using Java - Stack Overflow
While this question is about how to know if a given port is already in use, you may have landed here trying to...
Read more >
"Cannot use import statement outside a module" when i use ...
When I tried to use the library I got this error: If I only use jest or testing library they do work, I...
Read more >
Python - How to check if a port is in use - TwiN
Easily check if a port is open (in use) or closed using Python's socket library.
Read more >
HowTo: UNIX / Linux Open TCP / UDP Ports - nixCraft
Each TCP or UDP port is opened using a UNIX service or daemon such as Apache web server. You can also write a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found