[issue7322] Socket timeout can cause file-like readline() method to lose data

2011-10-20 Thread R. David Murray
R. David Murray added the comment: This patch has caused a non-trivial regression between 3.2 and 3.2.1. The scenario in which I observed it is poplib. I create a POP3 connection with a timeout. At one point in its processing, poplib is reading lines until it gets a line '.\r\n'

[issue7322] Socket timeout can cause file-like readline() method to lose data

2011-10-20 Thread R. David Murray
R. David Murray added the comment: I don't think it is optimistic. The poplib transaction pattern is: send a command, get a response. If the response is not properly terminated, throw it away. Send a new command, get a response. There's no ambiguity there. In addition, this i

[issue13236] unittest needs more flush calls

2011-10-20 Thread R. David Murray
R. David Murray added the comment: How can a lack of flushes lose output? Delay it maybe, but unless your file class is broken I don't see how data would be lost. -- nosy: +r.david.murray versions: -Python 2.6 ___ Python tracker

[issue7322] Socket timeout can cause file-like readline() method to lose data

2011-10-20 Thread R. David Murray
R. David Murray added the comment: Your suggestion sounds good to me. I still think that it is a common failure mode in a client server transaction for the server to fail to send a (complete) line that the client is expecting, and vice versa, requiring a timeout, but not necessarily a

[issue13254] maildir.items() broken

2011-10-24 Thread R. David Murray
R. David Murray added the comment: I'm assigning this to myself so I don't lose it, but if someone wants to work on a patch please do. It'll be a bit before I can look at it. -- assignee: -> r.david.murray priority: normal -> high s

[issue13254] maildir.items() broken

2011-10-24 Thread R. David Murray
R. David Murray added the comment: Since this is a regression I'm upping the priority further to release blocker, so that we don't put out another release with the regression still in it. -- nosy: +benjamin.peterson, georg.brandl priority: high -> re

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-10-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: I scanned through the libs for Python 2.7, 3.2, and 3.3 and there is no construction of HTTPError that does not pass a string for msg. I believe it would be reasonable to alias reason to msg. I'll put together the chang

[issue13351] Strange time complexity when creating nested lists

2011-11-05 Thread R. David Murray
R. David Murray added the comment: In the case of 'lists' an object is being allocated each time through the inner loop. In the case of simple_lists, no such allocation is being done. Your timing issues are probably related to the memory allocation behavior of your system. -

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-07 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: +88 keywords: +needs review, patch ___ Python tracker <http://bugs.python.org/issue13211> ___ ___ Python-bugs-list mailin

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-07 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file23627/fffeff7721c0.diff ___ Python tracker <http://bugs.python.org/issue13211> ___ ___ Python-bug

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-07 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've created three changesets, addressing the issue in 2.7, 3.2, and 3.3, including tests. Please review and comment. If there are no objections, I'll push the changesets after 24 hours. -- ___ Pyth

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-11-07 Thread R. David Murray
R. David Murray added the comment: Unless I misunderstand your concerns, this is a duplicate of issue 665194. -- nosy: +r.david.murray resolution: -> duplicate status: open -> closed superseder: -> datetime-RFC2822 roundtripping ___ Pytho

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-11-07 Thread R. David Murray
R. David Murray added the comment: formatdate doesn't know anything about datetimes, so it doesn't make any sense to me to say that it doesn't notice changes in tzinfo. That's why the fix for issue 665194 introduces a new method for

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-07 Thread Jason R. Coombs
Jason R. Coombs added the comment: My initial instinct was to agree - the status code is useful. However, in looking at the FTP code, it sometimes just sets other objects (socket.error for example) as the 'reason'. The docs say 'reason' is a string or another exception.

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: That was my point. If HTTPError is a subclass of URLError, then an HTTPError _is an_ URLError, and thus should implement the same public interface. The problem is better illustrated with this request: try: urllib.request.urlopen('http://api.wordnik.c

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-11-08 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue13211> ___ ___ Python-bugs-list mailing list Unsub

[issue11937] Interix support

2011-11-10 Thread R. David Murray
R. David Murray added the comment: Just a note that buildbot does work behind a firewall (mine are set up that way). The client calls out to the master. A really restrictive corporate firewall may need outbound holes punched, but there are no inbound connections to the client

[issue13383] UnicodeDecodeError in distutils.core.setup when version is unicode

2011-11-11 Thread Jason R. Coombs
New submission from Jason R. Coombs : If the version or name passed to distutils.core.setup is unicode, this results in a UnicodeDecodeError. Consider this setup.py: from distutils.core import setup setup( name=u'issue13381', version=u'1.0', modules=

[issue11638] python setup.py sdist crashes if version is unicode

2011-11-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: First, the term 'gztar' doesn't appear in this ticket, and since the issue only applies when sdist --format gztar, I mention that here. Also, issue8396 suggests encoding using sys.getfilesystemencoding(). -- nosy

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread R. David Murray
R. David Murray added the comment: Yeah, I just haven't found time to do the revert yet (my first naive attempt using hg commands failed and I haven't found time to figure it out or do the reverse-patch method). -- ___ Python trac

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: Python 2.7 is not aware of symlinks and treats them like their targets, so it should be able to list a symlink directory or access a file within one. For example: PS C:\Users\jaraco> cmd /c dir Volume in drive C is system Volume Serial Number is 2455-9

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I should mention that there is third-party symlink support in jaraco.windows (http://pypi.python.org/pypi/jaraco.windows). Just easy_install it, and then use jaraco.windows.filesystem.symlink. If there are features you need for symlink support in

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: Brian, I'm still not sure I see the problem with os.listdir. It includes symlinks when listing a dir and traverses them naturally when referencing them as part of a path to listdir. Under what conditions does it

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: Some variables could be a missing privilege or role, or perhaps a UAC restriction. What error do you get when you attempt to invoke os.listdir on a symlink directory? -- ___ Python tracker <h

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: On Windows Vista and Windows 7, there should be a symlink directory: C:\Documents and Settings -> .\Users Perhaps a good test would be: assert 'Documents and Settings' in os.listdir('C:\\') As long as there aren't any i18n

[issue13412] Symbolic links omitted by os.listdir on some systems

2011-11-15 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- status: closed -> title: No knowledge of symlinks on Windows -> Symbolic links omitted by os.listdir on some systems ___ Python tracker <http://bugs.python.org/i

[issue6727] ImportError when package is symlinked on Windows

2011-11-17 Thread Jason R. Coombs
Jason R. Coombs added the comment: If this issue is important to you, please follow the link above to the Microsoft Connect site and vote for the issue. More votes should mean it will get more attention. Thanks. -- ___ Python tracker <h

[issue7750] IOError when launching script under pdb with backslash in script path

2011-11-17 Thread Jason R. Coombs
Jason R. Coombs added the comment: This bug doesn't appear to be present in 3.1, so the 2.7 patch is all that applies at this time. -- resolution: -> fixed status: open -> closed versions: -Python 2.6 ___ Python tracker <http://b

[issue13434] time.xmlrpc.com dead

2011-11-19 Thread R. David Murray
R. David Murray added the comment: We've had problems with this service going away for a while before. I think the test was marked skip for at least a year before someone (it might have been me) noticed that it was back and reactivated it. There's a ticket in here somewh

[issue13456] Providing a custom HTTPResponse class to HTTPConnection

2011-11-22 Thread R. David Murray
New submission from R. David Murray : The doc string for HTTPConnection.getresponse mentions (in broken English) that the instance's response_class attribute determines what class gets instantiated for a response. The docs do not mention this attribute, nor any other way to control

[issue13460] urllib methods should demand unicode, instead demand str

2011-11-22 Thread R. David Murray
R. David Murray added the comment: I suspect you want to be using Python3, then. Although it is nowhere near as simple as that...even with Python3 you still sometimes have to deal with the fact that the wire protocol is bytes. -- nosy: +r.david.murray resolution: -> out of d

[issue13464] HTTPResponse is missing an implementation of readinto

2011-11-23 Thread R. David Murray
New submission from R. David Murray : HTTPResponse subclasses RawIOBase, but does not provide an implementation of readinto, only read. This means that it is not conforming to the IO spec, and so it cannot be wrapped in a BufferedIOBase when using the C version of io. -- components

[issue13480] range exits loop without action when start is higher than end

2011-11-25 Thread R. David Murray
R. David Murray added the comment: Nope. If you want to count backward, use a negative step. Not doing anything if end is lower than start allows code to take advantage of "don't care" edge cases, just like 'abc'[4:] returning the empty string does. Range is often

[issue13460] urllib methods should demand unicode, instead demand str

2011-11-26 Thread R. David Murray
R. David Murray added the comment: Well, most of the point of Python3 is that the string type *is* unicode, which is what I meant by saying that you probably wanted Python3 in order to solve your concern :) There are still a few bugs to work out in the wire-protocol/unicode interface in

[issue6135] subprocess seems to use local encoding and give no choice

2011-11-28 Thread R. David Murray
R. David Murray added the comment: If you decide this is only a doc bug, please see also related issue 12832. -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue6

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2011-11-29 Thread R. David Murray
New submission from R. David Murray : The documentation for os.makedirs says: If the target directory with the same mode as specified already exists, raises an OSError exception if exist_ok is False, otherwise no exception is raised. This is not correct. If the file exists but the mode is

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-11-29 Thread R. David Murray
New submission from R. David Murray : The documentation for Event.wait says: This method returns the internal flag on exit, so it will always return True except if a timeout is given and the operation times out. In fact, however, if the thread that sets the flag immediately clears it, wait

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-11-29 Thread R. David Murray
R. David Murray added the comment: Thinking about it, if the flag's state if the wait does not expire is not guaranteed to be True, then what I really need is some way to know, when the wait call completes, whether or not it terminated because of a timeout or not. I can always quer

[issue13502] Event.wait sometimes returns False even when no timeout has occurred

2011-11-29 Thread R. David Murray
R. David Murray added the comment: Changing the title and component to reflect Antoine's new understanding :) -- components: +Library (Lib) -Documentation title: Documentation for Event.wait return value is either wrong or incomplete -> Event.wait sometimes returns False even

[issue12666] map semantic change not documented in What's New

2011-12-03 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12666> ___ ___ Python-bugs-list

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-12-03 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue13211> ___ ___ Python-bugs-list

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-12-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Antoine, I think Arfrever is on to something here. It does appear the new test added to test_urllib2 is failing, but for reasons I don't exactly understand. I'm initializing the HTTPError instance according to its signature in urllib.error, but i

[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-12-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: After yet another commit, the build bots are green again: http://hg.python.org/cpython/rev/8fa1dc66de5d -- ___ Python tracker <http://bugs.python.org/issue13

[issue1685453] email package should work better with unicode

2011-12-05 Thread R. David Murray
R. David Murray added the comment: That particular problem will get fixed in the next version of the email package (hopefully in Python3.3), but that isn't ready yet. -- ___ Python tracker <http://bugs.python.org/issu

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread R. David Murray
R. David Murray added the comment: I agree with you that this is inconsistent. However, having str raise an error is pretty much a non-starter as a suggestion. str always falls back to the repr; in general str(obj) should always return some value, otherwise the assumptions of a *lot* of

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread R. David Murray
R. David Murray added the comment: A diff would be great. We try to use warnings sparingly, and I don't think this is a case that warrants it. Possibly a .. note is worthwhile, perhaps with an example for the bytes case, but even that may be too much. I also wouldn't use the w

[issue13540] Document the Action API

2011-12-06 Thread Jason R. Coombs
New submission from Jason R. Coombs : In http://docs.python.org/dev/library/argparse.html#action, when describing an arbitrary action, the documentation states, "You can also specify an arbitrary action by passing an object that implements the Action API." This statement does not l

[issue13540] Document the Action API in argparse

2011-12-06 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- title: Document the Action API -> Document the Action API in argparse ___ Python tracker <http://bugs.python.org/issu

[issue13543] shlex with string ending in space gives "ValueError: No closing quotation"

2011-12-06 Thread R. David Murray
R. David Murray added the comment: Why do you consider this to be a bug? You set posix=False and whitespace_split=True, so it seems to me that according to the documented rules the " inside the word ("a is as documented not recognized as a quote character. If you use either pos

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-07 Thread R. David Murray
R. David Murray added the comment: On Wed, 07 Dec 2011 18:45:27 +, wrote: > ___ > diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst > --- a/Doc/library/threading.rst > +++ b/Doc/library/threading.rst > @

[issue1757072] Zipfile robustness

2011-12-08 Thread R. David Murray
R. David Murray added the comment: I'm pretty sure that what you are reporting has been fixed by the 'garbage' fix I mentioned (which might better be called the 'more flexible handling of comments' patch). Though not in 2.5 (or 2.6) since they are no longer in m

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-09 Thread R. David Murray
R. David Murray added the comment: "set to True, either before the wait call or after the wait starts" -- ___ Python tracker <http://bugs.python.o

[issue13543] shlex with string ending in space gives "ValueError: No closing quotation"

2011-12-09 Thread R. David Murray
R. David Murray added the comment: And just for your information, as far as I know *no one* knows what standard (or model) non-posix mode shlex is based on. -- ___ Python tracker <http://bugs.python.org/issue13

[issue1757072] Zipfile robustness

2011-12-09 Thread R. David Murray
R. David Murray added the comment: Here's the patch: http://hg.python.org/cpython/rev/cc3255a707c7/ I thought I remembered getting it in to 2.7.2, but my memory is evidently wrong. It has been applied, but is not yet in the released version o

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-10 Thread R. David Murray
R. David Murray added the comment: LGTM. -- ___ Python tracker <http://bugs.python.org/issue13502> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread R. David Murray
R. David Murray added the comment: So isn't this saying that this is a problem with the distribution packaging and not with CPython itself? -- nosy: +barry, r.david.murray ___ Python tracker <http://bugs.python.org/is

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: You're right. The documentation isn't incorrect, if you're splitting hairs. But it's not super friendly either. Questions that the documentation should answer: 1) Does the action always need to be a subclass of an Action, or is that

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: +95 ___ Python tracker <http://bugs.python.org/issue13540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've attached a repository and patch with the recommended changes. I created an additional section that includes the documentation for the Action class (specifically the __init__ and __call__ signatures). I believe this addresses the issues I raised

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- keywords: +patch Added file: http://bugs.python.org/file23949/956c6d33a57d.diff ___ Python tracker <http://bugs.python.org/issue13

[issue13540] Document the Action API in argparse

2011-12-14 Thread Jason R. Coombs
Jason R. Coombs added the comment: Most of the Action subclasses in argparse override __init__ and they raise ValueErrors when the parameters aren't as expected for that argument. This was my reason for adding that comment. If the basic Actions require this level of validation, would

[issue11867] Make test_mailbox deterministic

2011-12-18 Thread R. David Murray
R. David Murray added the comment: Probably because I'm a threading/multiprocessing neophyte :) (Though I just learned a bunch about programming with threads recently...) -- ___ Python tracker <http://bugs.python.org/is

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: I meant to paste the repro with distutils.core: python -c "from distutils.core import setup; setup(name=u'foo')" sdist --formats gztar -- ___ Python tracker <http://bug

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: This error is also encountered if the package name is unicode. The error can be simply reproduced with this command: python -c "from setuptools import setup; setup(name=u'foo')" sdist --formats gztar The error also occurs with th

[issue13639] UnicodeDecodeError when creating tar.gz with unicode name

2011-12-19 Thread Jason R. Coombs
New submission from Jason R. Coombs : python -c "import tarfile; tarfile.open(u'hello.tar.gz', 'w|gz')" produces Traceback (most recent call last): File "", line 1, in File "C:\Users\jaraco\projects\public\cpython\Lib\tarfile.py", line 1

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe the underlying cause of this issue is #13639. -- ___ Python tracker <http://bugs.python.org/issue11638> ___ ___ Pytho

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've created a repo to continue this work. I've integrated David's patch (thanks). It's not obvious to me what the encoding should be. Python and the tarfile module can accept unicode filenames. It seems that only the gzip part of

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-19 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file24059/9e9ea96eb0dd.diff ___ Python tracker <http://bugs.python.org/issue11638> ___ ___ Python-bug

[issue13643] 'ascii' is a bad filesystem default encoding

2011-12-20 Thread R. David Murray
R. David Murray added the comment: I'm not sure why having a locale set to C or something invalid should be considered a Python bug. You have to handle un-decodable filenames no matter what you do, since things aren't always encoded in utf-8 on non-OSX unix even when that is

[issue13639] UnicodeDecodeError when creating tar.gz with unicode name

2011-12-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: That looks like a good patch to me. Do you want to commit it, or would you rather I do? -- ___ Python tracker <http://bugs.python.org/issue13

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: > > Encoding to 'utf-8' or the default file system encoding doesn't seem > > right (as the characters end up getting stored in the gzip archive itself). > I don’t understand. The characters are being stored in the gzip archive as

[issue13643] 'ascii' is a bad filesystem default encoding

2011-12-21 Thread R. David Murray
R. David Murray added the comment: > But currently everything handling filenames as unicode on > nix needs to worry about surrogates (that can't be encoded > as ascii) already, or it will still be passing values that > can't be interpreted by other processes as you highli

[issue13643] 'ascii' is a bad filesystem default encoding

2011-12-21 Thread R. David Murray
R. David Murray added the comment: > _My_ locale is set properly. The problem is all the other > people in the world who do not have their locale set to match > their files on disk; telling them each to fix it is tedious. > But perhaps the OS is the best place to address th

[issue8828] Atomic function to rename a file

2011-12-23 Thread R. David Murray
R. David Murray added the comment: What is the motivation for providing a new function? -- ___ Python tracker <http://bugs.python.org/issue8828> ___ ___ Pytho

[issue8828] Atomic function to rename a file

2011-12-23 Thread R. David Murray
R. David Murray added the comment: Ah, I see, people may be depending on rename on Windows not overwriting. I suppose a new function (and eventually deprecating the old?) would be the most straightforward way forward, though I dislike the necessity :) An alternative might be a flag on rename

[issue8828] Atomic function to rename a file

2011-12-23 Thread R. David Murray
R. David Murray added the comment: I'm good with None/True, but that would imply that for posix rename we'll need to implement the overwrite=False option...which would be a nice thing (the shell mv command has -i for that). I think a warning would be good, because a unix progr

[issue8828] Atomic function to rename a file

2011-12-23 Thread R. David Murray
R. David Murray added the comment: Ah, you are right about the race of course. So yes, I agree with your proposal. It's a weird API, but probably the best we can do. -- ___ Python tracker <http://bugs.python.org/i

[issue8828] Atomic function to rename a file

2011-12-23 Thread R. David Murray
R. David Murray added the comment: So maybe my warning idea isn't such a bad idea :) As a unix programmer, I was very surprised to read in this thread that Windows doesn't overwrite the file on rename. As a unix programmer, I don't check for errors on a rename, because I ex

[issue13639] UnicodeDecodeError when creating tar.gz with unicode name

2011-12-25 Thread Jason R. Coombs
Jason R. Coombs added the comment: I also feel (1) or (3) is best for this issue. If there is a _better_ implementation, it should be reserved for a separate improvement to Python 3.2+. I lean slightly toward (3) because it would support filenames with Unicode characters other than latin-1

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-25 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- keywords: +patch Added file: http://bugs.python.org/file24092/774933cf7775.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-25 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks to Lars for suggesting the fix, replacing 'w|gz' with 'w:gz'. I attempted this change in the latest revision of my fork (774933cf7775.diff). While this change does address the issue if a unicode string is passed which can be encod

[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2011-12-26 Thread Jason R. Coombs
New submission from Jason R. Coombs : While investigating #11638, I encountered another encoding issue related to tarballs. Consider this command: python -c "import gzip; gzip.GzipFile(u'\xe5rchive', 'w', fileobj=open(u'\xe5rchive', 'wb'))&qu

[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2011-12-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue13664> ___ ___ Python-bugs-list mailing list Unsub

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've captured the cause of the UnicodeEncodeErrors as #13664. After rebasing the changes to include the fix for #13639, I found that the tests were still failing until I also reverted the patch to call tarfile.open with 'w:gz'. Now all the

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file24095/dc1045d08bd8.diff ___ Python tracker <http://bugs.python.org/issue11638> ___ ___ Python-bug

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: Since the tests now pass, and the only changes were to the tests, I've pushed them to the master. And with that I'm marking this ticket as closed. -- status: open -> closed ___ Python t

[issue13665] TypeError: string or integer address expected instead of str instance

2011-12-26 Thread Jason R. Coombs
New submission from Jason R. Coombs : When constructing a ctypes.c_char_p with a unicode string, a confusing error message is reported: > python -c "import ctypes; ctypes.c_char_p('foo')" Traceback (most recent call last): File "", line 1, in TypeError: s

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: > That's a shame. I tested it in advance. I'll correct or revert tonight or > tomorrow. -- title: python setup.py sdist --formats tar* crashes if version is unicode -> python setup.py sdist --formats tar* crashes if versionis

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've limited the scope of the patch to attempt to only test on those platforms that can actually create unicode-named files. I'll watch the buildbots to see if that corrects the failures (since I don't have the failing platforms

[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: The changes to the default branch seem to have cleaned up the test failures on most platforms (still waiting on the ARM results). So I've backported the test skips to the Python 2.7 branch as well. -- ___ P

[issue13693] email.Header.Header incorrect/non-smart on international charset address fields

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Actually, no, the local part cannot be in anything other than ascii (see RFC 5335, which desires to address this problem among others). Also, an encoded word cannot occur inside quotation marks. If you correct those two bugs, you can generate an RFC-valid

[issue10839] email module should not allow some header field repetitions

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Regardless of what anybody thinks about the design, it is what it is and can't be changed for backward compatibility reasons. The best we can do is reject creating duplicate headers for headers that may only appear once. That feature has already

[issue1467619] Header.decode_header eats up spaces

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Antoine, I marked this for Python 3.3 only because there is no good way to fix it in 2.7/3.2. (If someone comes up with a way I'll be happy to review it, though!) -- versions: -Python 2.7, Python 3.2 ___ P

[issue1079] decode_header does not follow RFC 2047

2012-01-02 Thread R. David Murray
R. David Murray added the comment: The RFC isn't at all vague about encoded words not separated by white space. That isn't allowed by the BNF. As you say, though, they occur in the wild and should be parsed correctly. In your other point I think you mean "immediatel

[issue13698] Mailbox module should support other mbox formats in addition to mboxo

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Well, supporting the other variants would be good (I'll review any proposed patches), but I think the default will have to stay mboxo for backward compatibility reasons (unless the consensus is to go through the warning/deprecation cycle to change it)

[issue13700] imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism

2012-01-02 Thread R. David Murray
R. David Murray added the comment: The first argument to authenticate must be bytes. This is not well documented. It might also be a bug, since I'm not sure anyone has done a thorough audit of what should be bytes and what should be string in imaplib. 3.1 no longer gets bug fixes, s

[issue13700] imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Gah, I was looking at the wrong source code when I wrote that. A string first argument is indeed valid. I'm not sure where the problem is coming from since the internal CRAM_MD5 returns a string and that seems to

[issue13700] imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism

2012-01-02 Thread R. David Murray
R. David Murray added the comment: Bytes definitely. We hashed that out a while ago. My point is that CRAM_MD5 login calls authenticate, and its authenticator returns a string, just like your example does. So it ought to be going through the same code path. I haven't followed the log

[issue1079] decode_header does not follow RFC 2047

2012-01-03 Thread R. David Murray
R. David Murray added the comment: Well, a caution that tweaking the regex can have unexpected consequences as past issues have proven (but by all means go for it), and a note that the parsing strategy is going to change completely in email6 (see http://pypi.python.org/email and http

[issue1079] decode_header does not follow RFC 2047

2012-01-03 Thread R. David Murray
R. David Murray added the comment: Gah, that's what I get for not reading carefully (or looking at the patch first). Your test change is fine, of course. -- ___ Python tracker <http://bugs.python.org/i

<    1   2   3   4   5   6   7   8   9   10   >