[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-21 Thread Ethan Furman

Ethan Furman added the comment:

Well, with all the changes to inspect to properly locate attributes in the 
class and metaclass mro, __objclass__ is necessary to get the home class 
correct (without it inspect thinks it lives in the EnumMeta metaclass).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19263
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9019b942435 by Ethan Furman in branch 'default':
Close #19263:  add tests to ensure __objclass__ correctly set.
http://hg.python.org/cpython/rev/b9019b942435

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19263
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-14 Thread CliffM

New submission from CliffM:

Is the assignment __objclass__ = enum_class  in enum.py(149) needed ?

I cannot find any other reference to it (even Google) and it seems that 
__class__ is already set to enum_class :


enum_member.__objclass__ = enum_class  not sure what this is doing 

I have attached a patch that forces the assignment, but would rather understand 
what is intended here -- and test for that.

--
components: Tests
files: enum.patch
keywords: patch
messages: 199964
nosy: CliffM, ethan.furman
priority: normal
severity: normal
status: open
title: enum.py : Enum.__new__(). __objclass__
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32126/enum.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19263
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-14 Thread Ethan Furman

Ethan Furman added the comment:

It was originally put in to help inspect.classify_class_attrs, but recent 
subsequent changes (not yet committed, issue19030), make it unnecessary.

Whether or not it stays depends on the changes to inspect being committed.

--
assignee:  - ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19263
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com