New submission from oopos myoo...@gmail.com:
Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit
(Intel)] on win32
-
Hi,I user Python!
UnicodeDecodeError Python 3.0: G:\cgi\python\python.exe
Thu Jan 15 16:46:34 2009
A problem
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Does it work if you change your script like this:
opsform = cgi.FieldStorage(open(sys.stdin.fileno(), 'rb'))
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
oopos myoo...@gmail.com added the comment:
To Amaury Forgeot d'Arc :
Thank you.
That error have sloved with your way:
[quote]Does it work if you change your script like this:
opsform = cgi.FieldStorage(open(sys.stdin.fileno(), 'rb'))[/quote]
Now,The new problem come out:
[code] 97
Antoine Pitrou pit...@free.fr added the comment:
The patch looks nice to me. (I'm curious why you call gc.collect()
several times in a row, though)
However, since it is an important change in the long run, perhaps the
specifics could be further discussed on python-dev before taking a decision?
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
OK, another try. Please replace the previous version with these 3 lines:
encoding = os.environ.get('HTTP_TRANSFER_ENCODING')
stdin = open(sys.stdin.fileno(), 'r', encoding=encoding)
opsform = cgi.FieldStorage(stdin)
Changes by Antoine Pitrou pit...@free.fr:
--
priority: - high
stage: - test needed
versions: +Python 2.6, Python 2.7 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4928
___
Mark Dickinson dicki...@gmail.com added the comment:
Hmm. I take it back: this *does* appear to be OS X specific.
I've attached a small (17-line) example that fails with
the Errno 57 error on OS X, but passes on the Linux machines I tested.
In this example, it appears that when 'conn.close()'
oopos myoo...@gmail.com added the comment:
Thank you for time.
Now,I try with you saied.Bu it is taken wrong as before.
See the files:
Added file: http://bugs.python.org/file12753/full_source_and_error.zip
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
Found a better (one-line) fix. Fixed in the trunk in r68611.
Will port to 2.6, 3.0, 3.1.
--
resolution: - fixed
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
Fixed in 2.6, 3.0, 3.1.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4397
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Thanks for the test case. I reproduced it easily.
There is indeed a real problem in CGI streams.
The first thing to do is to start python with the -u option (add it to
the end of the first #! line), so that stdin yields bytes instead of
Mark Dickinson dicki...@gmail.com added the comment:
Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556.
Here's the second patch, which fixes almost all remaining uses of nb_long
but stops short of actually removing/renaming the nb_long slot.
Notes:
(1) I haven't tested the
Mark Dickinson dicki...@gmail.com added the comment:
Retargeting, now that 2.5 is in security-fix-only mode.
Bob, can you clarify what *should* be happening in 2.6, 2.7, 3.0 and 3.1
for things like:
struct.pack('L', 2009.1)
struct.pack('L', Decimal('3.14'))
?
It also seems that 'L' and 'Q
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Submitted as r68618
--
resolution: - accepted
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4929
___
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Just to clarify,
Ascii files and unicode files will repr() as
open file 'tmp\foo', mode 'wb' at ...
open file u'tmp\\foo', mode 'wb' at ...
respectively. In the former, the backslash isn't escaped, but in the
latter it is. The
Mark Dickinson dicki...@gmail.com added the comment:
Some more strange results:
Python 2.6.1+ (release26-maint:68613, Jan 15 2009, 15:19:54)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type help, copyright, credits or license for more information.
from struct import pack
from decimal
Benjamin Peterson benja...@python.org added the comment:
On Thu, Jan 15, 2009 at 10:48 AM, Mark Dickinson rep...@bugs.python.org wrote:
Mark Dickinson dicki...@gmail.com added the comment:
Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556.
Here's the second patch, which
Mark Dickinson dicki...@gmail.com added the comment:
Does anyone have time to review these patches? I think the first is
straightforward, and I'm reasonably sure of the correctness of the second
patch. I'm less sure that it's the right thing to do. The question is
what should happen when
Noufal nou...@nibrahim.net.in added the comment:
What's wrong with and ?
I can see the issues with ; though.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4860
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Any thoughts?
I still hadn't time to reproduce the problem, so I still don't
understand it. What specific failure (file and line number) occurs,
and what specific strings get compared? test_file.py has 600 lines,
and I can't guess which
Benjamin Peterson benja...@python.org added the comment:
Looks good to me.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4930
___
Collin Winter coll...@gmail.com added the comment:
Looks like this was re-applied in r59943 and r59944. Thanks for taking
care of this, Amaury.
--
nosy: +collinwinter, jyasskin
resolution: accepted - fixed
status: open - closed
___
Python tracker
Mark Dickinson dicki...@gmail.com added the comment:
I wonder if we should mark
PyNumber_Long as deprecated in the docs, though.
It would be nice to standardize on one of (PyNumber_Long, PyNumber_Int)
and document the other as deprecated.
Maybe it would make more sense to stick with
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Anyone else want to pick this up from here?
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1242657
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
What's wrong with and ?
c=Cookie.Cookie('Customer=/script;'); print c.js_output()
script type=text/javascript
!-- begin hiding
document.cookie = Customer=/script;
// end hiding --
/script
Changes by Luke Kenneth Casson Leighton l...@lkcl.net:
--
nosy: +lkcl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3871
___
___
Python-bugs-list
New submission from Luke Kenneth Casson Leighton l...@lkcl.net:
this patch uses work from #3871 to get a build of python for win32
by running msys under Wine, the windows emulator, on linux.
no proprietary operating system or proprietary software was used.
/bin/sh.exe is so ing unbelievably
Changes by Luke Kenneth Casson Leighton l...@lkcl.net:
--
type: - feature request
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4954
___
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Are you seriously requesting inclusion of the file f into Python? It
contains many changes that are unsuitable for inclusion, such as the
removal of graminit.c and the removal of configure.
(besides, I personally think that the ability to
Mark Dickinson dicki...@gmail.com added the comment:
Second patch applied in r68619 (py3k) and r68620 (3.0 maintenance branch).
Here's the third and final patch: rename the nb_long slot to nb_reserved,
and change its type to (void *).
Added file:
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I thought I'd explained it in detail without having to invoke the
testsuite. If TEMPFN is tm...@test you get the following failure:
FAILED (failures=1)
test test_file failed -- Traceback (most recent call last):
File
New submission from Jean-Paul Calderone exar...@divmod.com:
The attached program demonstrates that the ContentHandler.skippedEntity
callback is not invoked for all skipped entities. Specifically, it is
not invoked for those in attribute values. Additionally, it
demonstrates that when parsing a
Martin v. Löwis mar...@v.loewis.de added the comment:
I thought I'd explained it in detail [...]
Well, so far, you didn't say that it was testUnicodeOpen that
failed. Now that I see that, I can understand the problem.
In your original message, I failed to see a problem. Yes, the repr
is
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
In _PyObject_LengthHint() code, at the line:
if (ro == NULL PyErr_Occurred()) {
It seems that PyErr_Occurred() is not useful and is always true when the
previous PyObject_CallMethodObjArgs() returned NULL.
Otherwise the patch is
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I think the testsuite just exposed a design fault in python or a bug, if
you will. When we by accident had a backslash in the filename, I
noticed the inconsistency between
't...@test' and u'tm...@test'.
One is a valid repr, the
New submission from Luke Kenneth Casson Leighton l...@lkcl.net:
this is a _very_ strange case where the file contents cannot be read,
under msys+wine, but under _just_ wine (cmd.exe) everything goes
absolutely fine.
by moving Py_Initialize() to _before_ the file load, it works!
--
New submission from Kristján Valur Jónsson krist...@ccpgames.com:
I stumbled upon this. Of all the errors in the posixmodule.c, ftruncate
alone raises an IOError upon failure. All the others raise OSError.
This behaviour is not documented. However, the os module documentation
says
Note
Benjamin Peterson benja...@python.org added the comment:
Fixed in r68628.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4946
Benjamin Peterson benja...@python.org added the comment:
Fixed in r68629.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4950
Benjamin Peterson benja...@python.org added the comment:
Ported to py3k in r68630 and 3.0 in r68631.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4922
___
New submission from dariusp dari...@internode.on.net:
Hi,
Suggested log message:
formatargspec now handles keyword only args that don't have defaults.
Previously it expected an empty dict but was being given None.
Patch:
The patch contains a suggested fix to inspect.py and a new test in
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
what is WEIRD_DEBUG?
why do you remove a test from string_tests.py?
why do you modify a command in setup.py?
What do you mean the file contents cannot be read under msys+wine?
What specific error you have?
The right thing to do
New submission from Martin Saturka kvu...@gmail.com:
Directory selection from Tkinter part of Python 3.0, i.e. askdirectory
function from tkinter.filedialog does not work. It works for 2.x Python,
other Tkinter functions (askopenfilename, asksaveasfilename) work well
at both 2.x and 3.0
Martin v. Löwis mar...@v.loewis.de added the comment:
Please be more explicit: what does not work mean? What do you do, what
happens, what do you expect to happen instead?
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
Martin Saturka kvu...@gmail.com added the comment:
When I do in Python 2.x (e.g. 2.6) next:
import Tkinter as T
import tkFileDialog as F
t = T.Tk()
dn = F.askdirectory()
It pop-ups the dialog, it is OK. Analogical case for Python 3.0
Martin v. Löwis mar...@v.loewis.de added the comment:
Ah. That's a duplicate of issue 4406.
--
resolution: - duplicate
status: open - closed
superseder: - In Lib\tkinter\filedialog.py, class Directory define loss a_
___
Python tracker
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Your example header is invalid. Excerpt from RFC2047 http://
www.ietf.org/rfc/rfc2047.txt section 5:
+ An 'encoded-word' MUST NOT be used in parameter of a MIME
Content-Type or Content-Disposition field, or in any structured
47 matches
Mail list logo