[issue27581] Fix overflow check in PySequence_Tuple

2016-07-20 Thread Xiang Zhang
New submission from Xiang Zhang: Overflow check in PySequence_Tuple relies on undefined behaviour, fix it. -- components: Interpreter Core files: overflow_check_in_PySequence_Tuple.patch keywords: patch messages: 270909 nosy: martin.panter, serhiy.storchaka, xiang.zhang priority: normal

[issue27580] CSV Null Byte Error

2016-07-20 Thread Bobby Ocean
New submission from Bobby Ocean: I think this has been asked before, but it has been awhile and I think needs to be re-addressed. Why doesn't the CSV module handle NULL bytes? Let me do some examples, ascii = [chr(n) for n in range(256)] #No errors print(ascii) #No errors print(dict(zip(as

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-20 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, Martin. I replied your last comment and your patch looks good to me except one test fails: [1/1] test_zlib test_abcdefghijklmnop (test.test_zlib.ChecksumTestCase) test issue1202 compliance: signed crc32, adler32 in 2.x ... ok test_adler32empty (test.test_zlib.

[issue27575] dict viewkeys intersection slow for large dicts

2016-07-20 Thread David Su
David Su added the comment: Here are some tests that I ran: Using current naive viewkeys intersection: $ python -m timeit -n 100 -s "d = dict.fromkeys(xrange(1000), 0)" "d.viewkeys() & {0}" 100 loops, best of 3: 447 msec per loop Nearly half a second per iteration is unacceptably slow.

[issue27575] dict viewkeys intersection slow for large dicts

2016-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, sets and dicts convert back and forth very efficiently (the hash values are reused and the collection is presized with just a single memory allocation). Also, the sets and dicts have shared pointers to the underlying data (which is often much bigger

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-20 Thread Martin Panter
Martin Panter added the comment: The new patch looks good enough. The main reason I complained about the error message is that it sounds like you need Python in order to build Python. Obviously you need Python to run a modified file like typeslots.py, but there is supposed to be an alternative

[issue15786] IDLE code completion window can hang or misbehave with mouse

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, could you take at least a quick look at this troublesome issue? The issue seems to be this: idlelib.autocomplete_w.py has # at the top LISTUPDATE_SEQUENCE = "" # within show_window method self.listupdateid = listbox.bind(LISTUPDATE_SEQUENCE,

[issue734176] Make Tkinter.py's nametowidget work with cloned menu widgets

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, if you are sure your patch is an improvement, then I think you should commit it without waiting for perfection. Only the other hand, #18686 does not demonstrate a problem *to me* as it does not fail for me. Does anyone else reproduce the failure on a

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-20 Thread Martin Panter
Martin Panter added the comment: I think I misunderstood the Windows situation. Now I understand Windows has no lower-case variable names, so this patch would stop accepting any HTTP_PROXY variable there (in CGI mode). But that is okay by me. I agree the mixed-case scenario is not worth worryi

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2016-07-20 Thread Patrick Stewart
Patrick Stewart added the comment: This also fixes python 3.5 -- nosy: +Patrick Stewart ___ Python tracker ___ ___ Python-bugs-list ma

[issue9618] IDLE shell ignores all but first statement

2016-07-20 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-07-20 Thread Martin Panter
Martin Panter added the comment: Mathieu: Maybe you haven’t seen some of the comments on your older patches. E.g. my comment on fromisoformat4.patch about improper use of “with self.assertRaises(...)” still stands. Also, adding some documentation to the patch might help the likes of Anders fi

[issue16198] IDLE - tabbing in a string always brings up file completion window

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is intentional that be treated as a normal tab. The autocomplete_event tab handler begins with if hasattr(event, "mc_state") and event.mc_state: # A modifier was pressed along with the tab, continue as usual. return To fix the problem

[issue3559] IDLE: Pasted newline doesn't trigger execution when typed newline would

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: My initial experiments indicate that pasted tabs are at least sometimes treated differently, but I need to do more to be sure. -- versions: -Python 3.4 ___ Python tracker

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d8f988522ed by Victor Stinner in branch 'default': Issue #23951: remove devguide_theme_revised.patch https://hg.python.org/devguide/rev/7d8f988522ed -- ___ Python tracker

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread STINNER Victor
STINNER Victor added the comment: Berker Peksag > -1. I think the current devguide theme looks fine and it would be nice to > keep devguide and Python documentations use different themes. I pushed the change because there were 3 positive votes and no negative vote, and I like the proposed them

[issue27569] Windows install problems

2016-07-20 Thread Ricardo Esperanza
Ricardo Esperanza added the comment: Steve I tried again an installed correctly. Don´t understand what happened, but anyway it installed thanks -- ___ Python tracker ___ _

[issue27569] Windows install problems

2016-07-20 Thread Steve Dower
Steve Dower added the comment: That time it looks like it failed to install the launcher for all users. Did you get an elevation prompt? -- ___ Python tracker ___ __

[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Addendum: I verified flag 8 is Mod1 is Numlock on Windows. http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-handlers.html has table that claims that 8 is Left Alt and that 16 is NumLock. From what you say above, true on non-mac *nix, and only there. F

[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg268826 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg268824 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue27575] dict viewkeys intersection slow for large dicts

2016-07-20 Thread David Su
Changes by David Su : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2016-07-20 Thread Ned Deily
Ned Deily added the comment: I now see Vedran has already opened Issue27539 for this. Sorry for the additional noise. -- ___ Python tracker ___

[issue27576] An unexpected difference between dict and OrderedDict

2016-07-20 Thread Alakshendra Yadav
Changes by Alakshendra Yadav : -- nosy: +alakyadav ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2016-07-20 Thread Ned Deily
Ned Deily added the comment: @Vedran, the original issue is closed and the code for it already released. Please open a new issue referencing this one, otherwise your comments here will likely be forgotten. -- nosy: +ned.deily versions: -Python 3.6 ___

[issue27574] Faster parsing keyword arguments

2016-07-20 Thread Brett Cannon
Brett Cannon added the comment: I haven't reviewed the patch, but the idea is great as I know one of Larry's hopes of using Argument Clinic was to allow for this kind of speed-up. -- nosy: +brett.cannon, larry ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've seen a similar glitch. Reloading the page usually fixes the problem. > On Jul 20, 2016, at 11:37 AM, Steve Holden wrote: > > > Steve Holden added the comment: > > BTW, I presume it's a bug in the issue tracker that my view of this message > ends

[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-20 Thread Ludovic Gasc
Changes by Ludovic Gasc : -- nosy: +Ludovic.Gasc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread R. David Murray
R. David Murray added the comment: I doubt it is a bug in the tracker. I've seen that kind of thing when I am having network issues...the browser renders what it gets, and if it doesn't get it all it looks like the page ends early. -- ___ Python tr

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread Tim Peters
Tim Peters added the comment: FYI, I'm seeing the same kind of odd truncation Steve sees - but it goes away if I refresh the page. -- ___ Python tracker ___

[issue15443] datetime module has no support for nanoseconds

2016-07-20 Thread Steve Holden
Steve Holden added the comment: BTW, I presume it's a bug in the issue tracker that my view of this message ends after a few lines of msg166386? Makes it rather difficult to track the issue! -- ___ Python tracker

[issue1621] Do not assume signed integer overflow behavior

2016-07-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread Berker Peksag
Berker Peksag added the comment: Can we at least serve images and JS files (py.png -- this gives 404 now, copybutton.js, sidebar.js) from docs.python.org? It seems like devguide_theme_revised.patch was committed accidentally: https://hg.python.org/devguide/rev/9e7b1bc15ba7#l3.3 The color of a

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread Carol Willing
Carol Willing added the comment: Fair enough. Ronald and David, I respect your suggestions and thoughts, and I will not triage or close old issues. FWIW, I was trying to be helpful. We regularly close issues that are 1+ year old on Jupyter/IPython or rescope the issue to be actionable for con

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread R. David Murray
R. David Murray added the comment: Heh, that should have been "only close an old issue that hasn't been otherwise resolved if...". -- ___ Python tracker ___ _

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread R. David Murray
R. David Murray added the comment: Right. Only close an issue if there is an existing open issue that addresses the topic better. Age alone is never a criteria for closing issues. Since Ronald agrees the other issue is enough we'll leave this closed, but it wouldn't be crazy to reopen it eit

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread R. David Murray
R. David Murray added the comment: I think a reasonably consistent look and feel for all our docs is a good thing. It's a "branding" kind of thing. Differentiation by color works for me, but really I don't care about differentiating them, myself. (I actually find it jarring that I don't get

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: Did you create that new issue? If not this feature request will likely be forgotten. Hmmm... Issue7713 appears to be good enough for remembering that there is a problem with the way setup.py looks for libraries. --

[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-20 Thread Yury Selivanov
Yury Selivanov added the comment: I guess someone has to step forward -- i can propose an initial patch with the tutorial. -- ___ Python tracker ___

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread Carol Willing
Carol Willing added the comment: Ronald, while I may have closed this issue prematurely in other folks' view, I did not do so without thought or reflecting if the issue was relevant. My recommendation to close the issue was based on several factors: - the desire to assist triaging issues that

[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-20 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: The documentation of AsyncIO is well written for a developer, but it's a reference. We have the description of all the methods, classes, etc... But we want to learn to develop with AsyncIO, it's difficult, because there is no many examples in this reference

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread Carol Willing
Carol Willing added the comment: Lisa, thanks for your work and persistence on this patch. In particular, the pydoctheme's sidebar improves the user's ability to navigate through the devguide's content. Thank you! If folks desire more distinction between the devguide and the language docs, co

[issue13376] readline: pre_input_hook not getting called

2016-07-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: The problem with fixing in editline is that Apple ships a copy of editline and that is used when build CPython by default. IMHO it would be acceptable to work around this in the readline extension if that can be done in a clean way. -- _

[issue8406] Make some setup.py paths exclude-able

2016-07-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't understand why this issue was closed. Apparently it was closed because it is an old issue without checking if the issue is still relevant??? To be honest the way setup.py looks for libraries could use some attention, the current methods is a bit too m

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread Berker Peksag
Berker Peksag added the comment: -1 I think the current devguide theme looks fine and it would be nice to keep devguide and Python documentations use different themes. I'd be -0 if the patch was small, but diff stat "11 files changed, 1651 insertions(+), 10 deletions(-)" is huge and it would

[issue27578] inspect.findsource raises exception with empty __init__.py

2016-07-20 Thread R. David Murray
R. David Murray added the comment: I agree that this is inconsistent. It might be quite tricky to fix, though, unless we special case file.endswith('__init__.py'), which feels like a hack. But maybe it is appropriate. -- nosy: +r.david.murray versions: +Python 3.6 __

[issue20932] Undefined behavior flagged by Clang 3.4 (Python 3.5 from hg)

2016-07-20 Thread Martin Panter
Martin Panter added the comment: Serhiy’s patch does fix about half the errors (1 whole screenful reduces to a bit over 1/2 a screenful). I do find it a bit ugly though (four casts in the one term of a macro!). -- ___ Python tracker

[issue1621] Do not assume signed integer overflow behavior

2016-07-20 Thread Martin Panter
Martin Panter added the comment: Serhiy: slice-step.patch seems to be fine with negative slice steps. The actual indexes are still positive, and “unsigned” arithmetic is really modular arithmetic, so when you add the negative “unsigned” step value, it decrements the index properly. Antti: if

[issue14903] dictobject infinite loop in module set-up

2016-07-20 Thread Max Khon
Max Khon added the comment: I reproduced the problem with Python 2.7.5 as shipped with CentOS 7: root@192.168.0.86 /home/padmin # python -V Python 2.7.5 root@192.168.0.86 /home/padmin # rpm -q python python-2.7.5-34.el7.x86_64 root@192.168.0.86 /home/padmin # (gdb) bt #0 lookdict_string (mp=,

[issue27578] inspect.findsource raises exception with empty __init__.py

2016-07-20 Thread Alexander Todorov
New submission from Alexander Todorov: $ python2 Python 2.7.5 (default, Oct 11 2015, 17:47:16) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> from pykickstart import handlers >>> inspect.getsource(han

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-20 Thread Martin Panter
Martin Panter added the comment: Here is a possible patch for 2.7. To fix everything on 2.7 I changed the module to accept input buffers over 2 GiB by enabling PY_SSIZE_T_CLEAN. As a consequence, the patch also includes ports of Nadeem Vawda’s adler32(), crc32() changes from Issue 10276, and m

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2016-07-20 Thread Stefan Krah
Stefan Krah added the comment: Apparently sysconfig.get_config_var() is already called in site.py anyway, so in principle I'm fine with using it here. In the stdlib it seems to be the first use outside site.py though, and site.py can be disabled by using "python -S", so perhaps we should be extr

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-20 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I don't know what is the best place to add new unit tests. I don't know neither what is the best place to document the __ltrace__ feature. Maybe somewhere near: * https://docs.python.org/dev/library/debug.html Or maybe: * https://docs.python.org/dev/lib

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-20 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to have unit tests and docs :-) For unit test, you can use a script like: --- def func(): return 1 __ltrace__ = True func() --- Run the script with test.support.assert_python_ok(), and check stdout. To skip the test if Python is compiled

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread STINNER Victor
STINNER Victor added the comment: I pushed your new style, thanks. I didn't see any malware in the new Javascript nor new HTML :-) I keep the issue open until the online doc is updated. -- ___ Python tracker

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e7b1bc15ba7 by Victor Stinner in branch 'default': Use the same style than Python ref doc https://hg.python.org/devguide/rev/9e7b1bc15ba7 -- nosy: +python-dev ___ Python tracker

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Totally agree with you, I am going to check that, because currently, there is no test with this "hidden" feature in Python. I am going to discuss with Victor about this point. Thanks, Stephane On 07/20, Xavier Combelle wrote: > >Xavier Combelle added the co

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-20 Thread Xavier Combelle
Xavier Combelle added the comment: I made some comment on code in review. A thing that worry me that there is zero automated test. In my opinion the minimal should be to test the expected output. A nice to have would be a test for the write_contents function of makeopcodetranslations.py

[issue27577] Make implementation and doc of tuple and list more compliant

2016-07-20 Thread Xiang Zhang
Changes by Xiang Zhang : -- title: tuple and list parameter name conflicts between doc and implementation -> Make implementation and doc of tuple and list more compliant ___ Python tracker

[issue27577] tuple and list parameter name conflicts between doc and implementation

2016-07-20 Thread Xiang Zhang
New submission from Xiang Zhang: For tuple and list, their signatures are tuple([iterable]) and list([iterable]). But actually they support keyword argument *sequence*. The parameter names in doc are sometimes just placeholders but sometimes are real parameter names. So I suggest make the impl