[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-07-31 Thread Ned Deily
Ned Deily added the comment: I note that the current wording for both "text" and "tail" are careful to allow for the most general use of the Element class, that is, that it may be used in non-XML contexts, for example: "The text attribute can be used to hold additional data associated with the

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-07-31 Thread Stefan Behnel
Stefan Behnel added the comment: > The proposed patch downplays that generality. That is completely intentional. Almost all readers of the documentation will first need to understand the difference between text and tail before they can go and think about any more advanced use cases that will a

[issue24750] IDLE: Cosmetic improvements for main window

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: ttk is not available with 8.4 (except maybe with the tile extension, but I believe some changes were made before it was incorporated in 8.4 as ttk). As I mentioned on the ttk thread on idle-sig, it was agreed in a pydev discusion a couple of years ago or so th

[issue23574] datetime: support leap seconds

2015-07-31 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 21.07.2015 22:15, dlroo wrote: > > dlroo added the comment: > > If you are using mx.DateTime make certain you do not use the .strftime > method. If you use .strftime method and have a 60th second in your DateTime > object it will crash python with no

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-07-31 Thread Martin Panter
Martin Panter added the comment: I think Ned’s version is an acceptable solution (modulo some punctuation) to the original problem, although I do agree with Stefan that downplaying the generality would be even better. Perhaps we could add a qualifier, like “The *text* attribute [normally] hold

[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-07-31 Thread Stefan Behnel
Stefan Behnel added the comment: Personally, I would prefer getting the improved version applied over bikeshedding for another couple of months. But maybe that's just me. -- ___ Python tracker

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread Martin Richard
New submission from Martin Richard: An exception can be raised in SubprocessTransport.__init__() from SubprocessTransport._start() - for instance because an exception is raised in the preexec_fn callback. In this case, the calling function never gets a reference to the transport object, and c

[issue24681] Put most likely test first in set_add_entry()

2015-07-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e3be159d023 by Raymond Hettinger in branch 'default': Issue #24681: Move the most likely test first in set_add_entry(). https://hg.python.org/cpython/rev/9e3be159d023 -- ___ Python tracker

[issue24681] Put most likely test first in set_add_entry()

2015-07-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file40083/popen_error_close.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread STINNER Victor
STINNER Victor added the comment: popen_error_close.patch: I put more code in the try block to ensure that the transport is close on any kind of error, and I added an unit test. -- ___ Python tracker _

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6b8a0c6b8c9 by Victor Stinner in branch '3.4': Fix ResourceWarning in asyncio.BaseSubprocessTransport https://hg.python.org/cpython/rev/f6b8a0c6b8c9 -- nosy: +python-dev ___ Python tracker

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread STINNER Victor
STINNER Victor added the comment: I applied your patch + my patch to Python 3.4, 3.5 and 3.6 and asyncio at Github. Thanks for the report and the patch Martin! -- resolution: -> fixed status: open -> closed versions: +Python 3.6 ___ Python tracker

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-07-31 Thread Peter Landry
Peter Landry added the comment: I realized my formatting was poor, making it hard to quickly test the issue. Here's a cleaner version: import cgi from io import BytesIO BOUNDARY = "JfISa01" POSTDATA = """--JfISa01 Content-Disposition: form-data; name="submit-name" Conte

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-07-31 Thread Peter Landry
New submission from Peter Landry: `cgi.FieldStorage` can't parse a multipart with a `Content-Length` header set on a part: ```Python 3.4.3 (default, May 22 2015, 15:35:46) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.49)] on darwin Type "help", "copyright", "credits" or "license" for mor

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-07-31 Thread STINNER Victor
STINNER Victor added the comment: @Pierre Quentel: Hi! Are you still working on CGI? Can you please review this patch? Thanks. -- Previous large change in the cgi module: issue #4953. Pierre helped a lot on this one. -- nosy: +quentel ___ Python t

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-07-31 Thread jan parowka
New submission from jan parowka: IDLE shouldn't pollute user's home directory on Windows, standard location for config files is %APPDATA%\, which resolves to C:\Users\\AppData\Roaming\ in Vista upwards and somewhere in Documents and Settings under XP. -- components: IDLE messages: 247

[issue12006] strptime should implement %G, %V and %u directives

2015-07-31 Thread Ashley Anderson
Ashley Anderson added the comment: Here is an updated patch with implementation as outlined in msg247525. -- Added file: http://bugs.python.org/file40085/issue12006_7_complete.patch ___ Python tracker _

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-07-31 Thread Erik Bray
New submission from Erik Bray: This issue is directly related to http://bugs.python.org/issue5890, the solution to which I think was incomplete. The examples below use a trivial subclass of property (but apply as well to a less trivial one): >>> class myproperty(property): pass ... When usin

[issue24757] Installing Py on Windows: Need to restart or logout for path to be added

2015-07-31 Thread Steve Dower
Steve Dower added the comment: That's exactly what is needed (though it still won't affect command prompts that are already open). The 3.5+ installer does it, so this only affects 2.7 and 3.4. -- versions: +Python 3.4 ___ Python tracker

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-07-31 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-07-31 Thread Ethan Furman
Ethan Furman added the comment: Looks good so far. Let's get some tests in place. -- stage: -> test needed type: -> behavior versions: +Python 3.5, Python 3.6 ___ Python tracker _

[issue24750] IDLE: Cosmetic improvements for main window

2015-07-31 Thread Mark Roseman
Mark Roseman added the comment: I'll raise the practical matter that ActiveState no longer distributes 8.4.x as part of its Community edition ActiveTcl, though I presume it would be available as part of its for-fee Business version. Therefore if someone wants to use Python on 10.5, it would be

[issue24750] IDLE: Cosmetic improvements for main window

2015-07-31 Thread Mark Roseman
Mark Roseman added the comment: Ned, quick question... if there is a tcl/tk 8.5.x on the system, will the 32 bit prebuilt distros link with it, or only with a 8.4.x version? -- ___ Python tracker _

[issue23574] datetime: support leap seconds

2015-07-31 Thread dlroo
dlroo added the comment: Is it possible to modify datetime so that the check_time_args function in the datetimemodule.c does not error when given a seconds value of greater than 59? I was thinking that if the seconds were greater than 59, the seconds are set to 59 and any extra seconds are ke

[issue23574] datetime: support leap seconds

2015-07-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please redirect this discussion to the recently opened datetime-sig mailing list. https://mail.python.org/pipermail/datetime-sig/ -- ___ Python tracker

[issue24750] IDLE: Cosmetic improvements for main window

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: For years there have been people who want to remove Idle from the stdlib for all distributions, not just the OS 10.5 release. Even Guido is now having thoughts along this line. One of the reasons is appearance. Not improving that will make it more likely tha

[issue24724] Element.findall documentation misleading

2015-07-31 Thread Eric S
Eric S added the comment: To my preference, the drop-in is verbose and I got a little confused on first read. The current documentation and example seem mostly OK to me. If we leave "children" as in "all children of *root*", it doesn't illuminate the fact that if root had a great-great-grand

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-07-31 Thread eryksun
eryksun added the comment: On Windows, using the shell's [Known Folders API][1] is preferred. For Python 3.6+, an extension module could wrap SHGetKnownFolderPath and provide a dict of KNOWNFOLDERID values such as FOLDERID_RoamingAppData. On Linux, there's the [XDG Base Directory Specification

[issue24767] can concurrent.futures len(Executor) return the number of tasks?

2015-07-31 Thread Pat Riehecky
New submission from Pat Riehecky: As a feature request, can the Executor respond to a len() request by showing the number of non-finished/non-canceled items in the pool? I would like a clean pythonic way of seeing how many items remain to be executed and this seemed the way to go. psudo-code:

[issue24724] Element.findall documentation misleading

2015-07-31 Thread Stefan Behnel
Stefan Behnel added the comment: Whenever you feel a need for using range(len(...)), you are almost always doing something wrong. The problem in your code is that you are modifying the tree while iterating over it. However, please ask this question on the mailing list as the bug tracker is not

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-07-31 Thread Robert Collins
Changes by Robert Collins : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-07-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa8b76dfd138 by Robert Collins in branch '3.4': Issue #22932: Fix timezones in email.utils.formatdate. https://hg.python.org/cpython/rev/fa8b76dfd138 New changeset 94b43b36e464 by Robert Collins in branch '3.5': Issue #22932: Fix timezones in email.

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-07-31 Thread Robert Collins
Robert Collins added the comment: Applied to 3.4 and up. Thanks for the patch! -- nosy: +rbcollins resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker __

[issue24767] can concurrent.futures len(Executor) return the number of tasks?

2015-07-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think len() is a good idea for this, it's not obvious enough (why the number of tasks and not the number of threads/processes, for example?). Also, len() can make the object evaluate false-y in a boolean context, if len() returns 0. A dedicated method

[issue24720] Python install help

2015-07-31 Thread node
node added the comment: SOLVED: The PC errors were solved by doing the following. I found this after doing some extensive search. hxxps://social.msdn.microsoft.com/Forums/en-US/10b9c8b4-7e49-4724-bca4-6ee5f4ec8a10/visual-studio-2015-professional-fails-to-install-on-windows-7?forum=vssetup I

[issue24720] Python install help

2015-07-31 Thread Zachary Ware
Zachary Ware added the comment: Since this has been conclusively shown to not be a Python bug, closing the issue. This isn't a support forum, you'll have to look elsewhere for help with Eclipse. -- resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue24767] can concurrent.futures len(Executor) return the number of tasks?

2015-07-31 Thread Pat Riehecky
Pat Riehecky added the comment: works for me -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue24768] Bytearray double free or corruption

2015-07-31 Thread pidpawel
New submission from pidpawel: I've managed to isolate some code whish results in core dump/heap corruption. I've tested it on Python 3.4 and 2.7. On 2.7 works fine, on 3.4.3 bug exists. Example backtraces: ⌠ aqua ~ Error! ⌡ <%pidpawel> time ./deltest.py *** Error in `python3': malloc(): memory

[issue24763] asyncio.BaseSubprocessTransport triggers an unavoidable ResourceWarning if process doesn't start

2015-07-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6703ac68bf49 by Victor Stinner in branch '3.4': Issue #24763: Fix asyncio test on Windows https://hg.python.org/cpython/rev/6703ac68bf49 -- ___ Python tracker

[issue24718] Specify interpreter when running in IDLE

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have in mind the idea of enhancing run module options. In particular, I think there should be a "Run in console" option ("python -i -m ". However I do not understand exactly what you would want. I believe you could now write an extension that would add 'pg

[issue17013] Allow waiting on a mock

2015-07-31 Thread Robert Collins
Robert Collins added the comment: Now at https://github.com/testing-cabal/mock/issues/189 -- nosy: +rbcollins ___ Python tracker ___ _

[issue19007] precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime

2015-07-31 Thread STINNER Victor
STINNER Victor added the comment: Good news! I got a new fresh Windows 8.1 VM with Visual Studio 2015. I'm now able to work on this issue. I wrote a patch: time_precise.patch. Resolution computed in Python by https://hg.python.org/peps/file/tip/pep-0418/clock_resolution.py: GetSystemTimePrec

[issue19007] precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime

2015-07-31 Thread STINNER Victor
STINNER Victor added the comment: Note: GetSystemTimePreciseAsFileTime() is restricted to desktop applications. The windowstimestamp.com has a warning on this function: http://www.windowstimestamp.com/description """ 2.1.4.2. Desktop Applications: GetSystemTimePreciseAsFileTime() (...) The f

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-31 Thread Eric Snow
Eric Snow added the comment: I've verified that it is definitely the linked list that is getting updated incorrectly at the point that a key is popped off. The underlying dict is working fine. The erroneous behavior is happening with either pop, popitem, or __delitem__. However, it is likel

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached revised file that runs to completion on 2.7 and 3.x. -- nosy: +terry.reedy stage: -> test needed versions: +Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file40089/tem2.py ___ Python

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Marco, #-prefixed issue numbers like this, #24721, #24667, and #24685, are easier to read. -- ___ Python tracker ___ __

[issue24740] make patchcheck doesn't detect changes if commit is done first

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Better: a local commit hook that rejects commits that cannot be pushed. I think this has been discussed, but never done, unless something has been added to the devguide that I missed. Better still: the hoped-for new workflow where patches are submitted to an

[issue24756] doctest run_docstring_examples does have an obvious utility

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ditto -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue24768] Bytearray double free or corruption

2015-07-31 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +benjamin.peterson, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue24724] Element.findall documentation misleading

2015-07-31 Thread Martin Panter
Martin Panter added the comment: Eric: Calling findall("country") does _not_ return grandchidren nor further descendants. Also, your pseudocode calling findall() with no arguments does not work, so I am left wondering where you got the wrong impression about grandchildren. The usual way to get

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-07-31 Thread Alex Grönholm
Alex Grönholm added the comment: Sorry to keep you waiting. This sample code runs fine with the attached patch: https://gist.github.com/agronholm/43c71be0028bb866753a In short, I implemented support for concurrent.futures in the asyncio Task class instead of making concurrent.futures aware of

[issue24745] Better default font for editor

2015-07-31 Thread Mark Roseman
Mark Roseman added the comment: I've attached defaultfont.patch which will look for the magic value 'TkFixedFont' in the configuration file and do some appropriate magic with it. Most of the font handling smarts are now in a 'GetFont' call in configHandler, which as a bonus reduces some of th

[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-07-31 Thread Yury Selivanov
Yury Selivanov added the comment: > In short, I implemented support for concurrent.futures in the asyncio Task > class instead of making concurrent.futures aware of asyncio. The __await__ > implementation in concurrent.futures closely mirrors that of asyncio's Future. I like your approach and

[issue24768] Bytearray double free or corruption

2015-07-31 Thread Martin Panter
Martin Panter added the comment: Reproduceable on 32 bit x86 Arch Linux. FTR this is not Issue 23985, since that was fixed in 3.4.3. I have not investigated, but maybe it shares the same cause (Issue 19087). Also, it may be helpful to build with “./configure --with-pydebug” to pinpoint the pro

[issue24768] Bytearray double free or corruption

2015-07-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24768] Bytearray double free or corruption

2015-07-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: This was actually fixed in 98c1201d8eea, which didn't make it into 3.4.3. -- resolution: -> out of date status: open -> closed ___ Python tracker _

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-07-31 Thread jan parowka
jan parowka added the comment: Mac Developer Library mentions Library/Application Support/ as a preferred directory to store configuration files for an application, gotten via a call to NSSearchPathForDirectoriesInDomains or NSFileManager with NSApplicationSupportDirectory path key and either

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is a bug in _PyObject_GenericSetAttrWithDict() Objects/object.c where a calls are made to PyDict_SetItem() and PyDict_DelItem() without checking first checking for PyDict_CheckExact(). * In PEP 372, OrderedDict was consciously specified to be a sub

[issue24768] Bytearray double free or corruption

2015-07-31 Thread Martin Panter
Martin Panter added the comment: Ah yes, I was confused. The bug fix isn’t actually in 3.4.3. -- ___ Python tracker ___ ___ Python-bug

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-07-31 Thread Martin Panter
Martin Panter added the comment: See also Issue 7175, although I think that is more about low-level Python configuration, rather than application-level configuration like Idle. -- nosy: +vadmium ___ Python tracker

[issue21192] Idle: Print filename when running a file from editor

2015-07-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 20a8e5dccf66 by Terry Jan Reedy in branch '2.7': Issue #21192: Idle Editor. When a file is run, put its name in the restart bar. https://hg.python.org/cpython/rev/20a8e5dccf66 New changeset 2ae12789dcb8 by Terry Jan Reedy in branch '3.4': Issue #211

[issue21192] Idle: Print filename when running a file from editor

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is how restarts look now. Thanks for the initial idea and patch. >>> == RUN C:\Programs\Python34\tem.py = >>> === RESTART Shell = >>> -- resolution: ->

[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-07-31 Thread Jeffrey Armstrong
New submission from Jeffrey Armstrong: When attempting to build Python without dynamic loading (HAVE_DYNAMIC_LOADING is not defined), the module "_imp" will not have the function "exec_dynamic." However, Lib/bootstrap.py seems to assume that "_imp.exec_dynamic" exists, causing the error: ---

[issue22625] When cross-compiling, don’t try to execute binaries

2015-07-31 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue24770] Py_Finalize not cleaning up all threads

2015-07-31 Thread Alex Budovski
New submission from Alex Budovski: This is a known issue, from the comment, but it is causing AVs for my embedded application when background threads are created, for example, by the _socket builtin module. /* Undo the effect of Py_Initialize(). Beware: if multiple interpreter and/or threa

[issue24770] Py_Finalize not cleaning up all threads

2015-07-31 Thread Alex Budovski
Changes by Alex Budovski : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth