[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-05 Thread Bradley Froehle
Bradley Froehle added the comment: Patch attached. I implemented this by adding a 'static char *' which holds the memory we allocate. I did not use the PyState machinery. -- keywords: +patch Added file: http://bugs.python.org/file30143/readline_completer_state.patch

[issue17289] readline.set_completer_delims() doesn't play well with others

2013-02-24 Thread Bradley Froehle
New submission from Bradley Froehle: The `readline.set_completer_delims` doesn't play well with others because it assumes that only it ever allocates or modifies the rl_completer_word_break_characters buffer. If other programs modify this value, for example changing it from heap allocated space

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2013-02-13 Thread Bradley Froehle
Bradley Froehle added the comment: As for the docstring: I would like it better if I could avoid typing the cumbersome \n\s. I agree with Stefan that the file is a lot more readable if the docstring is not repeated twice. It's unfortunate that C doesn't have a notion of a raw string

[issue17162] Py_LIMITED_API needs a PyType_GenericDealloc

2013-02-08 Thread Bradley Froehle
New submission from Bradley Froehle: I tried to implement a custom extension type using PyType_FromSpec and Py_LIMITED_API but couldn't implement tp_dealloc: static void mytype_dealloc(mytypeobject *self) { // free some fields in mytypeobject Py_TYPE(self)-tp_free((PyObject *) self

[issue17162] Py_LIMITED_API needs a PyType_GenericDealloc

2013-02-08 Thread Bradley Froehle
Bradley Froehle added the comment: I should mention that essentially what I'm advocating is renaming and exposing `object_dealloc` in Objects/typeobject.c. The proper name is not obvious to me... should it be PyObject_GenericDealloc since it acts on objects? Or PyType_GenericDealloc since

[issue5309] packaging doesn't parallelize extension module compilation

2013-01-03 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5309 ___ ___ Python-bugs-list

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-28 Thread Bradley Froehle
Bradley Froehle added the comment: First off, thanks for all the work so far. This has proven incredibly useful to me in a personal project. However, I think there needs to be some additional discussion of how to handle situations where the arguments passed to PyArg_ParseTuple require

[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.

2012-12-20 Thread Bradley Froehle
New submission from Bradley Froehle: Types created using PyType_FromSpec do not have a __module__ attribute by default. This caught me off guard. $ python3 Python 3.2.3 (default, Oct 19 2012, 20:10:41) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information

[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.

2012-12-20 Thread Bradley Froehle
Bradley Froehle added the comment: For example, in PyType_FromSpec can we split the provided name into a module component and name component, and create the '__module__' entry in the dict? -- ___ Python tracker rep...@bugs.python.org http

[issue16740] Types created with PyType_FromSpec lack a __module__ attribute.

2012-12-20 Thread Bradley Froehle
Bradley Froehle added the comment: I see this has already been fixed in Python 3.3. My apologies. -- resolution: - invalid status: open - closed versions: -Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2012-12-19 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16690 ___ ___ Python-bugs-list

[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2012-12-19 Thread Bradley Froehle
Bradley Froehle added the comment: The attached file `heaptype_refcnt_testcases.py` runs through several test cases (ssl.SSLError, a subclass of ssl.SSLError, and xxlimited.Xxo) seeing if references are leaked in each instance. Unfortunately `xxlimited.Xxo` isn't set to be a base type and I

[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2012-12-14 Thread Bradley Froehle
New submission from Bradley Froehle: There is a reference leak when using PyType_FromSpec with custom tp_dealloc. This was first noted in issue #15142, where a fix was given which only applies to types which do not override tp_dealloc. For example, the xxlimited.Xxo type suffers from

[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2012-12-14 Thread Bradley Froehle
Bradley Froehle added the comment: I see this issue came up in the course of #15653 as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16690

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-08 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___ Python-bugs-list

[issue10712] 2to3 fixer for deprecated unittest method names

2012-12-01 Thread Bradley Froehle
Bradley Froehle added the comment: Bikeshedding, but the fixer name of 'asserts' bugs me. I'd suggest 'unittest' or 'unittest_asserts'. -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10712

[issue5141] C API for appending to arrays

2012-11-04 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5141 ___ ___ Python-bugs-list

[issue16378] venv.EnvBuilder docstring inconsistencies

2012-10-31 Thread Bradley Froehle
New submission from Bradley Froehle: Consider the docstring for venv.EnvBuilder:: By default, the builder makes the system (global) site-packages dir available to the created environment. By default, the creation process uses symlinks wherever possible. It seems to suggest

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-10-31 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14803 ___ ___ Python-bugs-list

[issue16268] dir(closure) does not find __dir__

2012-10-30 Thread Bradley Froehle
Bradley Froehle added the comment: Your patch looks good to me, and I can verify that it properly tests for the issue in Python 3.3. On a related note, I've found that PyType_Ready(...) isn't called for a few other core PyTypeObjects... see #16369

[issue16369] Global PyTypeObjects not initialized with PyType_Ready(...)

2012-10-30 Thread Bradley Froehle
New submission from Bradley Froehle: In Python 3.3.0, several global `PyTypeObject`s are not initialized using PyType_Ready(...). The list of uninitialized type objects:: PyCapsule_Type PyLongRangeIter_Type PyFieldNameIter_Type PyFormatterIter_Type PySTEntry_Type PyCell_Type

[issue16268] dir(closure) does not find __dir__

2012-10-29 Thread Bradley Froehle
Bradley Froehle added the comment: This rather obscure bug seems to be caused by a failure to properly initialize PyCell_Type. Running with GDB, we see that _PyType_Lookup(class 'cell', __dir__) fails in: /* Look in tp_dict of types in MRO */ mro = type-tp_mro; /* If mro

[issue16268] dir(closure) does not find __dir__

2012-10-29 Thread Bradley Froehle
Bradley Froehle added the comment: Note that we fail to initialize PyCell_Type in all versions of Python, even if there aren't any visible ramifications in earlier versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue7897] Support parametrized tests in unittest

2012-08-05 Thread Bradley Froehle
Changes by Bradley Froehle brad.froe...@gmail.com: -- nosy: +bfroehle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7897 ___ ___ Python-bugs-list

[issue14768] os.path.expanduser('~/a') doesn't works correctly when HOME is '/'

2012-05-09 Thread Bradley Froehle
New submission from Bradley Froehle brad.froe...@gmail.com: When $HOME=/, os.path.expanduser('~/a') returns '//a' rather than '/a'. This regression was created by a partially incorrect resolution to issue #5471, and affects versions 2.7 and 3.2 (at least). $ HOME=/ python2.7 -c import os

[issue14768] os.path.expanduser('~/a') doesn't works correctly when HOME is '/'

2012-05-09 Thread Bradley Froehle
Bradley Froehle brad.froe...@gmail.com added the comment: Patch (for version 2.7) attached. -- keywords: +patch Added file: http://bugs.python.org/file25514/issue_14768.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14768