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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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__
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
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
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
Mark Florisson [EMAIL PROTECTED] added the comment:
s/actual/operation/
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4579
___
___
Python-bugs-list mailing list
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
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
22 matches
Mail list logo