[issue37051] Glossary item "hashable" incorrect

2019-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cc1c582f6fe450ce1c7de849137039e9b5fab8eb by Raymond Hettinger in branch 'master': bpo-37051: Refine note on what objects are hashable (GH-13587) https://github.com/python/cpython/commit/cc1c582f6fe450ce1c7de849137039e9b5fab8eb --

[issue37051] Glossary item "hashable" incorrect

2019-05-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +13502 pull_request: https://github.com/python/cpython/pull/13595 ___ Python tracker ___

[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-27 Thread Erik Bray
Erik Bray added the comment: Thanks everyone. And FWIW I agree the original change is positive overall, if a bit presumptuous about different linkers' behaviors :) -- ___ Python tracker

[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Siming Yuan
Siming Yuan added the comment: that works... but where does it say arv[0] is the program name? it seems to be more of a how C works... would be nice if the doc had some examples of that. -- ___ Python tracker

[issue37067] os.execl doesn't allow for empty string in mac

2019-05-27 Thread Siming Yuan
Siming Yuan added the comment: actually just learned that argv0 is program name. in that case is that because of a platform difference where in macOS it doesn't allow for program name to be '' and in linux it does? -- ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2019-05-27 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @ Jack McCracken do you want to open a pull request for this? -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Josh, sorry, I hadn't seen your message. Those are low-levels operations, so I don't know if it makes sense to implement madvise() in terms of PrefetchVirtualMemory(), or expose a separate wrapper to PrefetchVirtualMemory(). One complication is that we

[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32941] mmap should expose madvise()

2019-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 02db696732c031d9a0265dc9bbf4f5b1fad042b3 by Antoine Pitrou (Zackery Spytz) in branch 'master': bpo-32941: Add madvise() for mmap objects (GH-6172) https://github.com/python/cpython/commit/02db696732c031d9a0265dc9bbf4f5b1fad042b3 --

[issue29819] Avoid raising OverflowError in truncate() if possible

2019-05-27 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Anthony Sottile
Anthony Sottile added the comment: You want: os.execl('/bin/bash', 'bash', '--init-file', ...) argv[0] is supposed to be the program name, your example puts `--init-file` as the program name -- nosy: +Anthony Sottile ___ Python tracker

[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Related open issue : issue34364. Also issue29051 which was closed as duplicate of issue34364. -- nosy: +xtreak ___ Python tracker

[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I'm pretty sure there's already an issue for this, but I don't have time to search for it now. This is not an easy problem to solve. I've been working on it on and off for almost a year. I'll eventually get to it, but the changes are pretty invasive.

[issue37067] os.execl doesn't allow for empty string in mac

2019-05-27 Thread Siming Yuan
New submission from Siming Yuan : the following works in Linux import os os.execl('/bin/bash', '') doesn't in mac: >>> import os >>> os.execl('/bin/bash', '') Traceback (most recent call last): File "", line 1, in File "/Users/me/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in

[issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided

2019-05-27 Thread Siming Yuan
New submission from Siming Yuan : Using os.execl you can open a new bash shell (eg, using python to process some env before opening a new shell. $ echo $SHLVL 1 $ ~/.pyenv/versions/3.6.4/bin/python3 Python 3.6.4 (default, Feb 5 2018, 16:53:35) [GCC 4.2.1 Compatible Apple LLVM 9.0.0

[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Multiple tests log an "Exception ignored", but all of them come from the Python implementation. The problem is that _pyio.BytesIO and _pyio.TextIOWrapper initialize their self._buffer and self._seekable attribute "later" in the constructor, but then expect

[issue37054] Ignored exceptions in test_memoryio

2019-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or to add `_buffer = None` at the class level. -- ___ Python tracker ___ ___ Python-bugs-list

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a79b6c578fcd2ea8be29440fdd8a998e5527200f by Andrew Svetlov in branch '3.7': [3.7] bpo-37035: Don't log OSError (GH-13548) (#13594) https://github.com/python/cpython/commit/a79b6c578fcd2ea8be29440fdd8a998e5527200f --

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7 is also affected according to Serhiy. Does someone want to write a backport to 2.7? -- ___ Python tracker ___

[issue36763] Implementation of the PEP 587

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: TODO: I didn't implement PyWideStringList_Insert() yet. -- ___ Python tracker ___ ___

[issue36763] Implementation of the PEP 587

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I closed the following issues which are fixed by the implementation of the PEP 587: * bpo-1195571 * bpo-11320 * bpo-13533 * bpo-14956 * bpo-19983 * bpo-29778 * bpo-30560 * bpo-31745 * bpo-33135 * bpo-34725 * bpo-36204 Copy of my message in bpo-19983: "This

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I understand that this bug has been fixed by the implementation of the PEP 587 in bpo-36763: Py_SethPath() now uses dynamically allocated memory and can be called multiple times. Moreover, the PEP 587 now provides a better API for the Path Configuration. I

[issue33135] Define field prefixes for the various config structs

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: > As a particularly relevant example, we currently have 3 different > "warnoptions" fields: the private-to-main one for reading the command line > settings, the "wchar_t *" list in the core config, and the "PyObject *" list > object in the main interpreter

[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I added Py_RunMain() in bpo-36763 which implements the PEP 587. IMHO it's the right solution for code like fontforge (see pseudo-code in my first message). I'm no longer sure that we should deprecate calling Py_Main() after Py_Initialize(). Backward

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I understand that issue is now fixed in bpo-36763 by the implementation of the PEP 587 which adds a new public API for the "Python Initialization Configuration". It provides a finer API to configure the "Path Configuration". For example, PyConfig.executable

[issue31745] Overloading "Py_GetPath" does not work

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, this issue has been fixed by the PEP 587 "Python Initialization Configuration" in bpo-36763 which now provides a more reliable way to configure the "Path Configuration". I close the issue. If I misunderstood the issue, please

[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1195571] simple callback system for Py_FatalError

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I understand that this issue has been fixed in bpo-36763 with the implementation of the PEP 587. A new API now allow to handle Python initialization error with a new PyStatus structure. By the way, bpo-30560 was a similar issue. Note: if I misunderstood

[issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Note: if I misunderstood the issue, please open it ;-) -- ___ Python tracker ___ ___

[issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: The issue has been fixed in bpo-36763 with the implementation of the PEP 587. A new API now allow to handle Python initialization error with a new PyStatus structure. By the way, bpo-1195571 was a similar issue. -- nosy: +vstinner resolution: ->

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2019-05-27 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread Denis S. Otkidach
New submission from Denis S. Otkidach : Minimal example to reproduce: -->8-- >>> with open('f_bug.py', 'w') as fp: ... fp.write('f"{a b}"') ... 8 >>> import f_bug Traceback (most recent call last): File "", line 1, in File "", line 1 (a b) ^ SyntaxError: invalid syntax

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: > When Py_SetPath is used to set up module path at initialization, the > Py_SetPath causes getpathp.c::calculate_path not to be called. However, > calculate path is the only function calling getpathp.c::get_progpath which > initializes the local dllpath

[issue37028] Implement asyncio repl

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: > I suggest "Python asyncio REPL 3.8.0a4+ (...)". I prefer to keep "Python" > somewhere. Sure. > Is "exiting asyncio REPL..." message really helpful? If exit can block, would > it possible to only display a message if something "hangs" (takes time)? I >

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: I wrote the PEP 587 "Python Initialization Configuration" which has been accepted. It allows to completely override the "Path Configuration". I'm not sure that it fully implementation what it requested here, but it should now be easier to tune the Path

[issue22257] PEP 432: Redesign the interpreter startup sequence

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Update: my PEP 587 has been accepted and I implemented it in bpo-36763. -- ___ Python tracker ___

[issue19983] When interrupted during startup, Python should not call abort() but exit()

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: This issue has been fixed by the PEP 587 in bpo-36763: when Py_Initialize() fails, it no longer calls abort() but only exit(1). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue14956] custom PYTHONPATH may break apps embedding Python

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: This issue has been fixed in 36763 by the PEP 587 which provides a new "Isolated Configuration" and a way to tune the Python configuration without impacting subprocesses. For example, the Isolated Configuration ignores environment variables by default. In

[issue13533] Would like Py_Initialize to play friendly with host app

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: > I'm building a dll add-in (on Windows) in which I want to use the installed > version of Python, not provide my own installation. When py_initialize fails > it appears to call exit(). (...) This issue has been fixed by the PEP 587 in bpo-36763:

[issue36763] Implementation of the PEP 587

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 331a6a56e9a9c72f3e4605987fabdaec72677702 by Victor Stinner in branch 'master': bpo-36763: Implement the PEP 587 (GH-13592) https://github.com/python/cpython/commit/331a6a56e9a9c72f3e4605987fabdaec72677702 --

[issue37028] Implement asyncio repl

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: "asyncio REPL 3.8.0a4+ (heads/pep587_rename-dirty:ae29b4b186, May 27 2019, 16:10:31)" I suggest "Python asyncio REPL 3.8.0a4+ (...)". I prefer to keep "Python" somewhere. Is "exiting asyncio REPL..." message really helpful? If exit can block, would it

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +13501 pull_request: https://github.com/python/cpython/pull/13594 ___ Python tracker ___

[issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call

2019-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: With the attached PR, the error message is now: >>> def f(): pass ... >>> code = f.__code__ >>> code.replace(co_lnotab=4) Traceback (most recent call last): File "", line 1, in TypeError: replace() argument 'co_lnotab' must be bytes, not int --

[issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call

2019-05-27 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13593 ___ Python tracker ___

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread Patrik Kopkan
Patrik Kopkan added the comment: Example: pathfix.py -i /usr/bin/python ./directory --> would change the shebang of every script in this directory recursively to #! /usr/bin/python. That's handy but if you would have script like this: #! /usr/bin/env -flags and wanted to keep the flags. You

[issue37027] Return a safe proxy over a socket from get_extra_info('socket')

2019-05-27 Thread miss-islington
miss-islington added the comment: New changeset 8cd5165ba05ff57cfdbbc71c393bddad1ce1ab87 by Miss Islington (bot) (Yury Selivanov) in branch 'master': bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') (GH-13530)

[issue36763] Implementation of the PEP 587

2019-05-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13499 pull_request: https://github.com/python/cpython/pull/13592 ___ Python tracker ___

[issue35397] Undeprecate and document urllib.parse.unwrap

2019-05-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks for the report and for the patch. :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37027] Return a safe proxy over a socket from get_extra_info('socket')

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34148] Fatal read error on socket transport

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed by issue37035 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Don't log OSError exceptions in asyncio transports ___ Python tracker

[issue35397] Undeprecate and document urllib.parse.unwrap

2019-05-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 674ee1260025ff36f27e5d70ff6b66e3aab880bf by Cheryl Sabella (Rémi Lapeyre) in branch 'master': bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481)

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread SilentGhost
Change by SilentGhost : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37035] Don't log OSError exceptions in asyncio transports

2019-05-27 Thread miss-islington
miss-islington added the comment: New changeset 1f39c28e489cca0397fc4c3675d13569318122ac by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-37035: Don't log OSError (GH-13548) https://github.com/python/cpython/commit/1f39c28e489cca0397fc4c3675d13569318122ac -- nosy:

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread Miro Hrončok
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread Miro Hrončok
Change by Miro Hrončok : -- components: +Demos and Tools versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread Patrik Kopkan
Change by Patrik Kopkan : -- keywords: +patch pull_requests: +13497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13591 ___ Python tracker ___

[issue37064] Feature request: option to keep/add flags to pathfix.

2019-05-27 Thread Patrik Kopkan
New submission from Patrik Kopkan : Hello, Pathfix is nice simple tool for changing shebang lines. However, it is lacking a way how to keep/add flags making this tool impractical sometimes. -- messages: 343622 nosy: pkopkan priority: normal severity: normal status: open title: Feature

[issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths

2019-05-27 Thread NM
NM added the comment: Is this related to the weird paths I am seeing when getting different output in venv compared to without venv: from pathlib import Path filename = Path(__file__) filename2 = Path('C:\\path\\to\\file.py') print(filename) print(filename2) Where the result is:

[issue37047] Refactor AsyncMock setup logic in create_autospec

2019-05-27 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37047] Refactor AsyncMock setup logic in create_autospec

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a by Yury Selivanov (Xtreak) in branch 'master': bpo-37047: Refactor AsyncMock setup logic for autospeccing (GH-13574) https://github.com/python/cpython/commit/ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a

[issue32528] Change base class for futures.CancelledError

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: Done. 爛 we don't regret this. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 431b540bf79f0982559b1b0e420b1b085f667bb7 by Yury Selivanov in branch 'master': bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528) https://github.com/python/cpython/commit/431b540bf79f0982559b1b0e420b1b085f667bb7 --

[issue34858] MappingProxy objects should JSON serialize just like a dictionary

2019-05-27 Thread zgoda.mobica
zgoda.mobica added the comment: In particular case of lazy type proxy objects the result of dump() may be different than dumps() because dump does iterencode() over data and possibly causing proxy object evaluation. In such case dumps() will raise TypeError but dump() will not. --

[issue37028] Implement asyncio repl

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: The REPL has been merged to 3.8. It's not perfect though -- a ^C might break the asyncio event loop, sometimes ^C stops working altogether. We'll investigate all these issues in follow up PRs. -- stage: patch review -> resolved status: open ->

[issue37028] Implement asyncio repl

2019-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 16cefb0bc7b05c08caf08525398ff178c35dece4 by Yury Selivanov in branch 'master': bpo-37028: asyncio REPL; activated via 'python -m asyncio'. (GH-13472) https://github.com/python/cpython/commit/16cefb0bc7b05c08caf08525398ff178c35dece4 --

[issue28609] argparse claims '*' positional argument is required in error output

2019-05-27 Thread Stephen McDowell
Stephen McDowell added the comment: > For optionals, `required` is set by the programmer. But for positionals it > is set with: ... > So for '?' argument, required is False. But for '*', it must also have a > 'default' parameter (not just the default None). > So the proposed patch is

[issue37063] Incorrect application of func.__defaults__ by inspect's signature APIs

2019-05-27 Thread Dan Snider
New submission from Dan Snider : The interpreter matches the values in func.__defaults__ with the calculated positional argument names "right-to-left", while inspect does does so "left-to-right". In every day usage, for "normal" functions, generated by the compiler from "normal", hand-typed

[issue36520] Email header folded incorrectly

2019-05-27 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: I uploaded a test script with some test cases: The failure mode occurs when 1. line folding occurs 2. the first folded line has two or more words with UTF-8 characters 3. subsequent lines contain a word with UTF-8 characters located at a different offset

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: The main goal of test coverage is to verify that the tests cover the code that is being tested, it is not to get '100 %' printed. Measuring the coverage of the tests themselves is entirely another matter and not very useful. Since it is not possible to

[issue37032] Add CodeType.replace() method

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: Pablo: "Is there anything more on this issue?" I proposed "Once Python 3.8 beta1 will be released, it would be interesting to patch all projects that I had to be fixed to handle the new "posonlyargcount" to use the new "replace()" method is available." But

[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 71c52e3048dd07567f0c690eab4e5d57be66f534 by Victor Stinner in branch 'master': bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488) https://github.com/python/cpython/commit/71c52e3048dd07567f0c690eab4e5d57be66f534 --

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2019-05-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2019-05-27 Thread Reuben Thomas
Reuben Thomas added the comment: Just to be clear, the proposed change to the documentation is simply to add ", *args" to the argument list of AutoNumber.__new__. -- ___ Python tracker

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2019-05-27 Thread Reuben Thomas
New submission from Reuben Thomas : By changing one line of AutoNumber: def __new__(cls): to def __new__(cls, *args): Enums derived from AutoNumber can now support constructors that take named arguments; for example: class Color(AutoNumber): def __init__(self, pantone=None):

<    1   2