Georg Brandl added the comment:
Attaching a new patch; this one passes regrtest -R:: of test_io without
apparent reference leaks.
--
assignee: georg.brandl - gvanrossum
Added file: http://bugs.python.org/file8577/wr.diff
__
Tracker [EMAIL PROTECTED]
New submission from Karemir:
Hi,
I'm embedding stackless python in a c++ application under linux. When I
try to Finalize and Initialize again, I'm getting errors. this is a
sample code that doesn't work:
int main() {
Py_Initialize();
Py_Finalize();
Py_Initialize();
Guido van Rossum added the comment:
Thanks for persevering!!!
The dangers of switching between fileno(fp) and fp are actually well
documented in the C and/or POSIX standards. The problem is caused in
PyFile_FromFileEx() -- it creates a Python file object from the file
descriptor. The fix
Guido van Rossum added the comment:
Sorry, I was wrong about the encoding leak; you fixed that. The
FILE/fd issue is real though.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1267
__
BULOT added the comment:
Well, I made it with a diff -ruN, it works fine on my ubuntu.
It is only a ctrl-C management only, not a ctrl-D.
What do you mean by broken?
Regards.
Stephbul
2007/10/19, Guido van Rossum [EMAIL PROTECTED]:
Guido van Rossum added the comment:
Hmm... I don't think
Christian Heimes added the comment:
Guido van Rossum wrote:
You're right that a lot of this could be avoided if we used file
descriptors consistently. It seems find_module() itself doesn't read
the file; it just needs to know that it's possible to open the file.
Rewriting everywhere that
Christian Heimes added the comment:
Yes, I think you got it.
Guido, Brett, how much of the code should I change? import.c is mainly
using file pointers. Should I replace all operations on FILE with
operations on a file descriptor?
Christian
__
Tracker [EMAIL
Guido van Rossum added the comment:
Guido, Brett, how much of the code should I change? import.c is mainly
using file pointers. Should I replace all operations on FILE with
operations on a file descriptor?
I think find_module() should return a file descriptor (fd), not a
FILE*, but most of
Christian Heimes added the comment:
Guido van Rossum wrote:
I think find_module() should return a file descriptor (fd), not a
FILE*, but most of the rest of the code should call fdopen() on that
fd. Only call_find_module() should use the fd to turn it into a Python
file object. Then the
Guido van Rossum added the comment:
Is PyFile_FromFd and PyFile_FromFdEx fine with you or do you prefer a
different name like PyFile_FromFD and PyFile_FromFDEx or
PyFile_FromFileDescriptor?
Let's have a single function PyFile_FromFd(fd, name, mode, buffering,
encoding, newline).
I've
Brett Cannon added the comment:
Attached is a fix for modulefinder.
It is an ugly hack as modulefinder took the numeric opcode numbers from
dis and passed them to chr(). But that doesn't work since that returns
Unicode. So I took those single characters and passed them to str8().
Once str8()
Brett Cannon added the comment:
Attached is a fix for sqlite3.
First issue was that the dictionary that was being used to store
converters was having keys in Python code as Unicode but being compared
against str8 in C.
The second issue was that when an object was serialized using
__conform__
New submission from Derek Shockey:
smtpd.SMTPChannel contains a bug such that when connected to an
SMTPServer (or any subclass thereof), issuing a MAIL command with no
argument closes the socket and gives this error on the server:
(type 'exceptions.TypeError':'NoneType' object is
Brett Cannon added the comment:
Attached is a patch to fix test_str.
Basically there were a bunch of redundant tests for making sure that
calling str() on an object called it's __str__ method. str8 no longer
is directly relevant since it is no longer an actual string type.
Added file:
Brett Cannon added the comment:
Attached is a fix for test_subprocess.
Simply had to change a call to str8() to str().
I am going to run the test suite, but that should leave only test_struct
failing and that can be fixed as soon as Guido makes a call on whether
str8 or str should be used for
Derek Shockey added the comment:
Very simple patch that adds a ternary operator to skip the call to
__getaddr if there is no arg.
Added file: http://bugs.python.org/file8583/smtpd.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1307
Christian Heimes added the comment:
The new patch does a far more better job. I had the idea after a
discussion with Alexandre on #python and a small debugging session.
The tests for profile, cProfile and doctest are failing on my Linux box
because Py_FileSystemDefaultEncoding is UTF-8 but
Christian Heimes added the comment:
I think find_module() should return a file descriptor (fd), not a
FILE*, but most of the rest of the code should call fdopen() on that
fd. Only call_find_module() should use the fd to turn it into a Python
file object. Then the amount of change should be
18 matches
Mail list logo