[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2017-12-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure I understand the distinction. You have to look through everything in `__dict__`, then exclude those things that are any type of field (so, real fields or pseudo-fields). Those are the things that are in `__annotations__`, anyway. The trick is wha

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-26 Thread Julien Palard
Julien Palard added the comment: As the C implementation is already shadowing the Python implementation when available (last lines of Lib/xml/etree/ElementTree.py), using `.copy()` is already a bug magnet (works when the Python implem is used, does not work when shadowed by the C implem). So

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Julien Palard
Julien Palard added the comment: > maintain your own branch with changes to a tracked file Make sense for me, Xavier, would this fit your usage? -- ___ Python tracker ___

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > +1 - do you have any thoughts on that? I think the current scheme may have been useful at a time where DVCS didn't exist. You would maintain an unversioned copy of Modules/Setup.dist in your work-tree. Nowadays you can fork a github repo and maintain your

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2017-12-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: A possible question here is should we give an error for any non-callable name in `__dict__` which is not in `__annotations__` or only for `Field`s? After some thinking I am actually leaning towards the first option. -- nosy: +gvanrossum, levkivskyi

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Julien Palard
Julien Palard added the comment: Antoine: I may take a look at this too. Still, stopping in the Makefile looks a first trivial step toward not being screwed by it, removing it looks non trivial, will raise discussions, let's make it another issue? --

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 26, 2017, at 18:17, Antoine Pitrou wrote: > > I'd really like it if we could get rid of the Setup/Setup.dist thing. It's a > distraction to have to type `cp -f Modules/Setup.dist Modules/Setup` from > time to time... even though I have never customi

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd really like it if we could get rid of the Setup/Setup.dist thing. It's a distraction to have to type `cp -f Modules/Setup.dist Modules/Setup` from time to time... even though I have never customized the Setup file. -- nosy: +barry, benjamin.peter

[issue32416] Refactor and add new tests for the f_lineno setter

2017-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 53f9135667226f33e049e327db60fb033afbd77a by Serhiy Storchaka in branch 'master': bpo-32416: Refactor tests for the f_lineno setter and add new tests. (#4991) https://github.com/python/cpython/commit/53f9135667226f33e049e327db60fb033afbd77a --

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +4905 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-26 Thread Julien Palard
New submission from Julien Palard : The devguide advise to run `make -j`, why not, but in any cases between `make -j4` and `make -j` the warning: --- Modules/Setup.dist is newer than Modules/Setup; check to make sure you have all the updat

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2017-12-26 Thread Eric V. Smith
New submission from Eric V. Smith : For this class: @dataclass class C: x: int = 0 y = 0 Generate a TypeError. 'y' is not a field (as defined by @dataclass). It should either be a regular field (by giving it a type annotation) or a ClassVar field. -- assignee: eric.smith compone

[issue32145] Wrong ExitStack Callback recipe

2017-12-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 25, 2017, at 18:51, Nick Coghlan wrote: > > 3. A for-subclasses-only "self._clone()" API could work as follows: > >def _clone(self, new_instance=None): >if new_instance is None: >new_instance = type(self)() ># Clone sta

[issue32427] Rename and expose dataclasses._MISSING

2017-12-26 Thread Eric V. Smith
New submission from Eric V. Smith : There are occasions where you want to know the missing value, such as introspection and in cases like: Field(default=a if a is not None else _MISSING). I'll rename _MISSING to MISSING. -- assignee: eric.smith components: Library (Lib) messages: 3090

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-26 Thread Yonatan Zunger
Yonatan Zunger added the comment: 3.6.2. But Nick Coghlan pointed out elsewhere that the underlying issue is more likely to be one of the other objects being pinned in-memory because of the traceback, so the exception may actually be just an incidental thing. I'm going to have to work on a bette

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-26 Thread Julien Palard
Julien Palard added the comment: Tested with: @memoize() def foo(x): raise Exception("From foo") for _ ∈ range(5): try: foo(42) except Exception as err: print(err) using a python 3.5.4, 3.6.4, and master(13a6c09), and was unable to

[issue32337] Dict order is now guaranteed, so add tests and doc for it

2017-12-26 Thread INADA Naoki
New submission from INADA Naoki : FYI, Builtin dict is tested for ordering already: https://github.com/python/cpython/blob/13a6c098c215921e35004f9d3a9b70f601e56500/Lib/test/test_ordered_dict.py#L646-L662 -- nosy: +inada.naoki ___ Python tracker

[issue32072] Issues with binary plists

2017-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For example: a = [] for i in range(22): a = [a, a] b = plistlib.dumps(a, fmt=plistlib.FMT_BINARY) The result is 130 bytes long on patched plistlib. But plistlib.dumps(b) will expand to a structure consuming almost a gigabyte of memory on unpatched pli

[issue32196] Rewrite plistlib with functional style

2017-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have made this PR because functional style looks to me more for this kind of tasks. For every serialization or deseralization we have a distinct set of functions with common state. The state can be passes between functions as attributes of a one-time obje

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 13a6c098c215921e35004f9d3a9b70f601e56500 by Serhiy Storchaka in branch 'master': bpo-32259: Make a TypeError message when unpack non-iterable more specific. (#4903) https://github.com/python/cpython/commit/13a6c098c215921e35004f9d3a9b70f601e56

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 32518b439b9590cce0ef0639e558dc1ce2e152bb by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-26133: Fix typos (GH-5010) (#5014) https://github.com/python/cpython/commit/32518b439b9590cce0ef0639e558dc1ce2e152bb --

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2017-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anybody please make a review of at least the documentation part? -- ___ Python tracker ___ ___

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a8f4e15f3d33084862ddd3a7d58cd00034e94f16 by Andrew Svetlov in branch 'master': bpo-26133: Fix typos (#5010) https://github.com/python/cpython/commit/a8f4e15f3d33084862ddd3a7d58cd00034e94f16 -- ___ Py

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-26 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4904 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail