Francesco Del Degan f.delde...@ngi.it added the comment:
Those are the new updated patches with ifdef wrapped timegm function, docs, and
a conversion test.
--
Added file: http://bugs.python.org/file16351/timemodule-gmtime-2-trunk.diff
___
Python
New submission from Patrick Holz patrick.h...@googlemail.com:
When using the function tkFileDialog.askopenfiles() on Windows 7 (32-bit) the
following error occurs after choosing one or more arbitrary files:
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit(Intel)] on
win32
Marc-Andre Lemburg m...@egenix.com added the comment:
Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Could you please check for chars above 0x7f first and then use
PyUnicode_Decode() instead of the PyUnicode_FromStringAndSize() API
I concur:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
But why is it necessary to check for chars above 0x7f?
The Python default encoding has to be ASCII compatible,
Yes, but it is not necessarily as strict.
for example, after I manage to set the default encoding to latin-1,
u%s %
Marc-Andre Lemburg m...@egenix.com added the comment:
Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
But why is it necessary to check for chars above 0x7f?
The Python default encoding has to be ASCII compatible,
Yes, but it is not necessarily as
Ezio Melotti ezio.melo...@gmail.com added the comment:
I was trying to decode mainly to get a UnicodeDecodeError automatically.
If I check if the char is not in the ASCII range (i.e. 0x7F) I think I'd have
to set the error message for the UnicodeDecodeError manually and possibly
duplicate it
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Marc-André's remark was that if char0x80 (the vast majority), it's not
necessary to call any decode function: just copy the byte. Other cases (error,
or non-default encoding) may use a slower path.
--
Ezio Melotti ezio.melo...@gmail.com added the comment:
Ok, adding a fast path shouldn't make the code more complicated, so I'll
include it in the patch, thanks for the feedback.
--
___
Python tracker rep...@bugs.python.org
Eric Smith e...@trueblade.com added the comment:
I think the only remaining issue here is that 's' isn't documented. The
exceptions are now more meaningful, and commas have been documented.
--
versions: +Python 3.2 -Python 3.0
___
Python tracker
Marc-Andre Lemburg m...@egenix.com added the comment:
Looking at the code, the whole approach to finding the project base appears to
be very fragile.
I'd suggest to use a landmark file for finding the project base, say
Modules/main.c, and a function which searches all directories on the
Eric Smith e...@trueblade.com added the comment:
Here's my proposed changes. Please review.
I put the string type 's' into its own table. That's probably overkill, but I
think it gets lost if it's just mentioned in the text. Feel free to change
that, though.
Also, I'm not wild about my
Walter Dörwald wal...@livinglogic.de added the comment:
On 24.02.10 15:28, Eric Smith wrote:
Eric Smith e...@trueblade.com added the comment:
Fixed:
trunk: r78418
release26-maint: r78419
Still working on porting to py3k and release31-maint.
A much better solution would IMHO be to
Eric Smith e...@trueblade.com added the comment:
A much better solution would IMHO be to forbid setting the encoding,
object and reason attributes to objects of the wrong type in the first
place. Unfortunately this would require an extension to PyMemberDef for
the T_OBJECT and T_OBJECT_EX
Skip Montanaro s...@pobox.com added the comment:
Jesus can I ask if this (very useful) feature is on time for Python 2.7?
You can ask, but I suspect you'd be disappointed in the answer. Do you have
time to look at the issue? The biggest sticking point in my mind is coming
up with a uniform
Jeremy Hylton jer...@alum.mit.edu added the comment:
I guess there's some question about whether the syntax in the PEP was
considered carefully when it was approved. If so, I'm not sure that
we want to re-open the discussion. On the other hand, it's been a
long time since the PEP was approved
Wilfredo Sanchez wsanc...@wsanchez.net added the comment:
I get this on Python 2.6, not 2.5.
And it seems to be limited to 64-bit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8013
___
New submission from Walter Dörwald wal...@livinglogic.de:
In the current py3k branch setting an attribute of an object with PyMemberDefs
raises an internal error:
$ ./python.exe
Python 3.2a0 (py3k:78419M, Feb 24 2010, 17:56:06)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type help,
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
Looks good.
A documentation typo:
gmtime() -- convert seconds since Epoch to UTC tuple\n\
+timegm() - Convert a UTC tuple to seconds since the Epoch.\n\
Note the use of -- in the existing items.
I understand that the
Martin v. Löwis mar...@v.loewis.de added the comment:
I still think that the sysconf version should be the correct one. If OSX fails
to work correctly under that version, and causes Python to raise an exception -
then that's a platform bug, and should only accept minimal work arounds.
So I
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
Looks like a case of missing null check. Patch attached.
--
keywords: +patch
nosy: +Alexander.Belopolsky
Added file: http://bugs.python.org/file16359/issue8013.diff
___
Python
New submission from Ilya Sandler ilya.sand...@gmail.com:
Here is a sample session:
cheetah:~/comp/python/trunk ./python ./Lib/pdb.py hello
/home/ilya/comp/python/trunk/hello(1)module()
- print i
(Pdb) b 1
Breakpoint 1 at /home/ilya/comp/python/trunk/hello:1
(Pdb) commands 1
(com)
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
On Wed, Feb 24, 2010 at 12:45 PM, Martin v. Löwis
rep...@bugs.python.org wrote:
..
I still think that the sysconf version should be the correct one. If OSX
fails to work correctly under
that version, and causes Python to
Eric Smith e...@trueblade.com added the comment:
I'm working on a similar issue for int.__format__('c'). What's not clear to me
is why this doesn't work the same as chr(i). That is, shouldn't chr(i) ==
('%c' % i) hold for i in range(256)? And if that's so, why not just copy chr's
Eric Smith e...@trueblade.com added the comment:
That looks good. I tweaked it a little and fixed a few other problems with the
patch. New patch attached.
--
Added file: http://bugs.python.org/file16360/issue5965-1.diff
___
Python tracker
Eric Smith e...@trueblade.com added the comment:
Of course. Sorry about that.
But then why not copy unichr()? It calls PyUnicode_FromOrdinal.
I guess my real question is:
Should '%c' % i be identical to chr(i) and should u'%c' % i be identical
to unichr(i)?
And by identical I mean return
Ezio Melotti ezio.melo...@gmail.com added the comment:
At least from point of view, the difference between ints and chars is:
* u'%c' % 0xB5 means create a Unicode char with codepoint 0xB5, i.e. the
Unicode char µ U+00B5 MICRO SIGN;
* u'%c' % '\xB5' means create a Unicode char converting the
Ezio Melotti ezio.melo...@gmail.com added the comment:
Just to clarify:
u'%c' % some_int should behave like unichr(some_int);
u'%c' % some_chr should behave like u'%s' % some_chr.
--
___
Python tracker rep...@bugs.python.org
Matthew Barnett pyt...@mrabarnett.plus.com added the comment:
issue2636-20100224.zip is a new version of the regex module.
It includes support for matching based on Unicode scripts as well as on Unicode
blocks and properties.
--
Added file: http://bugs.python.org/file16362/issue2636
Benjamin Peterson benja...@python.org added the comment:
It seems that T_INT uses PyLong_AsLong to get a integer, and 2.x uses
PyInt_AsLong. PyInt_AsLong tries to convert the number to an integer, but
PyLong_AsLong just throws up if the type is not correct. Mark, thoughts?
--
nosy:
Marc-Andre Lemburg m...@egenix.com added the comment:
Ezio Melotti wrote:
Just to clarify:
u'%c' % some_int should behave like unichr(some_int);
u'%c' % some_chr should behave like u'%s' % some_chr.
That's correct.
I guess that in practice u'%c' % some_chr is not all that common.
Otherwise,
Mark Dickinson dicki...@gmail.com added the comment:
Might it be T_PYSSIZET rather than T_INT? In which case it's PyLong_AsSsize_t
that's at fault: it should raise TypeError for non-integers. What's slightly
less clear is whether PyLong_AsSsize_t should also try to call int to convert
to
Mark Dickinson dicki...@gmail.com added the comment:
Here's a patch that raises TypeError if either PyLongAs_Size_t or
PyLong_As_Ssize_t gets called with a valid non-integer PyObject *.
I'm not sure where the most appropriate place for a test is.
--
assignee: - mark.dickinson
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
updated patch to trunk:
- apply cleanly
- support builddir sourcedir
- regression tests pass if run from any drive (windows hosts)
--
Added file: http://bugs.python.org/file16364/python-trunk-20100225-MINGW.patch
Vlastimil Brom vlastimil.b...@gmail.com added the comment:
Thanks, its indeed a very nice addition to the library...
Just a marginal remark; it seems, that in script-names also some non BMP
characters are covered, however, in the unicode ranges thee only BMP.
Vincent Borghi vincent.borgh...@gmail.com added the comment:
In fact, thanks to the person (Alexey Shamrin) who created
this issue (issue found while googling for namedtuple),
I have understood the namedtuple example in the
documentation.
I think like him the verbose=True example that cames
Benjamin Peterson benja...@python.org added the comment:
2010/2/24 Mark Dickinson rep...@bugs.python.org:
Mark Dickinson dicki...@gmail.com added the comment:
Here's a patch that raises TypeError if either PyLongAs_Size_t or
PyLong_As_Ssize_t gets called with a valid non-integer PyObject
Ezio Melotti ezio.melo...@gmail.com added the comment:
I think this can be changed on 2.x as well, since the traceback.tb_lineno
function has no use in versions past 2.3 (so maybe it should be deprecated
too, at least in the doc). Also the except should catch an IndexError.
--
R. David Murray rdmur...@bitdance.com added the comment:
PEP 389 has been accepted.
--
components: +Library (Lib) -Extension Modules
priority: - normal
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker
Meador Inge mead...@gmail.com added the comment:
Built on Brian's patch by adding the following items:
* Added a unit test case to cover exceptional conditions.
* Added doc strings on __enter__ and __exit__ (more consistent
with the surrounding code).
* Spelling error in doc
New submission from DavidCzech davidczech...@gmail.com:
c_char_p.value doesn't return a bytes object on Windows.
http://docs.python.org/3.1/library/ctypes.html#fundamental-data-types states
that c_char_p is either a bytes object or None in Python, not str.
--
test_c_bug.py
--
40 matches
Mail list logo