[issue34082] EnumMeta.__new__ should use enum_class.__new__

2018-09-10 Thread Ethan Furman


Ethan Furman  added the comment:

The solution to 29577 will also fix this.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Enum: mixin classes don't mix well with already mixed Enums

___
Python tracker 

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



[issue34082] EnumMeta.__new__ should use enum_class.__new__

2018-07-10 Thread Ethan Furman


Change by Ethan Furman :


--
assignee:  -> ethan.furman
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue34082] EnumMeta.__new__ should use enum_class.__new__

2018-07-10 Thread Pav


New submission from Pav :

```python
class Foo:
pass

class Works(str, Foo, Enum):
BAR = 'baz'

class Fails(Foo, str, Enum):
BAR = 'baz'

```

`Fails` fails to be created with an error:

`TypeError: object.__new__(Fails) is not safe, use Fails.__new__()`

See 
https://github.com/python/cpython/blob/e57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76/Lib/enum.py#L205

--
components: Library (Lib)
messages: 321370
nosy: rs2
priority: normal
severity: normal
status: open
title: EnumMeta.__new__ should use enum_class.__new__
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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