[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-21 Thread Javen Wang
Javen Wang added the comment: I'm using Python2.5 in which close_fds is not available in Windows. And I cannot use Python2.6 because I need to redirect the stdout and stderr and there's performance concern. I have questions on the root cause: a. why doesn't fopen() has sharing issue? b. wh

[issue5022] doctest should allow running tests with "python -m doctest"

2009-01-21 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> out of date status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue1048820] Only "Overwrite" mode possible with curses.textpad.Textbox

2009-01-21 Thread dashing
dashing added the comment: I am getting "RuntimeError: maximum recursion depth exceeded" as soon as I type a character in a textbox made with insert_mode=True. -- nosy: +dashing type: -> crash ___ Python tracker

[issue5029] Odd slicing behaviour

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5028] tokenize.generate_tokens doesn't always return logical line

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5030] Typo in class tkinter.filedialog.Directory prevents compilation

2009-01-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: Duplicate of #4406. -- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed ___ Python tracker ___ ___

[issue5030] Typo in class tkinter.filedialog.Directory prevents compilation

2009-01-21 Thread David Schultz
New submission from David Schultz : class tkinter.filedialog.Directory incorrectly derives from Dialog instead of _Dialog. Adding the "_" allows the code to compile and run as expected. This also explains why tkinter.filedialog.askdirectory() doesn't work. -- components: Tkinter mess

[issue5029] Odd slicing behaviour

2009-01-21 Thread Dinko Galetić
New submission from Dinko Galetić : #the following code should return an empty list, but returns the 0th member of the list >>> foo = [1, 2, 3] >>> foo[0::-1] [1] -- components: Regular Expressions messages: 80354 nosy: dgaletic severity: normal status: open title: Odd slicing behaviour

[issue5028] tokenize.generate_tokens doesn't always return logical line

2009-01-21 Thread Duncan Findlay
New submission from Duncan Findlay : According to the documentation for tokenize.generate_tokens: "The generator produces 5-tuples with these members: the token type; the token string; a 2-tuple (srow, scol) of ints specifying the row and column where the token begins in the source; a 2-tuple (e

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Tarek Ziadé
Tarek Ziadé added the comment: Ah great, thanks for telling Antoine, I missed it on gzip. And the test on bz2 makes me see that my tests are not sufficient (calling with on an instance that has already been used and close) ___ Python tracker

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Tarek: gzip and bz2 are already done (http://code.python.org/hg/trunk/rev/d9555936ded9). -- nosy: +pitrou ___ Python tracker ___ ___

[issue2233] Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail

2009-01-21 Thread Roumen Petrov
Roumen Petrov added the comment: No response from py-dev list :( . May be solution has to work in all cases. ___ Python tracker ___ ___ Python-

[issue3871] cross and native build of python for mingw32 with distutils

2009-01-21 Thread Roumen Petrov
Roumen Petrov added the comment: Does this supercede #3754? - no. The issue #3754 introduce macro AC_CANONICAL_HOST(add standardize "host triplets") + fixes for cross-compilation. Changes to configure script in this patch show how to use "host triplet" for mingw builds. ___

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Tarek Ziadé
Tarek Ziadé added the comment: Feedback from my blog : other places where a context manager could be good to have : - gzip - zipfile - urllib2.urlopen and urllib.request.urlopen ___ Python tracker

[issue3871] cross and native build of python for mingw32 with distutils

2009-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does this supercede #3754? If so, please add this as superseder and close it. -- nosy: +tjreedy ___ Python tracker ___ _

[issue5027] xml namespace not understood by xml.sax.saxutils.XMLGenerator

2009-01-21 Thread Soren Roug
New submission from Soren Roug : The 'xml' namespace in XML files is special in that it need not be declared. When xml.sax.saxutils.XMLGenerator is used with the namespace feature it does not know how to handle it. Example. The code: import xml.sax, xml.sax.saxutils parser = xml.sax.make_parser

[issue5026] [reopening] native build of python win32 using msys under both wine and native win32

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: martin - apologies for shouting: i hadn't seen your explanations of why #4954 was closed. i'm not happy that it _was_ closed, but that's another story. yes of course i will be going on to python2.6 and up - first though is to focus on python2.5 a

[issue4954] native build of python win32 using msys under wine.

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: martin, so sorry, i didn't see your comments - no dang hell no i'm not done yet. regarding graminit.h: graminit.h isn't being removed - i keep editing it out of the patch. i'm not _submitting_ it as part of the patch because what happens is that P

[issue4954] native build of python win32 using msys under wine.

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: manifests and rc files for msvcr80 build Added file: http://bugs.python.org/file12830/x ___ Python tracker ___ ___

[issue5026] [reopening] native build of python win32 using msys under both wine and native win32

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: attached also manifests and rc files for building on msvcr80 Added file: http://bugs.python.org/file12829/x ___ Python tracker ___ ___

[issue5025] test_kqueue failure on OS X

2009-01-21 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch: - add a time.sleep(1.0) in between calls to kq.control - restructure for loop slightly: move initial kq.control call inside it - bump number of trials from 5 to 10 (why not?!) - produce more meaningful error message in the unlikely event

[issue5026] [reopening] native build of python win32 using msys under both wine and native win32

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: so. let me be clear. this bug is a continuation of work to port python to mingw, with a specific BUT NOT UNIQUE focus of ensuring that python can be compiled under wine. THE ATTACHED PATCH CAN ALSO BE USED TO COMPILE PYTHON UNDER WIN32. ---

[issue5026] [reopening] native build of python win32 using msys under wine.

2009-01-21 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : reopening a new bug with the exact same title due to #4954 having been unilaterally closed without discussion, nor reasons specified. simple courtesy would dictate that some sort of dialog is entered into especially when someone is putting in si

[issue4954] native build of python win32 using msys under wine.

2009-01-21 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: updated. incorporating roumen's work as well. Added file: http://bugs.python.org/file12826/f ___ Python tracker ___ __

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger
Torsten Bronger added the comment: Well, Django doesn't story binary data at all but wants you to store image files etc in the file system. Whether this was a good design decision, is beyond the scope of this issue. My points actually are only these: a) the docs strongly suggest that protocol

[issue5025] test_kqueue failure on OS X

2009-01-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > My first impression was that the '1' in 'kq.control(None, 4, 1)' already did this; i.e., that it meant that the kq.control function would wait up to 1 second for a response, but that doesn't seem to be true. Since there are events in the result, the cal

[issue5025] test_kqueue failure on OS X

2009-01-21 Thread Mark Dickinson
New submission from Mark Dickinson : I just got a one-off, non-reproducible test_kqueue failure, during a 'make test' of the trunk, on OS X 10.5.6. Here's the output: test_kqueue test test_kqueue failed -- Traceback (most recent call last): File "/Users/dickinsm/python_source/trunk/Lib/test/

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-21 16:43, Torsten Bronger wrote: > Torsten Bronger added the comment: > > I ran into this problem today when writing python data structures into a > database. Only ASCII is safe in this situation. I understood the > Python docs that protocol 0

[issue5024] sndhdr.whathdr returns -1 for WAV file frame count

2009-01-21 Thread Robert Pyle
New submission from Robert Pyle : Seems like test_wav() could easily return the actual frame count by calling wave.py just as test_aifc() uses aifc.py. -- components: Library (Lib) messages: 80333 nosy: rpyle severity: normal status: open title: sndhdr.whathdr returns -1 for WAV file fr

[issue5023] Segfault in datetime.time.strftime("%z")

2009-01-21 Thread Eric Wald
New submission from Eric Wald : Execution of "make test" for Python 2.6.1 halts with a segmentation fault on line 2198 of Python-2.6.1/Lib/test/test_datetime.py; also occurs using the attached script, narrowing it down to the %z sequence in the format argument to datetime.time.strftime(), but

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger
Torsten Bronger added the comment: "protocol 8" --> "protocol 0" of course. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger
Torsten Bronger added the comment: I ran into this problem today when writing python data structures into a database. Only ASCII is safe in this situation. I understood the Python docs that protocol 0 was ASCII-only. I use pickle+base64 now, however, this makes debugging more difficult. Anyw

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-21 Thread Gabriel Genellina
Gabriel Genellina added the comment: After updating the import line, it still fails in 2.6, 3.0 and the current trunk. -- nosy: +gagenellina versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker

[issue5022] doctest should allow running tests with "python -m doctest"

2009-01-21 Thread Gabriel Genellina
Gabriel Genellina added the comment: Already implemented in Python 2.6; please upgrade. 2.5 only gets security fixes at this time. -- nosy: +gagenellina ___ Python tracker ___ __

[issue1391] Adds the .compact() method to bsddb db.DB objects

2009-01-21 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I committed this patch to the imminent pybsddb 4.6.4. This will be available soon in http://www.jcea.es/programacion/pybsddb.htm, and in future Python 2.7. The function is only available if you are using Berkeley DB 4.7 or newer, since 4.6 was very buggy. ---

[issue4774] threding, bsddb and double free or corruption (fasttop)

2009-01-21 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Closing the issue. Python 2.5.x is only open for security patches. bsddb library in Python 2.6 doesn't have this issue. People needing recent pybsddb in old python releases can download from http://www.jcea.es/programacion/pybsddb.htm -- resolution:

[issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick

2009-01-21 Thread Michiel Overtoom
Michiel Overtoom added the comment: I experience the same, on FreeBSD 7.0-REL, with tkinter compiled to use Tk8.5 instead of Tk8.4. Tkinter compiled for Tk8.4 doesn't have the problem. Moving the mouse over the text widget changes the cursor to the I-beam as expected, but click on text doesn't

[issue4753] Faster opcode dispatch on gcc

2009-01-21 Thread Stefan Ring
Stefan Ring added the comment: Hi, I ported threadedceval6.patch to Python 2.5.4, in case anyone is interested... Note that you need to run autoconf and autoheader. -- nosy: +Ringding Added file: http://bugs.python.org/file12824/threadedceval6-py254.patch

[issue5022] doctest should allow running tests with "python -m doctest"

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : It would be good to be able to do something like:: $ python -m doctest foo.py $ python -m doctest --text foo.txt bar.txt (or preferably some command line options design which could handle both .py and .txt files). -- components: Library (Lib) message

[issue5021] doctest.testfile should set __name__, can't use namedtuple

2009-01-21 Thread Tom Lynn
New submission from Tom Lynn : This file fails when run with doctest.testfile:: >>> print __name__ __builtin__ >>> print globals()['__name__'] # fails with KeyError: __name__ __builtin__ "__builtin__" is probably not a good value, but more importantly, this means that you can't use na

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Tarek Ziadé
Changes by Tarek Ziadé : Removed file: http://bugs.python.org/file12811/smtplib.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Tarek Ziadé
Tarek Ziadé added the comment: I've simplified the code accordinglyhttp://bugs.python.org/issue49...@ok_message=issue%204972%20files%20edited%20ok&@template=item about the name of the vars. while I agree with you, I have use those names (errcode, errmsg) because they are used in getreply() so I

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-21 Thread Tarek Ziadé
Changes by Tarek Ziadé : Removed file: http://bugs.python.org/file12792/smtplib.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5020] Regex Expression Error

2009-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > the program crash Well, it's not a crash, but a graceful exception: sre_constants.error: bad character range Your regular expression is invalid: the '-' has a special meaning inside square brackets. Please consult the documentation: http://docs.pyth