[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7a7b698f6f21 by Antoine Pitrou in branch 'default': Issue #13577: Built-in methods and functions now have a __qualname__. http://hg.python.org/cpython/rev/7a7b698f6f21 --

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch is committed, thank you! -- resolution: - rejected stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. Since you modified PyCFunction_GET_SELF to return NULL for static methods, why not simply use it instead of manually looking up the flags in several places? I'm talking about the following changes: -PyObject *self =

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-21 Thread sbt
sbt shibt...@gmail.com added the comment: A simplified patch getting rid of _PyCFunction_GET_RAW_SELF(). -- Added file: http://bugs.python.org/file24068/method_qualname.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-13 Thread sbt
sbt shibt...@gmail.com added the comment: sbt, have you been running the test suite before submitting patches? If not, then please do. I ran it after I submitted. Sorry. Here is another patch. It also makes sure that __self__ is reported as None when METH_STATIC. -- Added file:

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, a couple of further (minor) issues: - I don't think AssertionError is the right exception type. TypeError should be used when a type mismatches (e.g. not an unicode object); - you don't need to check for d_type being NULL, since other methods

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread sbt
sbt shibt...@gmail.com added the comment: Patch which add __qualname__ to builtin_function_or_method. Note that I had to make a builtin staticmethod have __self__ be the type instead of None. -- Added file: http://bugs.python.org/file23926/method_qualname.patch

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread sbt
sbt shibt...@gmail.com added the comment: Ok, a couple of further (minor) issues: - I don't think AssertionError is the right exception type. TypeError should be used when a type mismatches (e.g. not an unicode object); - you don't need to check for d_type being NULL, since other methods

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 24238e89f938 by Antoine Pitrou in branch 'default': Issue #13577: various kinds of descriptors now have a __qualname__ attribute. http://hg.python.org/cpython/rev/24238e89f938 -- nosy: +python-dev

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: About method_qualname.patch: - apparently you forgot to add BuiltinFunctionPropertiesTest in test_main()? - a static method keeps a reference to the type: I think it's ok, although I'm not sure about the consequences (Guido, would you have an

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread sbt
sbt shibt...@gmail.com added the comment: - apparently you forgot to add BuiltinFunctionPropertiesTest in test_main()? Yes. Fixed. - a static method keeps a reference to the type: I think it's ok, although I'm not sure about the consequences (Guido, would you have an idea?)

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-12 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: For the most part this looks OK, but I am not sure about this hunk: diff --git a/Objects/typeobject.c b/Objects/typeobject.c --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3724,7 +3724,7 @@ add_methods(PyTypeObject *type, PyMethod

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt shibt...@gmail.com added the comment: I already have a patch for the descriptor types which lazily calculates the __qualname__. However test.test_sys also needs fixing because it tests that these types have expected sizes. I have not got round to builtin_function_or_method though.

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt shibt...@gmail.com added the comment: Updated patch which fixes test.test_sys.SizeofTest. (It also adds __qualname__ to member descriptors and getset descriptors.) -- Added file: http://bugs.python.org/file23914/descr_qualname.patch ___ Python

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch should add some tests for the added functionality (I'm not sure where, but perhaps test_descr is a good location). Also, just a nitpick, you can use _PyObject_GetAttrId and the _Py_IDENTIFIER macro instead of interning the

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt shibt...@gmail.com added the comment: Note that extension (non-builtin) types will need to have their __qualname__ fixed before their methods' __qualname__ is usable: collections.deque.__qualname__ 'deque' I'm confused. Isn't that the expected behaviour? Since the deque class is

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Note that extension (non-builtin) types will need to have their __qualname__ fixed before their methods' __qualname__ is usable: collections.deque.__qualname__ 'deque' I'm confused. Isn't that the expected behaviour? Since the

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt shibt...@gmail.com added the comment: New version of the patch with tests and using _Py_IDENTIFIER. -- Added file: http://bugs.python.org/file23922/descr_qualname.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-10 Thread Meador Inge
New submission from Meador Inge mead...@gmail.com: I was recently experimenting with the new PEP 3155 '__qualname__ implementation and noticed that '__qualname__' is not present on builtin methods and functions: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:aab45b904141+,