[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2013-11-14 Thread adamhj
adamhj added the comment: > The encoding is wrong. We should read the registry using Unicode, or at least > use the correct encoding. The correct encoding is the ANSI code page: > sys.getfilesystemencoding(). > Can you please try with: default_encoding = sys.getfilesystemencodi

[issue19567] mimetypes.init() raise unhandled excption in windows

2013-11-12 Thread adamhj
New submission from adamhj: my system is windows 2k3 sp2, python version is 2.7.6 i found this bug when trying to install the newest setuptools X:\xxx>ez_setup.py Extracting in d:\docume~1\xxx\locals~1\temp\tmpcyxs8s

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj added the comment: ah just ignore my previous msg as i post it without seeing yours. > Nope. It means that *before* showing up the socket was *not* connected. ok, i read more in the asyncore source and finally understand what do you mean by "A non connected socket must be wri

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj added the comment: here is a script emulating what is happened in dispatcher class when the second bug triggered. you can use either a non-exist host/port, or a high delay remote port as target(see the comments in the script) and you may use a sniffer(tcpdump/wireshark e.g.) with the

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj added the comment: > A non connected socket must be writable in order to connect. i can't understand this, does it means that one may use self.connect() in handle_write()? and in fact i found something seems opposite on this page: http://docs.python.org/howto/sockets.html &quo

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-02 Thread adamhj
New submission from adamhj : i found 2 relative bugs in asyncore.dispatcher_with_send class: one is in the asyncore.dispatcher_with_send.writable(): def writable(self): return (not self.connected) or len(self.out_buffer) why is a not connected connection writable? i think this is