David-Sarah Hopwood added the comment:
"Is there a portable way to get the available disk space by now?"
No, but
http://tahoe-lafs.org/trac/tahoe-lafs/browser/src/allmydata/util/fileutil.py?rev=4894#L308
might be helpful (uses pywin32).
--
nosy: +
R. David Murray added the comment:
Haypo: I believe that the consensus we've come to is that you shouldn't have
to. FieldStorage should take a binary stream. So should cgi.parse. If
defaulting to sys.stdin, then if stdin is text, they should turn it in to a
binary stream ri
R. David Murray added the comment:
Ah, you are right. That makes the backward compatibility issue a lot worse :(
--
___
Python tracker
<http://bugs.python.org/issue4
R. David Murray added the comment:
Note that based on my experience with the conversion of compileall to
argparse,it is important to have good tests. Of course, regrtest itself has no
tests...
--
nosy: +r.david.murray
___
Python tracker
<h
R. David Murray added the comment:
I agree that not guessing would be better. But as long as we *are* guessing,
it seems to me that /usr/bin/python2.7 would be less wrong than
/usr/bin/python, for almost all modern unix systems.
--
___
Python
R. David Murray added the comment:
Here is a patch. Three of the tests currently fail due to what appears to be a
bug in the Header formatting routines. I'll have to look in to that before
finishing this issue.
Note that doing str on a message with binary headers can produce ove
Changes by R. David Murray :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue10686>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
I have a little bit of concern whether or not 'unknown-8bit' is the correct
charset to use. It seems to be the one in the RFCs, but I have a feeling it
may not be what is used "in the wild" in headers, so I am looking for opinions.
-
R. David Murray added the comment:
Well, unknown-8bit is registered as a charset with IANA. It is registered
specifically for use in message bodies, but as a registered charset it "should"
be acceptable in headers as well. There is no similar registration for just
'unknown&
R. David Murray added the comment:
Well, since unknown-8bit is a registered charset, it should be RFC-valid in an
encoded word. Whether or not any other mailer out there is going to be able to
handle it is a different question.
--
___
Python
R. David Murray added the comment:
There's no need for any deeper investigation. The answer is "nobody wrote the
patch". If someone writes a good patch, it will go in.
--
nosy: +r.david.murray
___
Python tracker
<http
R. David Murray added the comment:
No it doesn't. It has an arbitrary message string. That's the same as all
other exceptions that don't have special attributes.
--
nosy: +r.david.murray
status: open -> closed
___
Pyt
R. David Murray added the comment:
+1
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue10858>
___
___
Python-bugs-list mailing list
Unsub
R. David Murray added the comment:
Committed a revised version of the patch, including doc updates, in r87840.
While I haven't documented the way to alter what encoding name is used for the
unknown bytes, I did make it possible to do so (set charset.UNKNOWN8BIT to the
desired s
R. David Murray added the comment:
I agree that when dealing with prexisting folding it is better to preserve it.
The case I was talking about is, say, prepending re to a subject and refolding
it. It is the transformation step where I think turning fws into a single
space makes sense. But
R. David Murray added the comment:
Antoine didn't want to backport that patch. Does the fix applied in issue
678250 address this?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
I ran into a redirection loop when cookies were blocked from google, who should
know better. And then they had the gall to blacklist my ip for an attempted
DOS attack. So a feature request may not be out of order; but I for one would
not be motivated
R. David Murray added the comment:
Receiving no negative votes :), I've committed this to py3k in r87873, 3.1 in
r87874, and 2.7 in r87875.
Barry, Martin, do you think this should be backported as a security fix? I'm
thinking it should be.
--
nosy: +loewis
resolution:
David-Sarah Hopwood added the comment:
It is certainly possible to write Unicode to the console successfully using
WriteConsoleW. This works regardless of the console code page, including 65001.
The code http://tahoe-lafs.org/trac/tahoe-lafs/browser/src/allmydata/windows/fixups.py";
David-Sarah Hopwood added the comment:
Glenn Linderman wrote:
> I skipped the unmangling of command-line arguments, because it produced an
> error I didn't understand, about needing a buffer protocol.
If I understand correctly, that part isn't needed on Python 3 because issue
David-Sarah Hopwood added the comment:
The following code is being used to work around this issue for Python 2.x in
Tahoe-LAFS:
# This works around <http://bugs.python.org/issue2128>.
GetCommandLineW = WINFUNCTYPE(LPWSTR)(("GetCommandLineW", windll.kernel32))
Co
David-Sarah Hopwood added the comment:
Sorry, missed out the imports:
from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_int
from ctypes.wintypes import LPWSTR, LPCWSTR
--
___
Python tracker
<http://bugs.python.org/issue2
David-Sarah Hopwood added the comment:
haypo wrote:
> davidsarah wrote:
>> It is certainly possible to write Unicode to the console
>> successfully using WriteConsoleW
>
> Did you tried with characters not encodable to the code page and with
> character that cannot
David-Sarah Hopwood added the comment:
Don't use win32file.GetDiskFreeSpace; the underlying Windows API only supports
drives up to 2 GB
(http://blogs.msdn.com/b/oldnewthing/archive/2007/11/01/5807020.aspx). Use
GetFreeDiskSpaceEx, as the code I linked to does.
I'm not sure it make
David-Sarah Hopwood added the comment:
I'll have a look at the Py3k I/O internals and see what I can do.
(Reopening a bug appears to need Coordinator permissions.)
--
___
Python tracker
<http://bugs.python.org/i
R. David Murray added the comment:
The email package does have a 'parser headers only' mode, but it doesn't do
what you want, since it reads the remainder of the file and sets it as the
payload of the single, un-nested Message object it returns.
Adding a flag to tell it
Changes by R. David Murray :
--
versions: -Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/issue10879>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
I don't have time to review the patch or even respond in detail to the comments
right now, but I do want to respond about BytesFeedParser. It is true that
there is currently no interface to get the raw-bytes version of the header back
out of the Me
R. David Murray added the comment:
Well, imagine a web form that has a 'subject' text entry field, and the
application does Message['Subject'] = subject_from_form as it builds a Message
to hand off to smtp.sendmail. If the application didn't sanitize the subjec
R. David Murray added the comment:
Ah, I should clarify. A sensible web application should be dealing with any
multiline input it allows by turning it into a newline-less single line before
using it as a subject, so the probability that there are exploitable
applications out there is, I
David-Sarah Hopwood added the comment:
> The script unicode2.py uses the console STD_OUTPUT_HANDLE iff
> sys.stdout.fileno()==1.
You may have missed "if not_a_console(hStdout): real_stdout = False".
not_a_console uses GetFileType and GetConsoleMode to check whether that handle
David-Sarah Hopwood added the comment:
Note: Michael Kaplan's code checks whether GetConsoleMode failed due to
ERROR_INVALID_HANDLE. My code intentionally doesn't do that, because it is
correct and conservative to fall back to the non-console behaviour when there
is *any*
David-Sarah Hopwood added the comment:
Looking at
http://svn.python.org/view/python/branches/py3k/PC/getpathp.c?r1=73322&r2=73321&pathrev=73322
, wouldn't it be better to add a Py_WGETENV function? There are likely to be
other cases where that would be the correct
David-Sarah Hopwood added the comment:
"... os.dup2() ..."
Good point, thanks.
It would work to change os.dup2 so that if its second argument is 0, 1, or 2,
it calls _get_osfhandle to get the Windows handle for that fd, and then reruns
the console-detection logic. That would
R. David Murray added the comment:
Testing regrtest is distinctly non-trivial, since options have interactions
(some of the somewhat unobvious). Ideally we'd refactor the code so that we
could point it at a test test-directory so we could write some automated tests
for it :) But if yo
R. David Murray added the comment:
Note that it is also possible that after doing a review of the functionality,
there might be consensus to drop one or more options, which would be a good
thing overall, IMO.
--
___
Python tracker
<h
Changes by David-Sarah Hopwood :
--
nosy: +BreamoreBoy
versions: +Python 3.1, Python 3.2 -Python 3.3
Added file: http://bugs.python.org/file20360/doc-patch.diff
___
Python tracker
<http://bugs.python.org/issue1
Changes by David-Sarah Hopwood :
--
nosy: +BreamoreBoy
versions: +Python 3.1, Python 3.2 -Python 3.3
Added file: http://bugs.python.org/file20361/doc-patch.diff
___
Python tracker
<http://bugs.python.org/issue1
Changes by David-Sarah Hopwood :
Added file: http://bugs.python.org/file20362/doc-patch.diff
___
Python tracker
<http://bugs.python.org/issue1602>
___
___
Python-bug
Changes by David-Sarah Hopwood :
--
title: windows console doesn't print utf8 (Py30a2) -> windows console doesn't
print or input Unicode
Added file: http://bugs.python.org/file20363/doc-patch.diff
___
Python tracker
<http:/
R. David Murray added the comment:
Yes, the immanence of RC1 makes it really doubtful that this can be fixed in
3.2. Whether or not it can be fixed in 3.2.1 will depend on the nature of the
fix. If it changes behavior such that currently working uses of FieldStorage
(that don't deal
R. David Murray added the comment:
I've been intending to take a look at this issue at some point, but am not sure
when I'd get to it.
I took a quick look. It does seems to me that it is true that for data-validity
purposes the message files need to be opened in binary and fed to
R. David Murray added the comment:
It getting in to 3.2 would be a release manager call, so I've set it to release
blocker so Georg can make the call. My opinion is that while I would *really*
like to see this fixed in 3.2, the changes really should have a thorough
*design* review as
R. David Murray added the comment:
Victor: we normally leave the patch file that was committed attached to the
issue for future reference.
The _plus_tests file was just the original patch plus the existing cgi tests
adjusted to pass in bytes instead of strings to cgi, if I recall correctly
Changes by R. David Murray :
--
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
R. David Murray added the comment:
Adrian's suggestions don't look to me like they fiddle with the API, but rather
make the behavior match the documented API. The existing behavior is, IMO, a
very surprising corner case, especially to a less experienced Python
programmer. I do
Changes by R. David Murray :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> relative import broken
___
Python tracker
<http://bugs.python
R. David Murray added the comment:
08 is an invalid octal literal. See
http://docs.python.org/reference/lexical_analysis.html#integer-and-long-integer-literals
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status: open -&g
R. David Murray added the comment:
The reason that it is surprising is that the API is designed to allow an
arbitrary function to be called, with whatever arguments and keyword arguments
that function takes. The user of the API is not necessarily going to remember
that the first argument to
R. David Murray added the comment:
Yes, it's about the concurrent.futures 'submit' method:
http://docs.python.org/dev/py3k/library/concurrent.futures.html#executor-objects
I've updated the title to reflect this. There are other places in the stdlib
affected by this
R. David Murray added the comment:
Duplicate of issue 6306.
--
nosy: +r.david.murray
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> filecmp.cmp can not compare two files from different OS with
the
R. David Murray added the comment:
Name mangling applies only to attributes of classes, and so does not enter in
to this issue.
--
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
Adrian: you are correct of course, I was misremembering and did not check the
docs. I prefer the other solution, though.
--
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
telnetlib closes the socket, which in turn calls the OS level socket close
function. What happens after that is up to the OS tcp/ip stack, and is not
under Python's control. So if there is a bug here it isn't in Python.
--
nosy:
R. David Murray added the comment:
If I understand correctly, what Alexander means by "only work in the C locale"
is that both strptime and strftime are locale dependent, and so if the locale
is something other than C it may fail to parse the month name and may generate
a non-stan
R. David Murray added the comment:
Eric, could you point out the part of the specification that requires exactly a
string and makes a string subclass invalid? I did a quick scan and couldn't
find it, and unfortunately don't have the time to re-read the whole spec right
now.
-
R. David Murray added the comment:
As you say, "on some systems". The variation is documented, and the documented
codes are documented as being just those required by the C standard.
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status
R. David Murray added the comment:
OK. So he is saying that when the spec says "an object of type str" he means
'type(x) is str' as opposed to 'isinstance(x, str)'. I would naively have
expected the latter, as other people clearly do as well. I didn't par
R. David Murray added the comment:
All right, I'll open it back up for that suggestion (I've changed the title
accordingly) and let the docs folks decide. The most useful link would be one
to the relevant Windows documentation, since that's the hardest one to find.
Altho
R. David Murray added the comment:
This is indeed a doc problem, although there was some discussion of working
toward a method rename. See issue 8047 (but be prepared to read a novel to
understand why tostring returns bytes...) The doc for 3.2 is slightly clearer,
but both 3.1 and 3.2
R. David Murray added the comment:
I think the module should be reviewed and made consistent, as Antoine did for
nntplib. I don't know enough about the IMAP protocol to do such a review, or
even weigh in meaningfully on the immediate question, nor am I likely to have
time to learn e
R. David Murray added the comment:
Well, we recently added support for parsing binary data streams to the email
module (or added back, if you are looking at it from a python2 perspective),
exactly because "in the wild" headers are not always RFC compliant ASCII, and
because bodies
R. David Murray added the comment:
> 4. The explicit-vs-implicit is about the contract defined in the spec (making
> explicit what, precisely, is required of both parties), not the type test.
Perhaps a clarification in the () spec that 'type str' means "type(s) is
s
R. David Murray added the comment:
How is this different from issue 2409?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue10966>
___
___
R. David Murray added the comment:
On second reading I see one way it is different: you suggest to move the list
of expected skips out of regrtest. So, are you suggesting, essentially, that
support.import_module be replaced by an optional_import that takes arguments to
indicate on which
R. David Murray added the comment:
I think we have already been moving in this director for quite some time. Past
policy is to only change things when we are working on that area of code
anyway. If someone wants to make some specific proposals to simplify regrtest
by doing a wholesale move
R. David Murray added the comment:
I think we have already been moving in this direction for quite some time.
Past policy is to only change things when we are working on that area of code
anyway. If someone wants to make some specific proposals to simplify regrtest
by doing a wholesale
Changes by R. David Murray :
--
Removed message: http://bugs.python.org/msg126780
___
Python tracker
<http://bugs.python.org/issue10967>
___
___
Python-bugs-list m
R. David Murray added the comment:
Hmm. According to issue 4136, all bytes support was supposed to have been
removed.
--
nosy: +pitrou, r.david.murray
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
Ah, I see what you are getting at now. I was confused by the "raise SkipTest
directly" part, since the test suite currently does raise SkipTest instead of
ImportError. So the key change here is to make the test show as a *failure* on
those platf
Changes by R. David Murray :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue10943>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by R. David Murray :
--
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue10949>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
I almost closed this as invalid, since the name is, after all 'os.stat' and the
docs clearly say that it calls the 'stat' system call. However, I see that our
docs do not contain the more explicit language used by the 'stat'
R. David Murray added the comment:
See also issue 5831. That should probably be closed as a dup of this since
this has an explanation.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
Newline='' is indeed needed. It preserves the newlines so that the csv module
can correctly parse them according to the weird csv quoting roles. And for
output, the fact that it isn't documented there is a an issue that was only
n
Changes by R. David Murray :
--
nosy: +michael.foord
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue10979>
___
___
Python-bugs-list mai
R. David Murray added the comment:
I also would put increasing test coverage at a higher priority, but this sort
of refactoring can be a good step in the development path of new contributors,
and doing it does decrease the future maintenance burden
R. David Murray added the comment:
Rather than doing a code deprecation you can just do 'from shlex import quote'
in pipes (with a comment about backward compatibility). I don't think there is
any real harm in leaving that kind of backward compatibility in plac
Changes by R. David Murray :
--
nosy: +bethard
___
Python tracker
<http://bugs.python.org/issue10984>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
I don't think Georg considers it a bug in Sphinx, it's just how the
disambiguation machinery works. You can write :func:`~os.stat` if you want the
link text to just be 'stat' but the link to be to 'os.stat'.
I don't th
R. David Murray added the comment:
The API change would be generating an error if newline='' wasn't specified.
Amplifying the bytes-case error message would be fine, though. On the other
hand, we are in RC phase, and I'm not at all sure this is important enough to
go
R. David Murray added the comment:
Issue 9124 addresses the underlying problem here, so I'm closing this as a
duplicate.
--
nosy: +r.david.murray
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> Mailbox module should us
R. David Murray added the comment:
Please keep new tests for existing features and new features in separate
issues. A proposed code refactoring should also be a separate issue.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.
R. David Murray added the comment:
Yes, I know you have to do it anyway, that's why I used the adverb 'just' (as
in 'just that, and nothing more') (I note that 'just' as an adverb tends to
get overused by English speakers, and
Changes by R. David Murray :
--
assignee: docs@python -> r.david.murray
___
Python tracker
<http://bugs.python.org/issue10960>
___
___
Python-bugs-list mai
R. David Murray added the comment:
Thanks.
Committed a modified version of the patch in r88164. I extended your breakout
of the attributes to the other paragraphs, and reorganized the order of the
paragraphs in the stat docs to put things into a more logical order (I hope).
I decided to
New submission from R. David Murray :
Title pretty much says it all. The constants are there in the stat module, but
they aren't documented. When they are documented the mentions in the
os.chflags entry can be turned into cross reference links.
--
assignee: docs@python
mes
R. David Murray added the comment:
What about putting the addition option details in the epilog?
--
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
That might be handy. I thought you were trying to roughly reproduce the
current help (which dumps it all out at once), which is why I suggested epilog.
--
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
The text in the docstrings appears to be accurate, and it seems to me they
clarify it even more than your suggested changes do. Also, I think
SimpleCookie's encode/decode roughly implements some RFC or another (though
there are some tweaks), and it
R. David Murray added the comment:
anthony: this is python3-only problem.
--
___
Python tracker
<http://bugs.python.org/issue10976>
___
___
Python-bugs-list m
R. David Murray added the comment:
I'm afraid so. The python3 uptake process was expected to take five years
overall, and we are only up to about the second year at this point. So while
you may have been away from Python for 6 years, you came back right in the
middle of an unpreced
R. David Murray added the comment:
That should have been "too late to make API changes for 3.2".
--
___
Python tracker
<http://bugs.python.org/issue9124>
___
__
R. David Murray added the comment:
Hmm. Am I misunderstanding something about epilog, then? I thought it was
placed at the end of the other help text?
--
___
Python tracker
<http://bugs.python.org/issue10
R. David Murray added the comment:
I would say writing tests for regrtest is going to be a somewhat tricky task.
I think you will have to do some code tweaking to even be able to run certain
tests. I believe that regrtest currently has some built in assumptions about
the test directory (ie
R. David Murray added the comment:
Thanks, Victor, you beat me to it :) I'll see if I can review this tomorrow,
or if not I can probably do it Thursday.
I reverted r88197 because it was incorrect and caused an email test to fail.
Once I come up with a test for it I'll fix it cor
R. David Murray added the comment:
Haypo: yeah, in an ideal world Generator would use get_payload() and not
_payload, but I had to make some compromises with purity of model separation in
order to achieve the practical goal of handling bytes usefully. I'd like to
fix that as I work on
New submission from R. David Murray :
This was discovered by Haypo during work on #9124. I'll attach a patch with
test shortly.
--
assignee: r.david.murray
messages: 127139
nosy: r.david.murray
priority: high
severity: normal
stage: commit review
status: open
title: BytesGene
R. David Murray added the comment:
Here's the patch and test.
--
___
Python tracker
<http://bugs.python.org/issue11019>
___
___
Python-bugs-list m
R. David Murray added the comment:
OK, so let's try again, since roundup saw fit to clear the upload field on me...
--
Added file: http://bugs.python.org/file20537/bytes_generator_none_body.patch
___
Python tracker
<http://bugs.py
3701 - 3800 of 12938 matches
Mail list logo