[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: In both Python versions EINTR is not handled properly in the file.write and file.read methods. - file.write - In Python 2, file.write can write a short amount of bytes, and when

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: Here is fread.py (why can you only attach one file at a time? :P) -- Added file: http://bugs.python.org/file20463/fread.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: I think this sums it up: file.write, on EINTR, could decide to continue writing if no Python signal handler raised an exception. Analogously, file.read could decide to keep on reading on EINTR if no Python signal handler raised

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: Ok. This would only be done in buffered mode, though, so your fwrite.py example would have to be changed slightly (drop the ,0 in fdopen()). Indeed, good catch. So apparently file.write (in buffered mode) is also incorrect

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-12-16 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: I forgot to remove a tempfile and reverted the Cython note at the top. A diff is provided (that should be applied upon the previously submitted patch). It's a diff because I don't have commit rights and svn does not support local

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-12-16 Thread Mark Florisson
Changes by Mark Florisson markflorisso...@gmail.com: Removed file: http://bugs.python.org/file19857/libpython_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10566

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-12-15 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: Ok I attached a new patch that solves the things you mentioned. It can debug Python inferiors with versions 2.6+. Execution control commands (py-{run, cont, finish, step, next}) and py-exec need gdb 7.2+, py-break works with 7.1

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-12-08 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: Indeed, I'm trying to make the code Python 2 and Python 3 (for the inferior) compatible, it's not really hard but indeed, the 'u' (Python 2) and 'b' (Python 3) stuff need special casing. Python 2 compatibility was also the reason why

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-11-29 Thread Mark Florisson
Mark Florisson markflorisso...@gmail.com added the comment: I forgot to mention, this patch works with gdb 7.2 or higher, but it does not prevent using other libpython functionality with gdb 7.1 or running the tests with gdb 7.1. -- ___ Python

[issue10566] gdb debugging support additions (Tools/gdb/libpython.py)

2010-11-28 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: Attached is a patch that adds a few features to the Python debugging support for gdb: - listing of globals - python breakpoints - python stepping/stepping over/finishing of frames/running/continuing - python code execution

[issue7548] If a generator raises TypeError when being unpacked, an unrelated error message is shown

2009-12-19 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: list(*('boo' for x in [1])) ['b', 'o', 'o'] list(*(range('error') for x in [1])) # notice the erroneous error message Traceback (most recent call last): File stdin, line 1, in module TypeError: type object argument after * must

[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2009-10-29 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: As you can see, when a local trace function sets f_lineno, f_lineno doesn't get updated on subsequent lines. Otherwise it works fine. $ python tracer_testcase.py

[issue6268] Seeking to the beginning of a text file a second time will return the BOM as first character

2009-06-11 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: f = open('foo', 'wt+', encoding='UTF-16') f.write('spam ham eggs') 13 f.seek(0) 0 f.read() 'spam ham eggs' f.seek(0) 0 f.read() '\ufeffspam ham eggs' Although the BOM character is a ZERO WIDTH NO-BREAK SPACE, and should

[issue6162] What should happen to signals when the main thread dies?

2009-06-01 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: As signals are only delivered to the main thread, what should happen when the main thread dies? Currently, the signal mask is not unset in any other thread, so when the main thread dies, all signals set in the mask are simply ignored

[issue6089] str.format raises SystemError

2009-05-22 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: '{0[0](10)}'.format([None]) Traceback (most recent call last): File stdin, line 1, in module SystemError: error return without exception set -- components: Interpreter Core messages: 88198 nosy: eggy severity: normal

[issue5275] BaseCookie.load doesn't create Morsel objects for mappings

2009-02-15 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: The load method, which is also called from the initializer if input is provided, doesn't create Morsel objects for things other than strs, because it calls self.update(rawdata), which does not invoke the custom __setitem__

[issue4684] sys.exit() exits program when non-daemonic threads are still running

2008-12-17 Thread Mark Florisson
New submission from Mark Florisson markflorisso...@gmail.com: sys.exit() exits the program when non-daemonic threads are still running, in versions = 2.5. Test included. A demonstration here: http://paste.pocoo.org/show/95766/ (On debian GNU/Linux) -- components: None files: foo.py

[issue4579] .read() and .readline() differ in failing

2008-12-07 Thread Mark Florisson
New submission from Mark Florisson [EMAIL PROTECTED]: f = os.fdopen(os.open('spam!', os.O_TRUNC|os.O_CREAT|os.O_RDWR), 'w') f.read() '' f.readline() Traceback (most recent call last): File stdin, line 1, in module IOError: [Errno 9] Bad file descriptor f.write(spamspamhihi) f.read

[issue4579] .read() and .readline() differ in failing

2008-12-07 Thread Mark Florisson
Mark Florisson [EMAIL PROTECTED] added the comment: Actually, I wouldn't expect it to fail like that, because it's not a bad file descriptor, it's an actual that doesn't agree with the (userspace) file mode. What I'd expect is probably a TypeError. Although an IOError, with a different message

[issue4579] .read() and .readline() differ in failing

2008-12-07 Thread Mark Florisson
Mark Florisson [EMAIL PROTECTED] added the comment: s/actual/operation/ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4579 ___ ___ Python-bugs-list mailing list

[issue4579] .read() and .readline() differ in failing

2008-12-07 Thread Mark Florisson
Mark Florisson [EMAIL PROTECTED] added the comment: Perhaps it's linux specific then. I'm on debian lenny (2.6.26-1-amd64). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4579

[issue4452] Incorrect docstring of os.setpgrp

2008-11-28 Thread Mark Florisson
New submission from Mark Florisson [EMAIL PROTECTED]: The docstring of os.setpgrp says 'Make this process a session leader.', but that's not what setpgrp does. setpgrp() is the same as setpgid(0, 0), which sets the pgid of the calling process to the pid of the calling process, thus making