New submission from Ryan Kelly :
According to the docs here:
http://docs.python.org/c-api/gcsupport.html
Any object that uses PyObject_GC_Track in its constructor must call
PyObject_GC_UnTrack in its deallocator. The CThunkObject in _ctypes does the
former but not the later. Attached
Changes by Ryan Kelly :
--
nosy: +rfk
___
Python tracker
<http://bugs.python.org/issue11682>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Ryan Kelly :
--
nosy: +rfk
___
Python tracker
<http://bugs.python.org/issue11816>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Ryan Kelly :
Both file.truncate() and StringIO.truncate() accept an optional "size"
parameter to truncate the file to a specific size. SpooledTemporaryFile should
accept a similar parameter and pass it on.
The only tricky part is that truncate can potentially in
Ryan Kelly added the comment:
I went looking for places to update the documentation but the description of
SpooledTemporaryFile doesn't go into any detail of its methods, so I haven't
added anything. New patch fixes some whitespace issues.
I'd like to argue that this
Changes by Ryan Kelly :
Removed file:
http://bugs.python.org/file19027/spooledtemporaryfile_truncate.patch
___
Python tracker
<http://bugs.python.org/issue9957>
___
___
Ryan Kelly added the comment:
Not sure if it's caused by the same thing, but I just got a segfault on the
same line in my own program. Running python 2.7.1.
I will try to dig out some more useful info but it's been a long time since I
chased a segfault...
--
nosy: +
Ryan Kelly added the comment:
Please remind me how to obtain an appropriate coredump (as I said, it's been a
*long* time...)
Doing "print bp" shows an out-of-bounds address as for the original submitter.
--
___
Python
Ryan Kelly added the comment:
attaching core dump from a freshly-compiled python 2.7.1 at with "-O0 -g" in
CFLAGS.
The code that is segfaulting is using pycrypto and sqlite3, so it may be that a
bug in one of these is trampling on something. No idea how to investigate an
Ryan Kelly added the comment:
Thanks for the help, I have tracked this down to a bug in PyCrypto. It was
increfing an object once but decrefing it twice.
Sorry for the noise.
--
___
Python tracker
<http://bugs.python.org/issue5
New submission from Ryan Kelly :
The docs for HTTPConnection.set_tunnel(host,port) are ambiguous. They simply
say "Set the host and the port for HTTP Connect Tunnelling". But should I
specify the address of the server *through* which I want to tunnel, or the
address of the *endpoi
Ryan Kelly added the comment:
Sorry, "endpoint" is just a noun that seemed to fit for me, I've no idea if
there is a standard term for this. Perhaps "origin server" if you follow the
terminology from the RFC?
By way of example, suppose I'm running a proxy o
Changes by Ryan Kelly :
--
nosy: +rfk
___
Python tracker
<http://bugs.python.org/issue10399>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Ryan Kelly :
On win32, ctypes.util.find_library uses os.path.exists() to check for
potential library files. This means it is quite happy to return a
directory instead of a file, if one happens to exist with the
appropriate name somewhere in the search path. Can this please
New submission from Ryan Kelly :
PyLong_FromString will raise a ValueError if the given string doesn't contain a
null byte after the digits. For example, this will result in a ValueError
char *pend;
PyLong_FromString("1234 extra", &pend, 10)
While this will successfu
New submission from Ryan Kelly :
The win32 implementation of os.listdir() releases the GIL around calls
to FindNextFile, but not around calls to FindFirstFile. Attached is a
simple patch to consistently release the GIL around any such calls.
--
components: None
files: listdir_gil.patch
Ryan Kelly added the comment:
Was also just bitten by this, trying to muck with PEP-302-style import hooks.
Note that the documented behaviour of zipimporter is also the behaviour
required by PEP 302, i.e. full dotted module name.
--
nosy: +rfk
Changes by Ryan Kelly :
--
nosy: +rfk
___
Python tracker
<http://bugs.python.org/issue5950>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ryan Kelly added the comment:
Attached is my attempt at a patch for this functionality, along with some
simple tests. This basically mirrors what's done in zipfile.py, searching
backwards through the file until it finds the end-of-central-directory marker.
It tries to be memory cons
Ryan Kelly added the comment:
Whoops, forgot to remove the line from the docs about comments not being
supported. Updated the patch accordingly.
--
Added file: http://bugs.python.org/file17944/zipimport_with_comments.patch
___
Python tracker
Changes by Ryan Kelly :
Removed file: http://bugs.python.org/file17943/zipimport_with_comments.patch
___
Python tracker
<http://bugs.python.org/issue5950>
___
___
Pytho
New submission from Ryan Kelly :
The zipfile module is prominently documented as "This module does not currently
handle...ZIP files which have appended comments". But as far as I can tell, it
handles them fine - there's even a "comment" property on the ZipFile ob
New submission from Ryan Kelly :
If you open a ZipFile in append mode and modify the comment to be shorter than
what was originally there, the file will become corrupted. Truncated data from
the original comment is left "dangling" at the end of the zipfile.
A much more trivial bug
Ryan Kelly added the comment:
I can't imagine anyone depending on this lack-of-feature, but there's no
arguing with the technicality of it. One more small incentive to make the jump
to Python 3 then.
Anyway, I've revisited the patch to clean up the logic and control flow, and
Changes by Ryan Kelly :
Removed file: http://bugs.python.org/file17944/zipimport_with_comments.patch
___
Python tracker
<http://bugs.python.org/issue5950>
___
___
Pytho
New submission from Ryan Kelly :
zipimporter methods is_package, get_code and get_source have in the their
docstring "Raise ZipImportError is the module couldn't be found".
The attached patch fixes the typo to "if the module couldn't be found".
--
files:
26 matches
Mail list logo