[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-26 Thread Jens Troeger
Jens Troeger added the comment: With my update from Python 3.4.3 to Python 3.4.4 (default, Dec 25 2015, 06:14:41) I started experiencing crashes of my applications and I suspect this change is the culprit. I have a class that inherits from namedtuple, and code calls vars() (i.e. retrieve

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-25 Thread Vedran Čačić
Vedran Čačić added the comment: I agree that namedtuples having __dict__ is probably more trouble than benefit. But in my view, that's no reason for _asdict to not work correctly. The whole point of separate function (even going through the pain of underscore-starting public API, since

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-08 Thread Nicholas Chammas
Nicholas Chammas added the comment: I know. I came across this issue after upgrading to the 3.5.1 release and seeing that vars(namedtuple) didn't work anymore. I looked through the changelog [0] for an explanation of why that might be and couldn't find one, so I posted that question on Stack

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-08 Thread Larry Hastings
Larry Hastings added the comment: You're a little late; 3.5.1 was released two days ago. -- ___ Python tracker ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-12-08 Thread Nicholas Chammas
Nicholas Chammas added the comment: Should this change be called out in the 3.5.1 release docs? It makes some code that works on 3.5.0 break in 3.5.1. See: http://stackoverflow.com/q/34166469/877069 -- nosy: +Nicholas Chammas ___ Python tracker

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-11-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it seems odd that it has disappeared. It disappeared because it was fundamentally broken in Python 3, so it had to be removed. Providing __dict__ broke subclassing and produced odd behaviors. -- keywords: -3.5regression priority: high -> normal

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-11 Thread Larry Hastings
Larry Hastings added the comment: Why is this marked as a release blocker? It doesn't strike me as all that major. -- ___ Python tracker ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-11 Thread Matthias Klose
Matthias Klose added the comment: now marked as regression, and lowered the priority. but how should regressions on release branches be marked else? -- keywords: +3.4regression, 3.5regression -patch priority: release blocker -> high ___ Python

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-31 Thread Eric Snow
Eric Snow added the comment: Doesn't the fix mean that `vars(MyNamedtuple)` will no longer work? While I personally don't mind (though I prefer that spelling) and appreciate the benefit of simpler code, isn't there a backward-compatibility issue here? I do concede that fixing this bug

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa3ac31cfa44 by Raymond Hettinger in branch '3.4': Issue #24931: Resolve __dict__ conflict in namedtuple subclasses. https://hg.python.org/cpython/rev/fa3ac31cfa44 -- nosy: +python-dev ___ Python

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24931 ___ ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24931 ___ ___ Python-bugs-list

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Samuel Isaacson
New submission from Samuel Isaacson: When inheriting from namedtuples, _asdict and __dict__ return empty dictionaries: from collections import namedtuple class Point(namedtuple('_Point', ['x', 'y'])): pass a = Point(3, 4) print(a._asdict() == {}) gives False; it is

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Samuel Isaacson
Samuel Isaacson added the comment: Sorry; it returns True on Python 3.4, False on Python 2.7.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24931 ___

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file40251/nt_fix1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24931

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: For __dict__, I'm not sure what the right behavior should by for subclasses that don't define __slots__. In Python 3, the __dict__ is returning the dict for the subclass. This might be the correct and most desirable behavior: class