[issue11770] inspect.dir_static

2011-04-08 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11770> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11796> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11823] disassembly needs to argument counts on calls with keyword args

2011-04-10 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11823> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread Daniel Urban
New submission from Daniel Urban : slice.indices behaves strangely with negative step and default stop values (note that the doc says that it "computes information about the slice that the slice object would describe if applied to a sequence of length items"): >>> s = s

[issue11842] slice.indices with negative step and default stop

2011-04-14 Thread Daniel Urban
Daniel Urban added the comment: I see. Thanks for the explanation. If indeed this is the expected behaviour (as it seems), then I suggest clarifying the documentation. I think it would be good to mention that the returned values are for range(), and not for creating another slice object

[issue11845] Refcounting error in compute_slice_indices in rangeobject.c

2011-04-14 Thread Daniel Urban
New submission from Daniel Urban : The attached crash.py script reliably crashes the 3.2 and 3.3 interpreter on my machine. The script does a lot of range slicing. I think there is a typo in compute_slice_indices() in rangeobject.c, in line 475. In line 474 there is an assign to tmp_stop, and

[issue9896] Introspectable range objects

2011-04-17 Thread Daniel Urban
Daniel Urban added the comment: Now that the moratorium has already ended, I'll try again. I've updated the patch. It seems, that this idea has already came up in the past: Guido in msg70525 said: "I also think ranges should be introspectable, exposing their start, stop

[issue1294232] Error in metaclass search order

2011-04-19 Thread Daniel Urban
Daniel Urban added the comment: Thanks for the review! I've updated my patch: - renamed it to _PyType_CalculateMetaclass - in __build_class__ call it even when a metaclass is declared - added a test for this case (which fails with my previous patch) However I noticed another problem

[issue9896] Introspectable range objects

2011-04-19 Thread Daniel Urban
Daniel Urban added the comment: Thanks, I've corrected my patch. -- Added file: http://bugs.python.org/file21733/range_attrs_3.patch ___ Python tracker <http://bugs.python.org/i

[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11875> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1294232] Error in metaclass search order

2011-04-20 Thread Daniel Urban
Daniel Urban added the comment: That may be, but with my latest patch, this works (func is a function): class X(metaclass=func): pass But this blows up with a TypeError: class X(object, metaclass=func): pass Is this the desired behaviour? Or should we disallow non-class metaclasses

[issue1294232] Error in metaclass search order

2011-04-21 Thread Daniel Urban
Daniel Urban added the comment: I'm attaching the updated patch. Changes: - Special casing objects we can't do the metaclass computation for. - Tests for these. - Adding tests for the order of __new__ calls. The special case isn't just checking if the object is a class, but in

[issue1294232] Error in metaclass search order

2011-04-21 Thread Daniel Urban
Daniel Urban added the comment: I've just realized, that my patch still breaks a case, that previously worked: when the bases are not classes. This works in 3.2, but not with my patch: >>> class Foo: # not a subclass of type! ... def __new__(mcls, name='foo&#x

[issue1294232] Error in metaclass search order

2011-04-21 Thread Daniel Urban
Daniel Urban added the comment: Okay, probably the check in my previous patch was too strict (sorry for the noise). I'm attaching an updated patch again. Now the algorithm in __build_class__ is this: 1. If an object is explicitly given with the metaclass keyword, that is the &quo

[issue1294232] Error in metaclass search order

2011-04-21 Thread Daniel Urban
Changes by Daniel Urban : Removed file: http://bugs.python.org/file21755/issue11256_4.patch ___ Python tracker <http://bugs.python.org/issue1294232> ___ ___ Python-bug

[issue1294232] Error in metaclass search order

2011-04-21 Thread Daniel Urban
Changes by Daniel Urban : Added file: http://bugs.python.org/file21756/issue_1294232_4.patch ___ Python tracker <http://bugs.python.org/issue1294232> ___ ___ Python-bug

[issue11944] Function call with * and generator hide exception raised by generator.

2011-04-28 Thread Daniel Urban
Daniel Urban added the comment: This may be the same/similar as issue4806 (which has a patch). -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11

[issue11924] Pickle and copyreg modules don't document the interface

2011-04-29 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11924> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-29 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11945> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11949] Make float('nan') unorderable

2011-04-29 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11762] Ast doc: warning and version number

2011-04-30 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11762> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11967> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12022] AttributeError should report the same details when raised by lookup_special() as when raised in the REPL

2011-05-07 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue12022> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12029] ABC registration of Exceptions

2011-05-08 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue12029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue1748064> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12077] Harmonizing descriptor protocol documentation

2011-05-16 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue12077> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10271] warnings.showwarning should allow any callable object

2011-05-18 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12128] Allow `abc.abstractproperty` to be overridden by a data attribute

2011-05-20 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue12128> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4113] Add custom __repr__ to functools.partial

2010-11-19 Thread Daniel Urban
Daniel Urban added the comment: Here is a patch. It includes tests. -- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file19637/issue4113.diff ___ Python tracker <http://bugs.python.org/issue4

[issue4113] Add custom __repr__ to functools.partial

2010-11-19 Thread Daniel Urban
Daniel Urban added the comment: Well, of course it can be done with PyUnicode_Concat (obviously, since PyUnicode_AppendAndDel uses that). I used PyUnicode_AppendAndDel because that function does exactly what I needed. I don't see why PyUnicode_AppendAndDel should be deprecated. Anyway,

[issue10474] range.count returns boolean

2010-11-20 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10474> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10518] Bring back callable()

2010-11-25 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10518> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-28 Thread Daniel Urban
New submission from Daniel Urban : If the type of x defines __next__, but not __iter__, isinstance(x, collections.Iterator) returns True, but in fact x isn't iterable. >>> class X: ... def __next__(self): ... raise StopIteration() ... >>> x

[issue8743] set() operators don't work with collections.Set instances

2010-12-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue8743> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10589] I/O ABC docs should specify which methods have implementations

2010-12-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10589> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10623] What’s New In Python 3.2 document re fers to PEP 382: Defining a Stable ABI

2010-12-04 Thread Daniel Urban
New submission from Daniel Urban : But "Defining a Stable ABI" is PEP 384: http://www.python.org/dev/peps/pep-0384/ (PEP 382 is "Namespace Packages") -- assignee: d...@python components: Documentation messages: 123345 nosy: d...@python, durban priority: normal sev

[issue1294232] Error in metaclass search order

2010-12-05 Thread Daniel Urban
Daniel Urban added the comment: > What also worries me is the difference between the "class" > statement and the type() function. I think the reason of this is that the class statement uses the __build_class__ builtin function. This function determines the metaclass to use

[issue5587] vars() no longer has a useful __repr__

2010-12-05 Thread Daniel Urban
Daniel Urban added the comment: Based on David Stanek's patch I've made a patch against the current py3k branch. The only difference is, that dict_proxy.__repr__ instead of simply returning the repr of the dict, returns approximately "dict_proxy({!r})".format(self.dic

[issue5587] vars() no longer has a useful __repr__

2010-12-05 Thread Daniel Urban
Daniel Urban added the comment: > Thanks for the patch! Can you include also a test that verifies > that the repr is printed correctly? Sure. Where should I put the test? I didn't found any dict_proxy tests, except in test_descr.py ("# Classes don't allow __dict__ assignm

[issue10630] dict_proxy.keys() / values() / items() are lists

2010-12-05 Thread Daniel Urban
New submission from Daniel Urban : The keys, values and items methods of dict_proxy return a list, while dict.keys, etc. return dictionary views (dict_keys, etc.). dict_proxy is used as the __dict__ attribute of classes. This is documented at http://docs.python.org/dev/py3k/reference

[issue5587] vars() no longer has a useful __repr__

2010-12-06 Thread Daniel Urban
Daniel Urban added the comment: Okay, I found it :-) Here is a new patch, now with a test. -- Added file: http://bugs.python.org/file19966/issue5587b.diff ___ Python tracker <http://bugs.python.org/issue5

[issue10667] collections.Counter object in C

2010-12-10 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10667> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10768] Bug in scrolledtext

2010-12-24 Thread Daniel Urban
Daniel Urban added the comment: It probably also works if | is used instead of +, because in 3.2 dict_proxy.keys() are a dict_keys, not a list. See issue10630 . -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10

[issue10768] Bug in scrolledtext

2010-12-24 Thread Daniel Urban
Daniel Urban added the comment: I don't think, that this is in an example (but probably there is an example somewhere, that crashes because of this). I found the code in Lib/tkinter/scrolledtext.py -- ___ Python tracker <http://bugs.py

[issue7436] Define 'object with assignable attributes'

2010-12-26 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue7436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10868] ABCMeta.register() should work as a decorator

2011-01-10 Thread Daniel Urban
Daniel Urban added the comment: There is another return statement earlier in the ABCMeta.register method. The patch probably should also modify that. -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10

[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-01-21 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10775> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10996] Typo in What's New in 3.2

2011-01-24 Thread Daniel Urban
New submission from Daniel Urban : In http://docs.python.org/dev/py3k/whatsnew/3.2.html#abc the example has two typos: farenheit -> fahrenheit celsium -> celsius -- assignee: docs@python components: Documentation messages: 126938 nosy: docs@python, durban priority: normal se

[issue1294232] Error in metaclass search order

2011-01-28 Thread Daniel Urban
Daniel Urban added the comment: It seems, that this possible problem already came up when __build_class__ got implemented, see issue1681101. The second and third version of the patch at this issue (file7874 and file7875) contains a comment: "XXX Should we do the "winner" c

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-01-28 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue10977> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11048] "import ctypes" causes segfault on read-only filesystem

2011-01-28 Thread Daniel Urban
Daniel Urban added the comment: I cannot reproduce this with the current py3k branch (Ubuntu 10.04 32 bit). -- nosy: +durban type: -> crash ___ Python tracker <http://bugs.python.org/issu

[issue11048] "import ctypes" causes segfault on read-only filesystem

2011-01-29 Thread Daniel Urban
Daniel Urban added the comment: Thanks for the instructions. You're right, this way I can reproduce the segfault. -- ___ Python tracker <http://bugs.python.org/is

[issue11085] expose _abcoll as collections.abc

2011-02-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11085> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11071] What's New review comments

2011-02-06 Thread Daniel Urban
Daniel Urban added the comment: In the abc.abstractclassmethod example(http://docs.python.org/dev/py3k/whatsnew/3.2.html#abc), the methods probably should use cls as the name of the first parameter, not self, because they are classmethods. -- nosy: +durban

[issue11071] What's New review comments

2011-02-06 Thread Daniel Urban
Daniel Urban added the comment: In the shutil example (http://docs.python.org/dev/py3k/whatsnew/3.2.html#shutil) the function argument of shutil.register_archive_format is a string, but according to http://docs.python.org/dev/py3k/library/shutil.html#shutil.register_archive_format it should

[issue11133] inspect.getattr_static code execution

2011-02-06 Thread Daniel Urban
New submission from Daniel Urban : The documentation of getattr_static says: "The only known case that can cause getattr_static to trigger code execution, and cause it to return incorrect results (or even break), is where a class uses __slots__ and provides a __dict__ member using a pro

[issue11141] 2.x range() in 3.x shelve documentation

2011-02-07 Thread Daniel Urban
New submission from Daniel Urban : The example in the shelve documentation (http://docs.python.org/dev/py3k/library/shelve.html#example) uses the old range() (which returned a list): d['xx'] = range(4) # this works as expected, but... d['xx'].append(5) # *this doesn

[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue11248> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
New submission from Daniel Urban : inspect.getcallargs raises TypeError if given a function with only **kwargs, and some keyword arguments: Python 3.3a0 (py3k:88451, Feb 20 2011, 12:37:22) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
Daniel Urban added the comment: Here is a patch. It also includes tests that would have detected this bug. It also corrects a case when getcallargs raised an exception with a different message (there are tests also for this): >>> def f(**kwargs): pass ... >>> f(1, a=

[issue6507] Enhance dis.dis to autocompile codestrings

2010-04-11 Thread Daniel Urban
Daniel Urban added the comment: I've made a patch, which adds a disassemble_str function to the dis module. The dis.dis function calls this function if x is a string. Added the following sentence to the documentation: "Strings are first compiled to code objects with the :func:`comp

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-13 Thread Daniel Urban
Daniel Urban added the comment: I've made a patch. This patch adds a datetime_rfcformat function to datetimemodule.c which is available from Python as the datetime.rfcformat method in the datetime module. This method returns the date in RFC 3339 format: -MM-DDTHH:MM:SS[.mm]+

[issue6507] Enhance dis.dis to autocompile codestrings

2010-04-18 Thread Daniel Urban
Daniel Urban added the comment: Any chance, that my patch will be accepted? Is there a problem with it? Thanks. -- ___ Python tracker <http://bugs.python.org/issue6

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-28 Thread Daniel Urban
Daniel Urban added the comment: Is anyone still interested in this? Is there a problem with my patch? Thanks. -- ___ Python tracker <http://bugs.python.org/issue7

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-28 Thread Daniel Urban
Daniel Urban added the comment: > My Python code as well as your patch doesn't specify that "Z" must be > present when time zone offset is unknown or absent, Yes, that is because RFC 3339 explicitly says (in 4.3.) that -00:00 is "differs semantically from an offset

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-29 Thread Daniel Urban
Daniel Urban added the comment: > I do not think that -00:00 or +00:00 will be invalid Atom timestamp, > but to implement parser of rfc3339 timestamp, Z handling is still > needed. I can easily imagine people making wrong assumption that > parsing 00:00 at the end would be enoug

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-30 Thread Daniel Urban
Daniel Urban added the comment: > The point is that your implementation doesn't allow people to generate > 'Z'-ending timestamp if they need a subset of rfc3339. That is exactly right. Do you have any suggestion, how to do that? Maybe an optional argument to the rfcfor

[issue8628] Incorrect numbers.Complex.imag documentation

2010-05-05 Thread Daniel Urban
New submission from Daniel Urban : The current documentation of the imag abstract property of numbers.Complex is this: "Abstract. Retrieves the Real component of this number." Of course the imag attribute is the imaginary component, not the real. -- assignee: d...@python

[issue8660] py3k weakref documentation mentions the long built-in type

2010-05-08 Thread Daniel Urban
New submission from Daniel Urban : There is a sentence in the weakref module's documentation: "Other built-in types such as tuple and long do not support weak references even when subclassed" But there is no "long" type in py3k. -- assignee: d...@python

[issue6507] Enhance dis.dis to autocompile codestrings

2010-05-08 Thread Daniel Urban
Daniel Urban added the comment: Done. Attached new patch as issue6507_2_priv.diff. -- Added file: http://bugs.python.org/file17265/issue6507_2_priv.diff ___ Python tracker <http://bugs.python.org/issue6

[issue8635] enumerate() docstring doesn't cover optional start argument

2010-05-09 Thread Daniel Urban
Daniel Urban added the comment: Attached a patch. It changes the docstring to: "enumerate(iterable[, start]) -> iterator for index, value of iterable Return an enumerate object. iterable must be another object that supports iteration, start must be an integer (defaults to 0). The e

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-05-09 Thread Daniel Urban
Daniel Urban added the comment: Here is a new patch. The name of the optional argument is "default_utcoffset" which is obviously too long, but I can't think a better name. Any suggestions? (I think simply "utcoffset" would be misleading, because the value of the a

[issue8676] Py3k Built-in Exceptions documentation mentions the raise statement of 2.x

2010-05-10 Thread Daniel Urban
New submission from Daniel Urban : In the documentation of the exceptions (http://docs.python.org/dev/py3k/library/exceptions) there is a sentence: "The associated value is the second argument to the raise statement." But in py3k there is a different raise statement t

[issue8699] Equality and hashing for functools.partial

2010-05-12 Thread Daniel Urban
New submission from Daniel Urban : On python-dev came up an idea [1] to support equality (== and !=) and hashing by functools.partial instances. Van Lindberg provided an implementation written in Python [2]. I've made a very similar implementation in C (in Modules/_functoolsmodule.c).

[issue8699] Equality and hashing for functools.partial

2010-05-13 Thread Daniel Urban
Daniel Urban added the comment: Sorry, I realized I made a stupid mistake. (I didn't use PyList_Sort to sort the list in partial_hash.) Here is the corrected patch. -- Added file: http://bugs.python.org/file17315/partial_eq_hash_2.diff ___ P

[issue8703] Py3k PyList_Type documentation mentions types.ListType

2010-05-13 Thread Daniel Urban
New submission from Daniel Urban : The Py3k documentation of PyList_Type [1] contains the sentence: "This is the same object as list and types.ListType in the Python layer." But there is no types.ListType object in py3k. [1] http://docs.python.org/dev/py3k/c-api/list.html#P

[issue8699] Equality and hashing for functools.partial

2010-05-13 Thread Daniel Urban
Daniel Urban added the comment: On python-dev Yaniv Aknin pointed out that the keywords dictionary of a partial object is mutable [1]. This causes problems with hashing and equality. The new patch replaces the keywords dictionary with a read-only proxy of that dictionary. This seems to

[issue14965] super() and property inheritance behavior

2021-05-20 Thread Daniel Urban
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

[issue14051] Cannot set attributes on staticmethod

2012-02-18 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue14051> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-15 Thread Daniel Urban
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

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-18 Thread Daniel Urban
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

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-19 Thread Daniel Urban
Daniel Urban added the comment: Fair enough. -- ___ Python tracker <http://bugs.python.org/issue14588> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-20 Thread Daniel Urban
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

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2012-04-25 Thread Daniel Urban
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

[issue14588] PEP 3115 compliant dynamic class creation

2012-05-12 Thread Daniel Urban
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

[issue14857] Direct access to lexically scoped __class__ is broken in 3.3

2012-05-20 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue14857> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-05-20 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker <http://bugs.python.org/issue12370> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11480] Cannot copy a class with a metaclass other than type

2012-06-03 Thread Daniel Urban
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

[issue14965] super() and property inheritance behavior

2012-06-04 Thread Daniel Urban
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

[issue14965] super() and property inheritance behavior

2012-06-04 Thread Daniel Urban
Changes by Daniel Urban : -- components: +Extension Modules -Library (Lib) ___ Python tracker <http://bugs.python.org/issue14965> ___ ___ Python-bugs-list mailin

[issue15243] Misleading documentation for __prepare__

2012-07-03 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker <http://bugs.python.org/issue15243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15245] ast.literal_eval fails on some literals

2012-07-04 Thread Daniel Urban
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 <

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
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

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
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

[issue15397] Unbinding of methods

2012-07-19 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker <http://bugs.python.org/issue15397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2012-11-04 Thread Daniel Urban
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

[issue14631] Instance methods and WeakRefs don't mix.

2012-11-11 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker <http://bugs.python.org/issue14631> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16522] Add 'FAIL_FAST' flag to doctest

2012-11-21 Thread Daniel Urban
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.

[issue16522] Add 'FAIL_FAST' flag to doctest

2012-11-21 Thread Daniel Urban
Changes by Daniel Urban : Removed file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch ___ Python tracker <http://bugs.python.org/issue16522> ___ ___ Pytho

[issue16522] Add 'FAIL_FAST' flag to doctest

2012-11-21 Thread Daniel Urban
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

<    1   2   3   >