[issue14965] super() and property inheritance behavior
Daniel Urban added the comment: @habnabit I believe I've already signed some contributor form some years ago. If there is a new one, I can sign that one too. -- ___ Python tracker <https://bugs.python.org/issue14965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19072 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19022] Improve handling of type.__abstractmethods__ descriptor
Daniel Urban added the comment: I like the 3rd alternative the most. It seems to me, that __abstractmethods__ is currently an undocumented implementation detail of ABCs. The 1st alternative would cause every type to have an empty __abstractmethods__ (which is technically correct, but probably not very useful). It seems to me that the 2nd alternative would not help very much in the original problem mentioned in issue10006 (automatically looking up every name found in dir). So I think, that the best would be to fix type.__dir__ this way. (Although, if we really want to document and use __abstractmethods__ on every type, then of course we should do the 1st alternative.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19022 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17950] Dynamic classes contain non-breakable reference cycles
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16429] Emit SyntaxWarning for code that risks UnboundLocalError
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] class construction name resolution broken in functions
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: I've attached a new patch. With this patch, type.__prepare__ has an optional keyword-only argument 'namespace', and returns it if it's specified. Also, __init_class__ is passed an argument: a mapping proxy of the mapping originally returned by __prepare__. Would it make sense to have the signature of __init_class__ parallel meta.__init__() I don't think so, because some of the arguments (name, bases) would be mostly useless, others would have a different meaning (namespace). Although, passing the keyword arguments from the class header might make some sense ... I'm not sure. If everybody agrees with these changes, I'll create a patch for the PEP too. -- Added file: http://bugs.python.org/file29851/pep422_6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17422] language reference should specify restrictions on class namespace
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: I've looked into implementing the changes in the new version of the PEP. It seems, that currently type.__new__ copies the dict returned by __prepare__ (http://hg.python.org/cpython/file/55806d234653/Objects/typeobject.c#l2058). I think this means that some of the new examples wouldn't work (Order preserving classes and Extending a class). It also means, that currently it is impossible for two classes to share a namespace object (possibly this was the intention of copying the dict). So the Note in the PEP wouldn't be necessary (unless type.__new__ were modified). I'm not sure if the PEP proposes to change this behavior of type.__new__ or not... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11480] Cannot copy a class with a metaclass other than type
Daniel Urban added the comment: I did, and I've been told that it has been added to the bug tracker: http://mail.python.org/pipermail/python-committers/2012-May/001987.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17279] Document which named built-in classes can be subclassed
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: Thanks for the grammar correction, I've fixed it in the new patch. The new patch also adds object.__init_class__ (which is a no-op), to support cooperative multiple inheritance of __init_class__. (Adding type.__init_class__ was mentioned in the python-dev discussion, but that is not sufficient, so I've added this method to object instead of type.) Tests are also updated. I'll update the docs, if this change is OK. -- Added file: http://bugs.python.org/file29097/pep422_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Changes by Daniel Urban urban.dani...@gmail.com: Removed file: http://bugs.python.org/file29097/pep422_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Changes by Daniel Urban urban.dani...@gmail.com: Added file: http://bugs.python.org/file29098/pep422_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: Yes, if we would add a regular (instance) method __init_class__ to type, it could (probably) work for regular (non-meta) classes, but not for metaclasses. If a metaclass Meta wouldn't define __init_class__ itself, calling Meta.__init_class__() in __build_class__ wouldn't work, since Meta would inherit the *instance* method from type (its superclass). We might be able to make this work somehow (I'm not sure), but I think adding it to object as a classmethod works fine, and doesn't require special casing. The attached patch documents, that object has an __init_class__ (and also adds some extra tests). I'll attach a patch to the PEP as well. -- Added file: http://bugs.python.org/file29101/pep422_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Changes by Daniel Urban urban.dani...@gmail.com: Added file: http://bugs.python.org/file29102/pep422.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17179] Incorrect use of type function in types.new_class
Daniel Urban added the comment: I don't think this is a bug: from datetime import datetime class tdatetime(datetime, foo='bar'): ... pass ... Traceback (most recent call last): File stdin, line 1, in module TypeError: type() takes 1 or 3 arguments -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17179 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: I'm attaching a new patch with some documentation and one additional test. -- Added file: http://bugs.python.org/file28912/pep422_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
New submission from Daniel Urban: The attached patch implements PEP 422 -- Simple class initialisation hook (__init_class__). It includes tests, but it doesn't include documentation yet. -- components: Interpreter Core, Library (Lib) files: pep422_1.patch keywords: needs review, patch messages: 180714 nosy: daniel.urban, ncoghlan priority: normal severity: normal stage: patch review status: open title: Implement PEP 422: Simple class initialisation hook type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28859/pep422_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17044] Implement PEP 422: Simple class initialisation hook
Daniel Urban added the comment: Thanks for the review Ezio! I've fixed the order of the arguments of assertEqual. Regarding your other comment: I agree that your code is shorter and clearer, but it doesn't do exactly the same thing. cls.__init_class__ can be None, and in that case, we should call it (the user should get a TypeError). So the getattr call would need another sentinel object. And with that sentinel, I don't think the code would be shorter and clearer any more. -- Added file: http://bugs.python.org/file28867/pep422_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16894] Function attribute access doesn't invoke methods in dict subclasses
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16839] segmentation fault when unicode(classic_class_instance)
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16832] Expose cache validity checking support in ABCMeta
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16607] Bad examples in documentation
Daniel Urban added the comment: As John Hampton have explained it, the documentation is actually correct. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12915] Add inspect.locate and inspect.resolve
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11159] Sax parser crashes if given unicode file name
Changes by Daniel Urban urban.dani...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11159 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12457] type() returns incorrect type for nested classes
Daniel Urban added the comment: I don't know what is the protocol for duplicates when the superseder is still open. If they should be closed, then I think yes, this should be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16602] weakref can return an object with 0 refcount
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16607] Bad examples in documentation
Daniel Urban added the comment: Could you please point to a specific example which is incorrect? Thank you. -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16607] Bad examples in documentation
Daniel Urban added the comment: Both work fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16599] unittest: Access test result from tearDown
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: - needs patch type: - enhancement versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: - patch review type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Daniel Urban added the comment: Thanks for the review! Nick, the example with Outer, InnerParent and InnerChild still works (the evaluation happens before we enter the new scope). Of course you're all right about __args__ and __kw__. I'll try to find a way to hide them. -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect
Daniel Urban added the comment: Sorry, I won't have time for that in the following weeks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16554 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Daniel Urban added the comment: I tried to implement Nick's idea with the separate scope for __class__. It seems to work, I'm attaching a patch. The patch basically causes the following class statement: class C(A, B, metaclass=meta): def f(self): return __class__ To be compiled approximately like this: def _outer_C(*__args__, **__kw__): class _inner_C(*__args__, **__kw__): def f(self): return __class__ __class__ = _inner_C return _inner_C C = _outer_C(A, B, metaclass=meta) It also includes some tests. (The patch also changes the magic number in Lib/importlib/_bootstrap.py. This caused Python/importlib.h to be regenerated, but I didn't included those changes in the patch, because its a lot, and not very human-readable. Please tell me if I need to include them.) -- components: +Interpreter Core keywords: +needs review, patch stage: needs patch - patch review versions: +Python 3.4 Added file: http://bugs.python.org/file28134/class_super_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect
New submission from Daniel Urban: The description of the argument of the MAKE_FUNCTION and MAKE_CLOSURE opcodes in the documentation of the dis module is incorrect. Patch attached. -- assignee: docs@python components: Documentation files: make_function_closure.patch keywords: needs review, patch messages: 176390 nosy: daniel.urban, docs@python priority: normal severity: normal stage: patch review status: open title: The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28125/make_function_closure.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16554 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16546] ast.YieldFrom needlessly has its expr value as optional
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16546 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16545 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present
Daniel Urban added the comment: If I understand correctly, the invariant is that len(kw_defaults) == len(kwonlyargs). I think the reason is that the following is valid syntax (an argument without a default after one with a default): def f(*, a=0, b): pass ... And None is used as a placeholder in the kw_defaults list: ast.dump(ast.parse('def f(*, a=0, b): pass')) Module(body=[FunctionDef(name='f', args=arguments(args=[], vararg=None, varargannotation=None, kwonlyargs=[arg(arg='a', annotation=None), arg(arg='b', annotation=None)], kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[Num(n=0), None]), body=[Pass()], decorator_list=[], returns=None)]) So it seems to me, that this behavior is intentional. (Also, it works no differently in 3.2.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16545 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12457] type() returns incorrect type for nested classes
Daniel Urban added the comment: Also, it seems, that pickling inner classes will by supported by pickle protocol version 4 (see PEP 3154). There is already an issue for the implementation: issue15642. -- versions: +Python 3.4 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12457] type() returns incorrect type for nested classes
Changes by Daniel Urban urban.dani...@gmail.com: -- resolution: - duplicate superseder: - Integrate pickle protocol version 4 GSoC work by Stefan Mihaila ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16538] The docs doesn't describe MAKE_CLOSURE correctly
New submission from Daniel Urban: The documentation of the dis module describes the MAKE_CLOSURE opcode incorrectly. The description of MAKE_FUNCTION was updated in 242d3f8e8c50 (issue14349) to include the qualified name, but MAKE_CLOSURE wan't. A patch is attched. -- assignee: docs@python components: Documentation files: make_closure.patch keywords: needs review, patch messages: 176166 nosy: daniel.urban, docs@python priority: normal severity: normal stage: patch review status: open title: The docs doesn't describe MAKE_CLOSURE correctly versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28086/make_closure.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16538 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16522] Add 'FAIL_FAST' flag to doctest
Daniel Urban added the comment: I've added some tests and documentation. English is not my first language, so the docs almost certainly need some correction. -- nosy: +daniel.urban Added file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16522] Add 'FAIL_FAST' flag to doctest
Changes by Daniel Urban urban.dani...@gmail.com: Removed file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16522] Add 'FAIL_FAST' flag to doctest
Daniel Urban added the comment: I'm sorry, I forgot the versionadded directive. The fixed patch is attached. -- Added file: http://bugs.python.org/file28067/doctest_fail_fast_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14631] Instance methods and WeakRefs don't mix.
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Daniel Urban added the comment: I've attached a patch addressing the comments on Rietveld. I've added another modification: inspect.signature uses inspect.unwrap. (It already tried to unwrap the function, but it wasn't protected from infinite recursion. I don't know if this worth fixing in 3.3.) -- Added file: http://bugs.python.org/file27876/inspect_unwrap_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15397] Unbinding of methods
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15243] Misleading documentation for __prepare__
Daniel Urban urban.dani...@gmail.com added the comment: __prepare__ is not implicitly a staticmethod, and it is called exactly as documented (also in types.prepare_class). There is no implicit first argument because the method is called on the (meta)class object. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15243] Misleading documentation for __prepare__
Daniel Urban urban.dani...@gmail.com added the comment: Actually the docs contained a similar sentence (If the metaclass has a :meth:`__prepare__` attribute (usually implemented as a class or static method), ...), but it was removed in befd56673c80 when Nick rewrote this section. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15245] ast.literal_eval fails on some literals
Daniel Urban urban.dani...@gmail.com added the comment: eval(repr(float('nan'))) doesn't work either, so I'm not sure ast.literal_eval should. The same with float('inf'). -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15245 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15243] Misleading documentation for __prepare__
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Daniel Urban urban.dani...@gmail.com added the comment: I'm attaching a patch implementing super.__setattr__ (and __delattr__). The implementation in the patch only works, if super can find a data descriptor in the MRO, otherwise it throws an AttributeError. As it can be seen in the tests, in some cases this may result in counter-intuitive behaviour. But I wasn't able to find another behaviour, that is consistent with both super.__getattr__ and normal __setattr__ semantics. -- keywords: +patch nosy: +daniel.urban Added file: http://bugs.python.org/file25820/super_setattr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Changes by Daniel Urban urban.dani...@gmail.com: -- components: +Extension Modules -Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11480] Cannot copy a class with a metaclass other than type
Daniel Urban urban.dani...@gmail.com added the comment: I've updated the patch to the current version. I've also checked, that the tests still pass. -- nosy: +ncoghlan Added file: http://bugs.python.org/file25806/copy_metaclass_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14857] Direct access to lexically scoped __class__ is broken in 3.3
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12370] Use of super overwrites use of __class__ in class namespace
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14588] PEP 3115 compliant dynamic class creation
Daniel Urban urban.dani...@gmail.com added the comment: Here is my first attempt at creating a pure Python version of the operator.build_class function (in my previous patch) as types.new_class. The three added functions (two private and one public) correspond to the following functions in my previous patch: types.new_class - operator.build_class types._prepare_ns - prepare_namespace in typeobject.c types._calculate_mcls - calculate_metaclass in typeobject.c (currently _PyType_CalculateMetaclass) (In Python these functions are quite short, so they may be merged. But this separation may be better for documentation purposes...) The tests are mostly the same as in my previous patch. -- components: +Library (Lib) Added file: http://bugs.python.org/file25546/types_new_class.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Daniel Urban urban.dani...@gmail.com added the comment: I've attached a patch implementing inspect.unwrap (+ some tests). -- keywords: +patch Added file: http://bugs.python.org/file25368/inspect_unwrap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14588] PEP 3115 compliant dynamic class creation
Daniel Urban urban.dani...@gmail.com added the comment: I've attached the third patch with the eval_body - exec_body change; explicitly passing the default (None) now also allowed. I also fixed a refleak (I think). -- Added file: http://bugs.python.org/file25292/operator_build_class_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14588] PEP 3115 compliant dynamic class creation
Daniel Urban urban.dani...@gmail.com added the comment: Fair enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14588] PEP 3115 compliant dynamic class creation
Daniel Urban urban.dani...@gmail.com added the comment: I've attached a patch with more tests. I simply copied and modified the tests about metaclass calculation and __prepare__ in test_descr.py, to create the tested classes with operator.build_class (and not the class statement). Although, there is one thing I'm not sure I like about the API in the current patch: the dictionary corresponding to the keyword arguments of the class statement cannot be passed as keyword arguments. For example, I can't write this: C = operator.build_class('C', (A, B), metaclass=MyMeta) I have to write this: C = operator.build_class('C', (A, B), {'metaclass': MyMeta}) (The reason for this is that the eval_body argument is the last.) What would you think about the following signature for build_class? build_class(name, bases=(), eval_body=None, **kwargs) The fist 3 argument could be positional only, and all keyword arguments would go into the dict. A downside is that the user would have to explicitly pass None as the 3rd argument, if they don't need an eval_body, but need keyword-arguments. Also, the 'bases' and the keyword arguments wouldn't be close to each other as in the class statement... -- Added file: http://bugs.python.org/file25263/operator_build_class_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14588] PEP 3115 compliant dynamic class creation
New submission from Daniel Urban urban.dani...@gmail.com: As Nick Coghlan proposed [1, 2], there should be a way to dynamically create classes, which handles metaclasses correctly (see also issue1294232). Here is my first attempt at creating an operator.build_class method. It only includes very simple tests and no documentation, but I will write them if needed. With this patch there are two functions for creating a class object: 1. __build_class__ (no change) 2. operator.build_class(name, bases=(), kwds=None, eval_body=None): finds the correct metaclass and calls its __prepare__. If eval_body is given, calls it with the namespace returned by __prepare__. Then calls the correct metaclass, and returns the created class object. Both of these functions (after parsing their arguments) call _PyType_BuildClass, a new C API function. The first argument of this function is a callable, that will be called with the namespace returned by __prepare__ (it also can be NULL, in that case nothing will be called). __build_class__ passes the function that is the body of the class statement. operator.build_class passes the callable given by the user (or NULL, if the user didn't pass the eval_body argument). The implementation of _PyType_BuildClass is approximately the following: def _PyType_BuildClass(func=None, name, bases, kwds={}): meta = kwds.pop('metaclass', None) if meta is None: if not bases: meta = type else: meta = type(bases[0]) ns, meta = prepare_namespace(name, meta, bases, kwds) if func is not None: func(ns) return meta(name, bases, ns, kwds) (Actually the return value of the func is used if it's a cell object. I'm not sure, why and when this is needed, this code comes from __build_class__.) The changes are in the following files: 1. object.h: the exported function is _PyType_BuildClass instead of _PyType_CalculateMetaclass (that doesn't need to be in the include file anymore). 2. operator.c: the build_class method checks its arguments, then calls _PyType_BuildClass. 3. typeobject.c: _PyType_CalculateMetaclass is renamed to calculate_metaclass, because now it is only called from this file. prepare_namespace calls calculate_metaclass to determine the correct metaclass, then calls its __prepare__ method. (This code is moved here mostly from __build_class__). It also passes back the correct metaclass to its caller. _PyType_BuildClass gets the starting metaclass from its arguments. Then it calls prepare_namespace to get the namespace and the correct metaclass. If it received a non-NULL first argument (the function that is the class body or the eval_body argument of operator.build_class), then calls it, passing the namespace. Then it calls the correct metaclass. (Most of this code is also from __build_class__.) 4. bltinmodule.c: builtin___build_class__ now only parses its arguments, and simply calls _PyType_BuildClass. 5. test_operator.py: a simple test for operator.build_class [1] http://mail.python.org/pipermail/python-dev/2011-April/110874.html [2] http://mail.python.org/pipermail/python-dev/2012-April/118732.html -- components: Extension Modules, Interpreter Core files: operator_build_class.patch keywords: patch messages: 158382 nosy: durban, ncoghlan priority: normal severity: normal status: open title: PEP 3115 compliant dynamic class creation type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25231/operator_build_class.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13264] Monkeypatching using metaclass
Daniel Urban urban.dani...@gmail.com added the comment: It seems to me this is not a bug. +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13264] Monkeypatching using metaclass
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13264] Monkeypatching using metaclass
Daniel Urban urban.dani...@gmail.com added the comment: class Meta(ABCMeta): def __instancecheck__(cls, instance): # monkeypatching class method cls.__subclasscheck__ = super(Meta, cls).__subclasscheck__ This line is approximately the same as: cls.__dict__['__subclasscheck__'] = ... So it will put the object in the namespace of cls. The function in the namespace of type(cls) will remain there. (Also, the object you put in there is a bound method, so this is probably not what you want.) return super(Meta, cls).__instancecheck__(instance) def __subclasscheck__(cls, sub): return cls in sub.mro() class A(object): __metaclass__ = Meta class B(object): pass # registering class 'B' as a virtual subclass of 'A' A.register(B) issubclass(B, A) False isinstance(B(), A) # = method __subclasscheck__ is now monkeypatched A.__dict__['__subclasscheck__'] is now indeed the other method you put in there, but issubclass will call type(A).__dict__['__subclasscheck__'] which remain the same. (Because __special__ methods a looked up directly in the namespace of the type of an object, see http://docs.python.org/dev/py3k/reference/datamodel#special-lookup). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13264 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13062] Introspection generator and function closure state
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12915] Add inspect.locate and inspect.resolve
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12857] Expose called function on frame object
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12772] fractional day attribute in datetime class
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12775] immense performance problems related to the garbage collector
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12735] request full Unicode collation support in std python library
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12732] Can't portably use Unicode in Python identifiers
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12691] tokenize.untokenize is broken
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12691 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12675] tokenize module happily tokenizes code with syntax errors
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12675 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12657] Cannot override JSON encoding of basic type subclasses
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12647] Add __bool__ to None
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12617] Mutable Sequence Type can work not only with iterable in slice[i:j] = t
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12608] crash in PyAST_Compile when running Python code
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12599] Use 'is not None' where appropriate in importlib
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12575] add a AST validator
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12559] gzip.open() needs an optional encoding argument
Daniel Urban urban.dani...@gmail.com added the comment: If we go this way, the errors and newline argument should be added as well. Yeah, I thought about that. I can make a new patch, that implement this, if needed. Though it seems there is a real problem, the one that Amaury Forgeot d'Arc mentioned. I can't think of a way to solve it in a backwards compatible way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12559] gzip.open() needs an optional encoding argument
Daniel Urban urban.dani...@gmail.com added the comment: Here is a patch. If the code changes are acceptable I can also make a documentation patch. (I'm surprised to see 3.2 in Versions. I thought 3.2 only gets bugfixes...) -- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file22661/issue12559.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8639] Allow callable objects in inspect.getargspec
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8639 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12459] time.sleep(-1.0) behaviour
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12457] type() returns incorrect type for nested classes
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12374] Execution model should explain compile vs definition vs execution time
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11610] Improved support for abstract base classes with descriptors
Daniel Urban urban.dani...@gmail.com added the comment: I've posted some comments on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11610] Improved support for abstract base classes with descriptors
Daniel Urban urban.dani...@gmail.com added the comment: It doesn't work with staticmethod: import abc class C(metaclass=abc.ABCMeta): ... @staticmethod ... @abc.abstractmethod ... def foo(x): ... raise NotImplementedError() ... class D(C): ... @staticmethod ... def foo(x): ... return x + 1 ... D() Traceback (most recent call last): File stdin, line 1, in module TypeError: Can't instantiate abstract class D with abstract methods foo.__func__ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12128] Allow `abc.abstractproperty` to be overridden by a data attribute
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10271] warnings.showwarning should allow any callable object
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1748064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com