[issue46625] timeout option of socket.create_connection is not respected
New submission from Nicolas SURRIBAS : When passing to socket.create_connection a timeout option above (approximately) 127 seconds, the timeout is not respected. Code to reproduce the issue : import socket from time import monotonic print(socket.getdefaulttimeout()) start = monotonic() try: socket.create_connection(("1.1.1.1", 21), 300) except Exception as exception: print(exception) print(monotonic() - start) Output at execution: None [Errno 110] Connection timed out 129.3075186319984 Expected behavior would be that the "Connection timed out" exception is raised after 300 seconds, as given in argument, not 129. Observed with Python 3.9.1 -- components: IO messages: 412443 nosy: Nicolas SURRIBAS priority: normal severity: normal status: open title: timeout option of socket.create_connection is not respected type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue46625> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46284] DirEntry returns invalid values for is_dir and is_file on NFS
New submission from Nicolas SURRIBAS : Hello, I bumped into this strange behavior several times when using os.scandir on mounted NFS shares. I'm using Python 3.9.1 >>> path = b'/mnt/nfs_share/sdb1/System Volume Information/' >>> l = list(os.scandir(path)) >>> print(l[2].name) b'WPSettings.dat' >>> print(l[2].path) b'/mnt/nfs_share/sdb1/System Volume Information/WPSettings.dat' >>> print(l[2].is_file()) False >>> print(l[2].is_dir()) True >>> print(os.path.isfile(l[2].path)) True >>> print(os.path.isdir(l[2].path)) False -- components: Library (Lib) messages: 409869 nosy: Nicolas SURRIBAS priority: normal severity: normal status: open title: DirEntry returns invalid values for is_dir and is_file on NFS type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue46284> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com