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/issue14
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19072
___
___
Python-bugs
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 urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17950
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16429
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17853
___
___
Python-bugs
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__
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17422
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17421
___
___
Python-bugs
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17279
___
___
Python-bugs
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
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
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
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 urban.dani...@gmail.com:
Added file: http://bugs.python.org/file29102/pep422.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17044
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
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
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16894
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16839
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16832
___
___
Python-bugs
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
stage: test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
Changes by Daniel Urban urban.dani...@gmail.com:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16619
___
___
Python-bugs
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16602
___
___
Python-bugs
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
Daniel Urban added the comment:
Both work fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16607
___
___
Python-bugs-list mailing list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16572
___
___
Python-bugs
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
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
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
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 urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16545
___
___
Python-bugs
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
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
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13266
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
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14631
___
___
Python-bugs
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15397
___
___
Python-bugs
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
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15243
___
___
Python-bugs
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
components: +Extension Modules -Library (Lib)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14965
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14857
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12370
___
___
Python-bugs-list
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
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
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
Daniel Urban urban.dani...@gmail.com added the comment:
Fair enough.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14588
___
___
Python-bugs
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14051
___
___
Python-bugs-list
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13266
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13264
___
___
Python-bugs-list
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__
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13062
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12857
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12850
___
___
Python-bugs-list
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12775
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12735
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12732
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12691
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12675
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12657
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12647
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12617
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12608
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12599
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8639
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12459
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12457
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12374
___
___
Python-bugs-list
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12128
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10271
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1748064
___
___
Python-bugs-list
1 - 100 of 271 matches
Mail list logo