[issue24848] Warts in UTF-7 error handling

2015-08-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Trying to implement UTF-7 codec in Python I found some warts in error handling. 1. Non-ASCII bytes. No errors: >>> 'a€b'.encode('utf-7') b'a+IKw-b' >>> b'a+IKw-b'.decode('utf-7') 'a€b' Terminating '-' at the end of the string is optional. >>> b'a+IKw'.deco

[issue22598] Add mUTF-7 codec (UTF-7 modified for IMAP)

2015-08-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Warts in UTF-7 error handling ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
New submission from flying sheep: Things like progressbars want len() to work on iterated objects. It’s possible to define __len__ for many of the iterables returned by itertools. some arguments have to be iterated to find the len(): of course we have to check if those are reentrant, and raise

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-08-12 Thread Cyd Haselton
Cyd Haselton added the comment: After struggling to get helpful output from gdb it is looking like it will not be possible due to the lack of debugging symbols in the libs on the android device. Still investigating. -- ___ Python tracker

[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4

2015-08-12 Thread Stian Lode
Stian Lode added the comment: I'm seeing this bug in Python 3.4.2 as well, and the patch here (tstate_trashcan.patch) appears to fix it. I'm using boost 1.57.0, and Python was compiled on a vanilla rhel6 system. -- nosy: +Stian Lode, larry versions: +Python 3.4 -Python 2.7 Added file:

[issue16041] poplib: unlimited readline() from connection

2015-08-12 Thread R. David Murray
R. David Murray added the comment: It has been, see the referenced issue. Now we just need someone to write a patch. -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue23906] poplib maxline behaviour may be wrong

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Note that the max message size solution can be applied to the maintenance releases as a fix for this issue by choosing a suitable large default message size. The 'feature' part is just the part exposing the size limit in the library API...that part is a feat

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread R. David Murray
R. David Murray added the comment: No, you may not iterate the iterator in order to compute the len, because then the iterator would be exhausted. In addition, the point of itertools is to *lazily* do operations on iterables of indefinite length, so to offer __len__ if and only if the argumen

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: Unfortunately, this fails because there is no way to tell how long an arbitrary iterable is, or whether it is reentrant or not. Consider: def gen(): while True: if random.random() < 0.5: return random.random() Not only is it not reentr

[issue24846] Add tests for ``from ... import ...` code

2015-08-12 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-08-12 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Doesn't Python still have debug symbols? The system ones don't matter too much. On August 12, 2015 6:21:23 AM CDT, Cyd Haselton wrote: > >Cyd Haselton added the comment: > >After struggling to get helpful output from gdb it is looking like it >will not be possib

[issue23906] poplib maxline behaviour may be wrong

2015-08-12 Thread shiyao.ma
shiyao.ma added the comment: Instead of setting a MAXSIZE for the email body, rasing up the MAXLINE might be more meaningful. Consider the case of MAXSIZE, it's essentially the same as MAXLINE. If MAXSIZE is relatively small, some messages won't pass through. If the MAXSIZE is relatively lar

[issue23906] poplib maxline behaviour may be wrong

2015-08-12 Thread R. David Murray
R. David Murray added the comment: If maxline is too small, messages won't get through. If maxline is too large *huge* messages will get through...and the DDOS danger of exhausting the server's resources will occur. So, we really ought to provide a way to limit the maximum message size *anyw

[issue24039] Idle: some modal dialogs maximize, don't minimize

2015-08-12 Thread Mark Roseman
Changes by Mark Roseman : -- nosy: +markroseman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue2053] IDLE - standardize dialogs

2015-08-12 Thread Mark Roseman
Changes by Mark Roseman : -- nosy: +markroseman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue9262] IDLE: Use tabbed shell and edit windows

2015-08-12 Thread Mark Roseman
Mark Roseman added the comment: Roger's extension is an amazingly cool hack. With some of the decoupling mentioned in #24826, the actual switching should get easier. Regarding cosmetics, I wanted to make a suggestion. The tabs provided by ttk::notebook aren't ideally suited for this task, both

[issue24850] syslog.syslog() does not return error when unable to send the log

2015-08-12 Thread Cyril Bouthors
New submission from Cyril Bouthors: Hi guys, syslog.syslog() does not report any error when it fails to send messages to syslog. To reproduce: Stop sysglog: sudo /etc/init.d/rsyslog stop Run than Python code: import syslog syslog.syslog('test') It does not fail. Strace shows that's it's b

[issue9262] IDLE: Use tabbed shell and edit windows

2015-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: A tabbed widget, however implemented, should be a component that can either be in a Toplevel with menu by itself, or added to an application window (#24826). -- ___ Python tracker

[issue24826] ability to integrate editor, shell, debugger in one window

2015-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: #9262 is step b) above, and therefore a dependency for this issue. -- dependencies: +IDLE: Use tabbed shell and edit windows ___ Python tracker

[issue9262] IDLE: Use tabbed shell and edit windows

2015-08-12 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24850] syslog.syslog() does not return error when unable to send the log

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Hmm. Normally the way errors are reported in python is via exception. personally I would not want syslog raising an exception if it couldn't deliver the message. I suppose we could have it return a status code. That would be a new feature, though. --

[issue24745] Better default font for editor

2015-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just returned from a trip. I think restoring the status quo is sufficient, so I will likely apply to 2.7 and 3.4 and null merge forward. Is there anyway to get test run with 8.4 automatically, as least intermittantly, before the rc? --

[issue24826] ability to integrate editor, shell, debugger in one window

2015-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: #24760 - config dialog not modal, is part of c) -- dependencies: +IDLE settings dialog shouldn't be modal ___ Python tracker ___ ___

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2015-08-12 Thread Tim Peters
Tim Peters added the comment: > The only reason for the restriction that > I can think of is that some text representation > of datetime only provide 4 digits for timezone. There never was a compelling reason. It was simply intended to help catch programming errors for a (at the time) brand ne

[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-12 Thread Chris Hogan
Chris Hogan added the comment: >From Clark Nelson: > In my opinion, exactly how and where the macro is defined that indicates our > conformance to the FP standard > doesn't really matter. The point is that it is our intention to conform, at > least to some degree and under > some circumstance

[issue23749] asyncio missing wrap_socket (starttls)

2015-08-12 Thread Alex Grönholm
Changes by Alex Grönholm : -- nosy: +alex.gronholm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue16296] Patch to fix building on Win32/64 under VS 2010

2015-08-12 Thread Ralf Gommers
Ralf Gommers added the comment: I'll note that in Numpy we have now worked around the issue (with https://github.com/numpy/numpy/pull/4892), basically by monkeypatching distutils and doing: if '/MANIFEST' not in ldflags: ldflags.append('/MANIFEST') The bug report is still valid th

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-12 Thread Steve Dower
Steve Dower added the comment: Attaching two patches that fix the tcl/tk build to not require vcruntime140.dll at all. This is the better fix, though I haven't yet tested it thoroughly enough to convince myself that it's ready. One patch is for tcl/tk/tix themselves (which I'll submit upstream

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-12 Thread Steve Dower
Changes by Steve Dower : Added file: http://bugs.python.org/file40169/remove_vc140_py.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-12 Thread Paul Murphy
New submission from Paul Murphy: This is a duplicate of Issue 23654, except it occurs on GCC 5.1 with -O2 when building for a ppc64le target. GCC is optimizes this as a tail call, removing the accesses to the "unused" stack variables. -- components: Extension Modules files: fix_stack_

[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4

2015-08-12 Thread Larry Hastings
Larry Hastings added the comment: Can anyone else confirm this bug in 3.4? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24841] Some test_ssl network tests fail if svn.python.org is not accessible.

2015-08-12 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy nosy: +berker.peksag stage: -> needs patch versions: -Python 3.3 ___ Python tracker ___ __

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
flying sheep added the comment: Hi, and sorry David, but I think you haven’t understood what I was proposing. Maybe that was too much text and detail to read at once, while skipping the relevant details: Python has iterators and iterables. iterators are non-reentrant iterables: once they are

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
flying sheep added the comment: To elaborate more on my second point (“No reentrant iterables are necessary here, only iterables with a __len__”) What i meant here is that inside a call of chain(*iterables), such as chain(foo, bar, *baz_generator()), the paramter “iterables” is always a tuple,

[issue21126] Return results from doctest.run_docstring_examples()

2015-08-12 Thread Robert Collins
Robert Collins added the comment: So, I think this needs a test; returning a generator would be nice but would be an API break. Also the doc update needs to say 3.6 now. Thanks; moving back to patch review. -- nosy: +rbcollins stage: commit review -> patch review

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread R. David Murray
R. David Murray added the comment: No, I guessed that despite saying "some arguments have to be iterated" that you were really talking about arguments that had __len__. That's why I added the sentence about it not being appropriate even if you only did it when the inputs had __len__. But I'l

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-12 Thread R. David Murray
R. David Murray added the comment: I've applied this patch to 2.7 on OSX and compiled without -fp-model strict, and all of the tests now pass. -- ___ Python tracker ___

[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-08-12 Thread Robert Collins
Robert Collins added the comment: @ashkop so append=True could be clearer as 'atend=True' - both forms of call are expected to add the filter, but one adds to the front, one to the end. Looking at warn_explicit, its takes the first matching filter, and then acts on its action. So the followin

[issue24440] Move the buildslave setup information from the wiki to the devguide

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Here is an updated version of my buildslave patch, incorporating what I've learned in getting the Intel mac buildbot fully functional, and some additions from my review of the issue 13124 patch. This is ready for final review and commit. Note that the window

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

2015-08-12 Thread Robert Collins
Robert Collins added the comment: So it is downplayed but it is still documented as being application usable. I'll give this another week for Ned to reply, then commit it in the absence of a reply: I think its ok as is. I'd be ok with a tweaked version along the lines Ned proposed too: both wa

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-12 Thread Robert Collins
Robert Collins added the comment: Sorry, I didn't realise that Zbigniew was an alternative spelling of your first name. -- ___ Python tracker ___ ___

[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Now, what's the equivalent patch for python3? Should I open a new issue for that? -- ___ Python tracker ___ _

[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Nevermind, I forgot to try and see if it applied...and it does :) -- versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ _

[issue24440] Move the buildslave setup information from the wiki to the devguide

2015-08-12 Thread Carol Willing
Carol Willing added the comment: This looks great. Two very minor typos. Overall, the patch renders nicely and can be merged. I agree that it is worth merging with or without windows instructions (which may be added later). Missing 'd' in email address +python-builsb...@python.org to discuss a

[issue24440] Move the buildslave setup information from the wiki to the devguide

2015-08-12 Thread R. David Murray
R. David Murray added the comment: Drat, I keep forgetting to put issue numbers in devguide commits :(. Changeset id is 7368a61d28de. Thanks for the review, Carol. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-08-12 Thread Mark Roseman
Mark Roseman added the comment: I did some followup on this today, and could reproduce it with a few lines of Tcl/Tk code. As Ned noted, it seems particular to the ActiveTcl build, as when I built my own 8.5.18 it also worked fine. (If you're curious, the thing that is failing is the MacWindow

[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-12 Thread STINNER Victor
STINNER Victor added the comment: You can try to add an ifdef in Include/pyatomic.h. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 51d00482d403 by Robert Collins in branch '3.5': Issue #23725: Overhaul tempfile docs. https://hg.python.org/cpython/rev/51d00482d403 New changeset 256d2f01e975 by Robert Collins in branch 'default': Issue #23725: Overhaul tempfile docs. https://hg.p

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-12 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch. I've committed the current status as an unambiguous improvement; we can add tempdir as deprecated later if there is consensus on that, the current patch did improve its docs per R. David Murray's request anyhow. -- resolution: -

[issue24852] Python 3.5.0rc1 "HOWTO Use Python in the web" needs fix

2015-08-12 Thread John Hagen
New submission from John Hagen: https://docs.python.org/3.5/howto/webservers.html#setting-up-fastcgi The "HOWTO Use Python in the web" documentation for 3.5.0rc1 prescribes to use flup in its example, which is not compatible with Python 3. This has led to some confusion: https://stackoverflow

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Wed, Aug 12, 2015 at 09:23:26PM +, flying sheep wrote: > Python has iterators and iterables. iterators are non-reentrant > iterables: once they are exhausted, they are useless. Correct. > But there are also iterables that create new, iterators wheneve

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-08-12 Thread Kevin Walzer
Kevin Walzer added the comment: I experimented with Mark's sample code (thanks for that, BTW), and found that the window with the "help" tag applied would display with this simple addition: raise .t I believe the equivalent call in Tinter is lift(), because raise() is for error handling? Perh

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, *raise* is a keyword and .lift() is the substitute. -- ___ Python tracker ___ ___ Python-bugs-l

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2015-08-12 Thread Alex Budovski
New submission from Alex Budovski: This means initialize/run script/finalize will crash the second time, since the inittab can have stale entries. -- messages: 248495 nosy: Alex Budovski priority: normal severity: normal status: open title: Py_Finalize doesn't clean up PyImport_Inittab

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue3244] multipart/form-data encoding

2015-08-12 Thread raylu
Changes by raylu : -- nosy: +raylu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailm

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I had explored this idea previously at some length (no pun intended) but it was mostly a dead-end. The best we ended-up with has having __length_hint__ to indicate size to list(). There were several issues some of which at detailed in the comment at the

[issue15601] tkinter test_variables fails with OS X Aqua Tk 8.4

2015-08-12 Thread Laura Creighton
Laura Creighton added the comment: Terry Reedy asked me to add this here. Either this bug is not fixed, or I am getting a new one. I have tried this on several debian unstable releases. lac at smartwheels:~$ lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.

[issue24854] Null check handle return by new_string()

2015-08-12 Thread Pankaj Sharma
New submission from Pankaj Sharma: The issue reported in python-2.7.10/Parser/tokenizer.c:237 to handle NULL return by new_string() if PyMem_MALLOC() failed. So need to check for NULL and return to prevent from crash happened in get_normal_name().this issue related with issue18470 has been tak

[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-08-12 Thread Alex Shkop
Alex Shkop added the comment: @rbcollins that is exactly what was trying to say in previous comment. We can make a change to current patch that won't affect behavior. In old API in this sequence of filters last filter was never used: simplefilter("ignore") simplefilter("error", append=True) si

[issue24855] fail to mock the urlopen function

2015-08-12 Thread sih4sing5hong5
New submission from sih4sing5hong5: I also posted in stackoverflow: http://stackoverflow.com/questions/30978207/python-urlopen-mock-fail ``` from unittest.mock import patch import urllib from urllib import request from urllib.request import urlopen @patch('urllib.request.urlopen') def openPatc