[issue14995] PyLong_FromString documentation should state that the string must be null-terminated

2012-06-03 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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 successfully read

[issue11682] PEP 380 reference implementation for 3.3

2011-08-22 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: -- nosy: +rfk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing list

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-08-22 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: -- nosy: +rfk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-07-03 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue10399] AST Optimization: inlining of function calls

2011-04-12 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: -- nosy: +rfk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10399 ___ ___ Python-bugs-list mailing list

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2011-03-08 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2011-03-08 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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 on localhost:3128 and I

[issue5091] Segfault in PyObject_Malloc(), address out of bounds

2011-03-06 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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 rep...@bugs.python.org http

[issue5091] Segfault in PyObject_Malloc(), address out of bounds

2011-03-05 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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

[issue5091] Segfault in PyObject_Malloc(), address out of bounds

2011-03-05 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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 tracker rep

[issue5091] Segfault in PyObject_Malloc(), address out of bounds

2011-03-05 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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 any

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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 is a bug

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: Removed file: http://bugs.python.org/file19027/spooledtemporaryfile_truncate.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-26 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue9316] typos in zipimport docstrings

2010-07-20 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue9238] zipfile incorrectly documented as not supporting archive comments

2010-07-12 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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 object that you can

[issue9239] zipfile: truncating comment can corrupt the zipfile

2010-07-12 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue5950] Make zipimport work with zipfile containing comments

2010-07-12 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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

[issue5950] Make zipimport work with zipfile containing comments

2010-07-12 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: Removed file: http://bugs.python.org/file17944/zipimport_with_comments.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5950

[issue5950] Make zimport work with zipfile containing comments

2010-07-11 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: -- nosy: +rfk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5950 ___ ___ Python-bugs-list mailing list

[issue5950] Make zimport work with zipfile containing comments

2010-07-11 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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

[issue5950] Make zimport work with zipfile containing comments

2010-07-11 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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

[issue5950] Make zimport work with zipfile containing comments

2010-07-11 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: Removed file: http://bugs.python.org/file17943/zipimport_with_comments.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5950

[issue8400] zipimporter find_module fullname mis-documented

2010-07-07 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au 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

[issue6915] os.listdir inconsistenly releases the GIL on win32

2009-09-14 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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

[issue4875] find_library can return directories instead of files

2009-01-07 Thread Ryan Kelly
New submission from Ryan Kelly r...@rfk.id.au: 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