[issue33474] Support immutability per-field in dataclasses

2018-05-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> eric.smith components: +Library (Lib) versions: +Python 3.8 -Python 3.7 ___ Python tracker

[issue16823] Python quits on running tkinter code with threads

2018-05-12 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate ___ Python tracker ___ ___

[issue6933] Threading issue with Tkinter Frame.insert

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I changes the import to theading instead of thread and the start line to threading.Thread(target=example) On 3.7 with tcl/tk 8.6 with thread support, I see the gui when mainloop is called in the thread, and then the >>> prompt

[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I opened #33479 Document tkinter and threads, as a spinoff of both this issue and #11077, msg183774. -- ___ Python tracker

[issue33479] Document tkinter and threads

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The information about the compile option comes from Ivan Pozdeev, #33257. I meant to add somewhere that thread support became default only with tk 8.6. -- ___ Python tracker

[issue11077] Tkinter is not thread safe

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The information missing from this issue is that tcl and tk can be compiled without and with thread support, and that the latter became default in 8.6, which is included with recent 3.x versions. Hence the launch example, as posted on

[issue16823] Python quits on running tkinter code with threads

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the message above, I asked "why this code runs in 3.x but eventually fails in 2.x?". The answer is almost certainly that I used 3.5 with tk 8.6 compiled *with* thread support and 2.7 with tk 8.5 compiled without thread support. Serhiy,

[issue33479] Document tkinter and threads

2018-05-12 Thread Terry J. Reedy
New submission from Terry J. Reedy : (Proposed patch below) Library Reference Chapter 25, Graphical User Interfaces with Tk, covers tinter, some of its subpackages, and IDLE. The introduction, https://docs.python.org/3/library/tk.html states "the internal module _tkinter

[issue33478] PEP 8 CapWords reference wrong?

2018-05-12 Thread Amit Saha
New submission from Amit Saha : PEP 8 suggests class names and type variable names to be in CapWords case. However: >>> import string >>> string.capwords('CapWord') 'Capword' Wondering if this this an oversight or am I misunderstanding something? -- assignee:

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I was looking for a way to link to a message in the context of an issue rather that on a page by itself. Neither worked. -- ___ Python tracker

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Testing undocumented issue.message reference I remember seeing somewhere: #11077.msg183774, #11077.183774 -- ___ Python tracker

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-12 Thread Miro Hrončok
Miro Hrončok added the comment: The change is a bit beyond my understanding ATM. I might be able to study it and stitch something up, but I'd rather leave it to the author of the change. -- ___ Python tracker

[issue33471] string format with 'n' failling with french locales

2018-05-12 Thread Eric V. Smith
Eric V. Smith added the comment: After locale.setlocale(locale.LC_ALL, ''), what does local.localeconv() return? -- nosy: +eric.smith ___ Python tracker

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-12 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue33477] Document that compile(code, 'exec') has different behavior in 3.7+

2018-05-12 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : In recent Python the following >>> from ast import PyCF_ONLY_AST >>> compile("'a'", 'whatever', 'exec', PyCF_ONLY_AST).body In 3.6 it return [<_ast.Expr at 0x10b7441d0>] # that contail Str('a') While on master:

[issue33476] String index out of range in get_group(), email/_header_value_parser.py

2018-05-12 Thread Enrique Perez-Terron
New submission from Enrique Perez-Terron : When address group is missing final ';', 'value' will be an empty string. I suggest the following patch $ diff -u _save_header_value_parser.py _header_value_parser.py --- _save_header_value_parser.py2018-03-14

[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6462 stage: -> patch review ___ Python tracker ___

[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed patch fixes bugs in ast_unparse.c, makes it generating cleaner string representation, and makes the code cleaner. Known fixed bugs: 1. Extended slices crash Python. "s[a, b:c]". 2. 1-tuples produce illegal

[issue33474] Support immutability per-field in dataclasses

2018-05-12 Thread Daniel Lindeman
New submission from Daniel Lindeman : Currently, all fields in dataclasses can be frozen by passing frozen=True to the decorator. There are cases where it would be useful to have some fields be mutable, and others immutable. By using a strategy similar to how the decorator

[issue33462] reversible dict

2018-05-12 Thread Michael Selik
Michael Selik added the comment: Right, a blend of the code from dictiterobject (https://github.com/python/cpython/blob/master/Objects/dictobject.c#L3309) and listreviterobject (https://github.com/python/cpython/blob/master/Objects/listobject.c#L3128). --

[issue33462] reversible dict

2018-05-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I'm taking a look this issue, it look like a new type `PyDictRevIterKey_Type` needs to be defined with its associated methods. I will try to implement the modifications ; this is the first time i'm taking a dive in Python's internals

[issue4934] tp_del and tp_version_tag undocumented

2018-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Both tp_del and tp_version_tag are for internal use. Besides, tp_del is obsolete as I mentioned above. So I'm going to close the issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue4934] tp_del and tp_version_tag undocumented

2018-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The reason tp_del has remained undocumented is that it's now obsolete. You should use tp_finalize instead: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_finalize tp_finalize is roughly the C equivalent of __del__ (tp_del was

[issue4934] tp_del and tp_version_tag undocumented

2018-05-12 Thread book book
book book added the comment: tp_del still undocumented. In my opinion, tp_del corresponds to the __del__() method of classes, because there are no other variable correspondes to it, but methods using for creating(tp_new) and initializing(tp_init) an object are not.

[issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict?

2018-05-12 Thread Michael Selik
Change by Michael Selik : -- keywords: +patch pull_requests: +6461 stage: -> patch review ___ Python tracker ___

[issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict?

2018-05-12 Thread Michael Selik
Michael Selik added the comment: Is this warning what you had in mind? https://github.com/python/cpython/pull/6772 -- ___ Python tracker

[issue33473] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related.

2018-05-12 Thread Eitan Adler
New submission from Eitan Adler : There are a number of incorrect items in python's build system. Expected behavior: - CC is correctly report as the compiler, and without any additional options - CFLAGS is correctly reported for the required flags to the compiler -

[issue33472] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related.

2018-05-12 Thread Eitan Adler (bad account)
Eitan Adler (bad account) added the comment: closing this as I created under a bad account and can't find a way to merge them. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue33472] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related.

2018-05-12 Thread Eitan Adler
New submission from Eitan Adler : There are a number of incorrect items in python's build system. Expected behavior: - CC is correctly report as the compiler, and without any additional options - CFLAGS is correctly reported for the required flags to the compiler -

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-12 Thread STINNER Victor
STINNER Victor added the comment: Is it a release blocker? -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-12 Thread STINNER Victor
STINNER Victor added the comment: Miro: do you want to work on a pull request? -- ___ Python tracker ___

[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> low versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker

[issue33442] Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar.

2018-05-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +ezio.melotti, georg.brandl ___ Python tracker ___ ___

[issue33471] string format with 'n' failling with french locales

2018-05-12 Thread David Vasseur
New submission from David Vasseur : Python 3.6.5 (default, Apr 14 2018, 13:17:30) [GCC 7.3.1 20180406] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print('{:n}'.format(int(12))) 12 <-- ok -- >>> import locale >>>

[issue33427] Dead link in "The Python Standard Library" page

2018-05-12 Thread Ned Deily
Ned Deily added the comment: Note that while the link in the docs should be updated, the old link should redirect properly. That change has been requested in https://github.com/pypa/warehouse/issues/3914 -- nosy: +ned.deily ___

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The following two patches will remove getchildren() and getiterator() (in 3.9) and xml.etree.cElementTree (in an unspecified future). -- Added file:

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47585/etree_remove_deprecated_cElementTree.diff ___ Python tracker

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 6769 removes the html parameter and the doctype() method. getchildren() and getiterator() emit now a DeprecationWarning instead of PendingDeprecationWarning and will be removed in 3.9. --

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6457 ___ Python tracker ___ ___

[issue29209] Remove old-deprecated ElementTree features

2018-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: getchildren() and getiterator() have deprecation notes in their docstrings in lxml.etree. -- ___ Python tracker

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-12 Thread Miro Hrončok
New submission from Miro Hrončok : Background: gdb fails to build with Python 3.7 as described in https://bugzilla.redhat.com/show_bug.cgi?id=1577396 This is due to _PyImport_FixupBuiltin changing it's API. I feel that _underscored functions are probably not guaranteed to not

[issue33469] RuntimeError after closing loop that used run_in_executor

2018-05-12 Thread Hrvoje Nikšić
New submission from Hrvoje Nikšić : Looking at a StackOverflow question[1], I was unable to find a way to correctly close an event loop that uses run_in_executor() for long-running tasks. The question author tried to implement the following scenario: 1. create some tasks