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/is
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue19072>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17950>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16429>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17853>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
ret
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17421>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17422>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 so
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
<http://bugs.python.org/is
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue17279>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
Added file: http://bugs.python.org/file29102/pep422.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list mailin
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__
Changes by Daniel Urban :
Added file: http://bugs.python.org/file29098/pep422_4.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list m
Changes by Daniel Urban :
Removed file: http://bugs.python.org/file29097/pep422_4.patch
___
Python tracker
<http://bugs.python.org/issue17044>
___
___
Python-bugs-list m
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 pytho
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 "", line 1, in
TypeError: type() takes 1 or 3 ar
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
<http://bugs.python.org/is
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,
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,
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16894>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue16839>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16832>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
As John Hampton have explained it, the documentation is actually correct.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Changes by Daniel Urban :
--
stage: test needed -> patch review
___
Python tracker
<http://bugs.python.org/issue12915>
___
___
Python-bugs-list mailing list
Un
Changes by Daniel Urban :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue11159>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16619>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Both work fine.
--
___
Python tracker
<http://bugs.python.org/issue16607>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Could you please point to a specific example which is incorrect? Thank you.
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16602>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
<http://bugs.python.org/is
Changes by Daniel Urban :
--
stage: -> needs patch
type: -> enhancement
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/i
Changes by Daniel Urban :
--
stage: -> patch review
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue16584>
___
___
Python-bugs-list
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16572>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Sorry, I won't have time for that in the following weeks.
--
___
Python tracker
<http://bugs.python.org/issue16554>
___
___
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.
--
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 b
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
Changes by Daniel Urban :
--
resolution: -> duplicate
superseder: -> Integrate pickle protocol version 4 GSoC work by Stefan Mihaila
___
Python tracker
<http://bugs.python.org/i
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
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
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16545>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue16546>
___
___
Python-bugs-list mailing list
Unsubscribe:
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:
Changes by Daniel Urban :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue13266>
___
___
Python-bugs-list mailing list
Un
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
<http://bugs.python.org/is
Changes by Daniel Urban :
Removed file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch
___
Python tracker
<http://bugs.python.org/issue16522>
___
___
Pytho
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.
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue14631>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue15397>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban 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 thi
Daniel Urban 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
Daniel Urban 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
<
Changes by Daniel Urban :
--
nosy: +daniel.urban
___
Python tracker
<http://bugs.python.org/issue15243>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
components: +Extension Modules -Library (Lib)
___
Python tracker
<http://bugs.python.org/issue14965>
___
___
Python-bugs-list mailin
Daniel Urban 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 thi
Daniel Urban 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 trac
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12370>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue14857>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban 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
Daniel Urban 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
<http://bugs.python.org/is
Daniel Urban 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
Daniel Urban added the comment:
Fair enough.
--
___
Python tracker
<http://bugs.python.org/issue14588>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban 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 thin
New submission from Daniel Urban :
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
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue14051>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
> It seems to me this is not a bug.
+1
--
___
Python tracker
<http://bugs.python.org/issue13264>
___
___
Python-bugs-list mai
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue13266>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban 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__['
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue13264>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue13062>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12915>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12850>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12857>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12775>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
versions: +Python 3.3 -Python 2.7
___
Python tracker
<http://bugs.python.org/issue12772>
___
___
Python-bugs-list mailin
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12732>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12735>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12675>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12691>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12657>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12647>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12617>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12599>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12608>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12575>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban 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 F
Daniel Urban 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.pytho
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue8639>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12457>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12459>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12374>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I've posted some comments on Rietveld.
--
___
Python tracker
<http://bugs.python.org/issue11610>
___
___
Python-bugs-list m
Daniel Urban added the comment:
It doesn't work with staticmethod:
>>> import abc
>>>
>>> class C(metaclass=abc.ABCMeta):
... @staticmethod
... @abc.abstractmethod
... def foo(x):
... raise NotImplementedError()
...
>>> clas
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12128>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue10271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12077>
___
___
Python-bugs-list mailing list
Unsubscribe:
1 - 100 of 271 matches
Mail list logo