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
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
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
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
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +bfroehle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5309
___
___
Python-bugs-list
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
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
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
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16690
___
___
Python-bugs-list
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
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
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +bfroehle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs-list
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +bfroehle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5141
___
___
Python-bugs-list
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +bfroehle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14803
___
___
Python-bugs-list
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
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
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
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
Changes by Bradley Froehle brad.froe...@gmail.com:
--
nosy: +bfroehle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7897
___
___
Python-bugs-list
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
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
26 matches
Mail list logo