[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2010-08-25 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: I've also run into this problem after upgrading to Python 2.6.6. My code, which uses the same HTTPBasicAuthHandler instance for many requests to the same server, worked correctly with Python 2.6.2 and broke with 2.6.6. It would be great if zenyatta&#x

[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-12 Thread Dmitry Jemerov
New submission from Dmitry Jemerov : I'm trying to download a file from a site using HTTP authentication. I'm subclassing FancyURLOpener, returning my credentials from the prompt_user_passwd() method, and using opener.retrieve() to download the file. I get the following error:

[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-13 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: from urllib.request import * opener = FancyURLopener() opener.retrieve("http://username:passw...@google.com/index.html";, "index.html") -- ___ Python tracker <http://bu

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-06 Thread Dmitry Jemerov
New submission from Dmitry Jemerov: On Mac OS X 10.8 with the default language set to English (System Preferences | Language and Text), the default terminal application sets the LC_CTYPE environment variable to "UTF-8". If you run Python from the terminal and t

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-06 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: Judging from the results of Googling for the error message, I'm far from the only one seeing this problem. What exactly would be the benefit of adding the code to check for the platform? -- ___ Python tr

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-06 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: Why exactly does this matter? UTF-8 not being a valid LC_CTYPE value simply means that no one running Linux will ever have LC_CTYPE set to UTF-8, and the branch will never be hit. OTOH, adding the check will make the code harder to test and simply larger (no

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-06 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: A related issue (with a patch that touches the same locale parsing code) is http://bugs.python.org/issue5815 -- ___ Python tracker <http://bugs.python.org/issue18

[issue5815] locale.getdefaultlocale() missing corner case

2013-07-06 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: A related issue (a case which isn't taken into account by Serhiy's patch) is http://bugs.python.org/issue18378 -- nosy: +Dmitry.Jemerov ___ Python tracker <http://bugs.python.

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-10 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: I personally don't, but the function is used by Sphinx, which is what I was trying to get to work when I ran into this problem. -- ___ Python tracker <http://bugs.python.org/is

[issue17143] trace.py uses _warn without importing it

2013-02-06 Thread Dmitry Jemerov
New submission from Dmitry Jemerov: trace.py in Python 3.3 standard library uses the _warn function without importing it. As a result, an attempt to use a now-deprecated function fails with a NameError: > python3 Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple

[issue17143] trace.py uses _warn without importing it

2013-02-06 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: Workaround: "import warnings; trace._warn = warnings.warn" after importing trace -- ___ Python tracker <http://bugs.python.o

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

2010-07-18 Thread Dmitry Jemerov
New submission from Dmitry Jemerov : On Windows, mimetypes initialization reads the list of MIME types from the Windows registry. It assumes that all characters are Latin-1 encoded, and fails when it's not the case, with the following exception: Traceback (most recent call last):

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

2010-07-20 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: The problem doesn't happen on Python 3.1.2 because it doesn't have the code in mimetypes that accesses the Windows registry. Haven't tried the 3.2 alphas yet. -- ___ Python tracker <http

[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-07-23 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: Patch (with unittest) attached. -- keywords: +patch Added file: http://bugs.python.org/file18139/8123.patch ___ Python tracker <http://bugs.python.org/issue8

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

2010-07-23 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: Patch (suggested fix and unittest) attached. -- keywords: +patch Added file: http://bugs.python.org/file18143/9291.patch ___ Python tracker <http://bugs.python.org/issue9

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

2010-07-23 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: And by the way I've verified that the problem doesn't happen in py3k trunk. -- ___ Python tracker <http://bugs.python.

[issue9360] nntplib cleanup

2010-07-23 Thread Dmitry Jemerov
New submission from Dmitry Jemerov : The patch performs an extensive cleanup of nntplib: - Change API methods to return strings instead of bytes. This breaks API compatibility, but given that the parameters need to be passed as strings and many of the returned values would need to be passed

[issue9360] nntplib cleanup

2010-07-23 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: This is an issue only for the actual article content, right? I'll be happy to extend the API to allow getting the original bytes of the article content, while keeping the rest of API (like group names) string-