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'
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
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
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
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
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
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
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.
-
Changes by Jason R. Coombs :
--
hgrepos: +88
keywords: +needs review, patch
___
Python tracker
<http://bugs.python.org/issue13211>
___
___
Python-bugs-list mailin
Changes by Jason R. Coombs :
Added file: http://bugs.python.org/file23627/fffeff7721c0.diff
___
Python tracker
<http://bugs.python.org/issue13211>
___
___
Python-bug
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
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
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
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.
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
Changes by Jason R. Coombs :
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue13211>
___
___
Python-bugs-list mailing list
Unsub
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
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=
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Jason R. Coombs :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12666>
___
___
Python-bugs-list
Changes by Jason R. Coombs :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13211>
___
___
Python-bugs-list
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
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
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
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
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
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
Changes by Jason R. Coombs :
--
title: Document the Action API -> Document the Action API in argparse
___
Python tracker
<http://bugs.python.org/issu
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
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
> @
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
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
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
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
R. David Murray added the comment:
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue13502>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Changes by Jason R. Coombs :
--
hgrepos: +95
___
Python tracker
<http://bugs.python.org/issue13540>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Jason R. Coombs :
--
keywords: +patch
Added file: http://bugs.python.org/file23949/956c6d33a57d.diff
___
Python tracker
<http://bugs.python.org/issue13
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
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
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
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
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
Jason R. Coombs added the comment:
I believe the underlying cause of this issue is #13639.
--
___
Python tracker
<http://bugs.python.org/issue11638>
___
___
Pytho
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
Changes by Jason R. Coombs :
Added file: http://bugs.python.org/file24059/9e9ea96eb0dd.diff
___
Python tracker
<http://bugs.python.org/issue11638>
___
___
Python-bug
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
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
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
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
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
R. David Murray added the comment:
What is the motivation for providing a new function?
--
___
Python tracker
<http://bugs.python.org/issue8828>
___
___
Pytho
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
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
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
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
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
Changes by Jason R. Coombs :
--
keywords: +patch
Added file: http://bugs.python.org/file24092/774933cf7775.diff
___
Python tracker
<http://bugs.python.org/issue11
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
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
Changes by Jason R. Coombs :
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue13664>
___
___
Python-bugs-list mailing list
Unsub
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
Changes by Jason R. Coombs :
Added file: http://bugs.python.org/file24095/dc1045d08bd8.diff
___
Python tracker
<http://bugs.python.org/issue11638>
___
___
Python-bug
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
201 - 300 of 12187 matches
Mail list logo