[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS
Sorin Sbarnea added the comment: I am able to reproduce this bug with Python 3.10 on MacOS 12.2 too, and I happen to have some extra insights about what happens, see https://github.com/tox-dev/tox/issues/2375 Basically the culprit is a reverse-dns query (PTR) that takes 30s to return, causing that very long delay. It appears that mDNSResponder is able to cache the result for some time but not very long, so it will happen again. In my particular case that PTR query is an .ip6.arpa one and there is no ipv4 query made at all. I was not able to identify any similar delay while calling `scutil --get HostName` or `hostname`, but `socket.getfqdn()` does reproduce it reliably. Interestingly, it seems that the delay is at least sometimes 15s, maybe the delay of 30s I observed on tox was caused by two calls. Anyway, I am more than interested in finding a solution for this issue. Such a delays can be a real dealbreaker even for cli tools. -- versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue35164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS
Sorin Sbarnea added the comment: Maybe I should mention that my networking is configured only with values received from the DHCP server, which includes 2 DNS servers, one ipv4 an done ipv6, both of them being the local router and *1* search domain, which is a real domain (not local). -- ___ Python tracker <https://bugs.python.org/issue35164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44497] distutil findall can choke with recursive symlinks (performance)
New submission from Sorin Sbarnea : As the results of investigating a very poor performance of pip while trying to install some code I was able to identify that the root cause was the current implementation of distutils.filelist.findall or to be more precise the _find_all_simple function, which does followsymlinks but without any measures for preventing recursivity and duplicates. To give an idea in my case it was taking 5-10minutes to run while the CPU was at 100%, for a repository with 95k files (most of them temp inside .tox folders). Removal of the symlinks did make it run in ~5s. IMHO, _find_all_simple should normalize paths and avoid returning any duplicates. Realted: https://bugs.launchpad.net/pbr/+bug/1933311 -- components: Distutils messages: 396394 nosy: dstufft, eric.araujo, ssbarnea priority: normal severity: normal status: open title: distutil findall can choke with recursive symlinks (performance) versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44497> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44497] distutil findall can choke with recursive symlinks (performance)
Change by Sorin Sbarnea : -- type: -> performance ___ Python tracker <https://bugs.python.org/issue44497> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44497] distutil findall can choke with recursive symlinks (performance)
Change by Sorin Sbarnea : -- keywords: +patch pull_requests: +25448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26873 ___ Python tracker <https://bugs.python.org/issue44497> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41973] Docs: TypedDict is now of type function instead of class
Change by Sorin Sbarnea : -- nosy: +ssbarnea ___ Python tracker <https://bugs.python.org/issue41973> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25351] pyvenv activate script failure with specific bash option
Sorin Sbarnea added the comment: Based on my tests this worked with all shells I tested with, the syntax being a very old one and not some new/modern one. Passed: bash, zsh, dash, ksh Platforms: MacOS, RHEL Linux Failed with: tcsh but with the note that even the original code would fail with tcsh anyway. tcsh/csh are not bourne/posix compatible so there is no regression introduced by the the use of "${VAR:-}" syntax. A simple way to test the syntax with enable shell is: SHELLCMD -c 'echo "[${AAA:-}]"' -- ___ Python tracker <https://bugs.python.org/issue25351> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31973] Incomplete DeprecationWarning for async/await keywords
Sorin Sbarnea added the comment: I agree that this deprecation approach is not very helpful because it does not indicate a recommended way to fix. Yep, we all know that we will be forced to rename these parameters/variables everywhere and likely break few APIs due to it. I am curious if there is any emerging pattern for new naming as I find really annoying if every python project using these keywords would endup picking different alternatives for their rename. -- nosy: +sorin ___ Python tracker <https://bugs.python.org/issue31973> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS
New submission from Sorin Sbarnea : It seems that when the MacOS machine does not have a FQDN name manually configured using `scutil`, python will be fail to resolve domain names and timeout after ~30 seconds. I mention that the DNS resolution works correctly on the machine and that the DHCP servers provides one ore more domains to be useles for resolution. Tools like nslookup or ping are not affected by this, only python (tried py27,34-36 and got same behavior). Usually python user encounters errors like: Traceback (most recent call last): ... socket.gethostbyname(socket.gethostname()) gaierror: [Errno 8] nodename nor servname provided, or not known One these machines `hostname` cli command returns a valid FQDN name like `foo.lan` but scutil will not return one: ``` sudo scutil --get HostName HostName: not set ``` One temporary workaround is to manually run: ``` sudo scutil --set HostName `hostname` ``` This will set the hostname and python sockets functions will start to work (after few minutes as some caching is involved). Still, we cannot expect users to run this command themselves. Even worse, they would have to re-run this each time the roam to another network that may have a different set of domains. See: https://stackoverflow.com/questions/52602107 -- components: macOS messages: 329237 nosy: ned.deily, ronaldoussoren, ssbarnea priority: normal severity: normal status: open title: socket.getfqdn and socket.gethostbyname fail on MacOS type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue35164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12
Sorin Sbarnea added the comment: It seems that the bug is still present. There is some additional information on the new report https://bugs.python.org/issue35164 -- nosy: +ssbarnea ___ Python tracker <https://bugs.python.org/issue29705> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com