[issue10865] chroot-ing breaks encodings.idna

2011-01-08 Thread ulidtko
ulidtko added the comment: Ok, I can do it with socket.gethostbyname(). Thanks for clarifications. -- ___ Python tracker ___ ___ Pyt

[issue10865] chroot-ing breaks encodings.idna

2011-01-08 Thread ulidtko
ulidtko added the comment: Can I perform a name resolution before chrooting, save the result and use it later for creating an instance of http.server.HTTPServer, as a workaround? -- ___ Python tracker ___

[issue10865] chroot-ing breaks encodings.idna

2011-01-08 Thread Georg Brandl
Georg Brandl added the comment: This is not a bug in Python: name resolution may not work in the chroot unless you add the libraries that are loaded on the fly by the libc. It *may* also work if you make one name resolution (using socket.getaddressinfo for example) *before* chrooting. To dem

[issue10865] chroot-ing breaks encodings.idna

2011-01-07 Thread ulidtko
New submission from ulidtko : Consider the following test script: import os import urllib.request os.chroot("/tmp") urllib.request.urlopen("http://localhost";) When executed with enough privileges, the script terminates with the following traceback: Traceback (most recent call last): Fil