[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: There is also #27121 reporting similar problem. -- nosy: +xiang.zhang versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file45330/iterate_splittable_v3.patch ___ Python tracker ___

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Steve Dower
Steve Dower added the comment: This looks like a corrupted download to me - the update was aborted because none of the other packages were "found", which should be impossible since they are embedded in that executable. It may also be an antivirus program interfering though, as I'd expect a

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Kovid Goyal
Kovid Goyal added the comment: FYI, the uptodate version of imghdr I maintain is here: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/utils/imghdr.py It uses memoryview for performance and can also also read image sizes from file headers for jpeg, png, gif and jpeg2000. Note

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-11-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi, I updated the documentation explaining the path argument. Let me know if this works. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45329/issue26980.patch ___ Python

[issue19042] Idle: add option to autosave 'Untitled' edit window

2016-11-02 Thread perilbrain
perilbrain added the comment: I have signed the CA. Meantime a came across one more problem in function tabnanny(encoding issue) so I am attaching the new version of ScriptBinding.py. Summary:- def tabnanny(self, source, encoding = None): # XXX: tabnanny should work on binary

[issue28593] Inconsistent itertools' predicate behaviour

2016-11-02 Thread Francisco Couzo
New submission from Francisco Couzo: As per Terry's recommendation https://mail.python.org/pipermail/python-dev/2016-November/146791.html Currently some functions in itertools (dropwhile and takewhile), don't accept None as a predicate, but filterfalse and groupby do. I'd like your input,

[issue23693] timeit accuracy could be better

2016-11-02 Thread STINNER Victor
STINNER Victor added the comment: I wrote a whole new project "perf" to fix root issues of this issue. It includes a timeit command. I suggest you to use "perf timeit" rather than "timeit" because perf is more reliable: http://perf.readthedocs.io/en/latest/cli.html#timeit --

[issue28580] Optimize iterating split table values

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: (Off topic note) For readability, I prefer this style: PyDictKeyEntry *entries = DK_ENTRIES(mp->ma_keys); while (i < n && entries[i].me_value == NULL) i++; But because sizeof(PyDictKeyEntry) is not 2^n, entries[i].me_value, i++ may be slower than

[issue28441] Change sys.executable to include executable suffix

2016-11-02 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I have missed a case of empty progpath. I updated the patch to avoid calling add_exe_suffix() at that case. -- Added file: http://bugs.python.org/file45327/sys-executable-suffix-2.patch ___ Python tracker

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Installation -Build ___ Python tracker ___

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Eryk Sun
Eryk Sun added the comment: Supported versions of Windows Vista and later should have the CRT update [1] installed via Windows Update. (3.5.2 is bundled with the older KB2999226 update [2].) A Windows 7 system that I checked had this automatically installed last March. But maybe for some

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Ex Tracheese
Ex Tracheese added the comment: Nevermind *again*, turns out the install wasn't successful despite appearances. When I try to actually run python it complains that there's no C Runtime dll. -- ___ Python tracker

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Ex Tracheese
Ex Tracheese added the comment: Nevermind, I found the problem. Windows Update shortcut got deleted from Start Menu. Thank god there was a stack overflow question. -- ___ Python tracker

[issue28592] Installation freezes on C Runtime Install

2016-11-02 Thread Ex Tracheese
New submission from Ex Tracheese: When trying to install Python 3.5.2 on my Windows 7 computer after getting a new SSD, the installer freezes on the C Runtime portion and never progresses past it. I have attached the log file which is full of some errors that don't really mean anything to me.

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread R. David Murray
R. David Murray added the comment: There seem to be unrelated changes in your patches, and we'll want tests as well before committing. See also issue 16512 and the issues linked from it. (I haven't reviewed to see if there is any overlap.) -- ___

[issue20847] asyncio docs should call out that network logging is a no-no

2016-11-02 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : Removed file: http://bugs.python.org/file45182/issue20847.patch ___ Python tracker ___

[issue28088] Document Transport.set_protocol and get_protocol

2016-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM too. Can someone add this to the asyncio docs (starting at the 3.5 branch please)? -- ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: Working imghdr lib for python 3.X -- Added file: http://bugs.python.org/file45325/imghdr_py3.py ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: Working imghdr lib for python 2.7.X -- Added file: http://bugs.python.org/file45324/imghdr_py27.py ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: patch for python 3.X -- Added file: http://bugs.python.org/file45323/imghdr35.patch ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Changes by Raul : Removed file: http://bugs.python.org/file45322/imghdr35.py ___ Python tracker ___

[issue28228] imghdr does not support pathlib

2016-11-02 Thread Raul
Changes by Raul : Removed file: http://bugs.python.org/file45320/imghdr27.patch ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: patch for python 3.X -- Added file: http://bugs.python.org/file45322/imghdr35.py ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: patch for python 2.7 -- keywords: +patch Added file: http://bugs.python.org/file45321/imghdr27.patch ___ Python tracker ___

[issue28228] imghdr does not support pathlib

2016-11-02 Thread Raul
Raul added the comment: patch for python 2.7 -- nosy: +4simple-org Added file: http://bugs.python.org/file45320/imghdr27.patch ___ Python tracker ___

[issue28499] Logging module documentation needs a rework.

2016-11-02 Thread Pierre Bousquie
Pierre Bousquie added the comment: Thank you Vinay for your feedback. RTD seems a very good start to me. Florian thanks for joining :). I'm not leaving you alone on this! I don't mind closing the "bug" request. It was mainly for Stéphane Wirtel :)... but it's still "committing" :) 2016-11-02

[issue19948] POSIX semantics of PATH search in execvpe is not respected

2016-11-02 Thread Alex Samuel
Alex Samuel added the comment: Here's a real-world case where this can cause unexpected results: A shell script has a typo in the shebang ("#/!bin/bash") but the execute bit set. It still runs via the C library's execvp() and also via bash (which uses execve() but reimplements the behavior)

[issue28542] document cross compilation

2016-11-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: About 2.7, this is a list of the issues I am aware of, that may have to be fixed also in 2.7 (and 3.5 for some of them): issues #26884 #27434 #28444 and #22724. Issue #28589 was entered today and is a duplicate of the previous one. > FWIW, DESTDIR, --prefix,

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
Raul added the comment: Other valid jpeg image not detected. -- Added file: http://bugs.python.org/file45318/2.jpg ___ Python tracker ___

[issue28591] imghdr doesn't recognize some jpeg formats

2016-11-02 Thread Raul
New submission from Raul: Some valid JPEG images are not detected by the imghdr lib. -- components: Library (Lib) files: 1.jpg messages: 279940 nosy: 4simple-org, Claudiu.Popa, ezio.melotti, haypo, intgr, jcea, joril, kovid, mvignali, r.david.murray priority: normal severity: normal

[issue28589] get error when compile .py file during install stage if cross compile

2016-11-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: msg269617 details how this problem can also be reproduced on 3.6 by cross-building for Android before the issue 27917 that added platform triplets for Android had been fixed. Since the changes in issue 23968 have not be retrofited to 3.5, the same problem

[issue28580] Optimize iterating split table values

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I believe the patch doesn't makes iterating split table slower and likely makes it a little faster. The patch adds one additional check, but it removes other checks. Thus this still is an optimization. But the last patch has an undefined behavior.

[issue28580] Optimize iterating split table values

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: LGTM again for iterate_splittable_v2.patch. How about issue title (and commit message) to "Cleanup iterating split table"? -- ___ Python tracker

[issue28115] Use argparse for the zipfile module

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: SilentGhost suggested to pass required=True to add_mutually_exclusive_group(). This makes the last "else" not needed. Proposed patch implements this suggestion. -- assignee: -> serhiy.storchaka Added file:

[issue28580] Optimize iterating split table values

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: > Xiang Zhang added the comment: > > Yes, that's the point. I thought to expose an API in testcapimodule for test, > but actually I am not willing to do that since I don't believe this patch > could bring any visible performance change. > I agree with you. I

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: Yes, that's the point. I thought to expose an API in testcapimodule for test, but actually I am not willing to do that since I don't believe this patch could bring any visible performance change. -- ___ Python tracker

[issue28580] Optimize iterating split table values

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is not easy to benchmark PyDict_Next. dict.__repr__ does much hard work (calling repr() for keys and values, formatting strings). Using _testcapi.test_dict_iteration perhaps is the easiest way to measure the performance of pure PyDict_Next, but it

[issue21590] Systemtap and DTrace support

2016-11-02 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Fedora so far has been using the systemtap patch downstream from dmalcolm [0]. So for 3.6 by removing the systemtap patch (it cannot be applied anymore cleanly) and by enabling the --with-dtrace configure flag I get this error [1]: make: ***

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: python -> unpatched, python3 -> patched iterkeys: (split) ./python3 -m perf timeit --compare-to /home/angwer/cpython/python -s 'from argparse import Namespace; ns = Namespace(); [setattr(ns, str(i), str(i)) for i in range(1)]' 'list(iter(ns.__dict__))'

[issue28580] Optimize iterating split table values

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please check how this change affects the performance? -- ___ Python tracker ___

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'm currently working on an update to PEP-498 to address this. I hope to have it completed after a sprint this weekend. -- ___ Python tracker

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: Update the patch to use more obvious comparison way. This uses INADA's suggestion and make the code more like other places. I think the performance issue is better to be discussed in #28397. It doesn't have a significant impact on this patch. Hope we can move

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python ___ Python tracker

[issue28582] Invalid backslash syntax errors are not always accurate as to the location on the line where the error occurs

2016-11-02 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-02 Thread SilentGhost
Changes by SilentGhost : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-02 Thread 尤立宇
New submission from 尤立宇: PEP 498 says: (https://www.python.org/dev/peps/pep-0498/#escape-sequences) Scanning an f-string for expressions happens after escape sequences are decoded. Because hex(ord('{')) == 0x7b , the f-string f'\u007b4*10}' is decoded to f'{4*10}' , which evaluates as the

[issue28589] get error when compile .py file during install stage if cross compile

2016-11-02 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +doko, xdegaye ___ Python tracker ___ ___

[issue28589] get error when compile .py file during install stage if cross compile

2016-11-02 Thread DiazSoho
New submission from DiazSoho: when I try to do cross compile Python-2.7.12, it gets error when trying install. because the command is using compile host python to compile .py file with *.so files, but the *.so are built by cross platform toolchain already, then it will say "cannot open shared

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hmm, I did not mean to replace the documentation example like that. Here's another update. -- Added file: http://bugs.python.org/file45314/issue28587.patch ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Attached is the patch to update the documentation. Please review. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45313/issue28587.patch ___ Python tracker

[issue28575] Error 0x80070643 While installing in Win 10 32 Bit

2016-11-02 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28499] Logging module documentation needs a rework.

2016-11-02 Thread Florian Strzelecki
Florian Strzelecki added the comment: A project published on RTD looks like a very good idea. I'll give it a try! Thanks for your feedback. I think we don't have the same opinion on how to organize parts and details, so it's on me to show something worth our times. > you seem to find the

[issue28588] Memory leak in OpenSSL thread state

2016-11-02 Thread Christian Heimes
New submission from Christian Heimes: Quote from https://github.com/curl/curl/issues/964 --- I wrote to Matt Caswell from openssl.org about this memleah, and he answered: OpenSSL maintains a separate error queue for each thread. On each queue there can be multiple errors. ERR_get_state() does

[issue19042] Idle: add option to autosave 'Untitled' edit window

2016-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looks promising. The second half of a patch would be to fill in the missing lines. Before I review, please sign a CA. The online form at https://www.python.org/psf/contrib/contrib-form/ takes about 5 minutes. --

[issue28414] SSL match_hostname fails for internationalized domain names

2016-11-02 Thread Christian Heimes
Christian Heimes added the comment: It's a big, complicated mess. I can't implement IDN support correctly because Python lacks UTS#46 and IDNA2008 support. I just found out that IDNA 2008 is not enough because it does not provide a case mapping. Lack of case mapping broke my fix for curl

[issue28580] Optimize iterating split table values

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review -> commit review ___ Python tracker ___ ___

[issue28513] Document zipfile CLI

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Applied both Martin's suggestion. Thank you all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28513] Document zipfile CLI

2016-11-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset feb6e8678512 by Serhiy Storchaka in branch '2.7': Issue #28513: Documented command-line interface of zipfile. https://hg.python.org/cpython/rev/feb6e8678512 New changeset b51bf32defb1 by Serhiy Storchaka in branch '3.5': Issue #28513: Documented

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: Here is the new patch to apply the optimization to more places. -- Added file: http://bugs.python.org/file45312/iterate_splittable.patch ___ Python tracker

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e9c7704f373 by INADA Naoki in branch '3.6': Issue #28583: PyDict_SetDefault didn't combine split table when needed. https://hg.python.org/cpython/rev/4e9c7704f373 New changeset a6a79053aec4 by INADA Naoki in branch 'default': Issue #28583:

[issue28513] Document zipfile CLI

2016-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker ___

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: I'll commit. -- assignee: -> inada.naoki ___ Python tracker ___ ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread ChrisRands
New submission from ChrisRands: In Python 3 and 2 docs https://docs.python.org/3.5/tutorial/datastructures.html, list.index only mentions the first argument: list.index(x) Return the index in the list of the first item whose value is x. It is an error if there is no such item.

[issue28580] Optimize iterating split table values

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: > Xiang, would you update patch? Working on it. -- title: Optimize _PyDict_Next for split table -> Optimize iterating split table values ___ Python tracker

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Besides the patch is a little hard to understanding due to changes that are not directly related to the issue, it LGTM. -- ___ Python tracker

[issue28580] Optimize _PyDict_Next for split table

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: LGTM, too. > Similar changes can be applied to other iteration code. dictiter_iternextkey, > dict_keys, etc. I agree. Xiang, would you update patch? -- ___ Python tracker

[issue28580] Optimize _PyDict_Next for split table

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is too late for 3.6. -- type: behavior -> enhancement versions: -Python 3.6 ___ Python tracker ___

[issue28580] Optimize _PyDict_Next for split table

2016-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that this unlikely could cause visible effect, but this patch simplifies the code. LGTM. Similar changes can be applied to other iteration code. dictiter_iternextkey, dict_keys, etc. -- ___ Python

[issue25996] Add support of file descriptor in os.scandir()

2016-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka dependencies: +Convert os.scandir to Argument Clinic ___ Python tracker

[issue28586] Convert os.scandir to Argument Clinic

2016-11-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch converts os.scandir and DirEntry methods to Argument Clinic. -- components: Argument Clinic, Extension Modules files: clinic-scandir.patch keywords: patch messages: 279907 nosy: larry, serhiy.storchaka priority: normal severity:

[issue28585] Restore docstring of os._isdir

2016-11-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When converted to Argument Clinic in 3.5 the docstring of os._isdir() was lost. Proposed patch restores it. -- components: Argument Clinic, Extension Modules, Windows files: os-_isdir-docstring.patch keywords: patch messages: 279905 nosy: larry,

[issue28199] Compact dict resizing is doing too much work

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Xiang. Shard-key dict is very hard to maintain... -- ___ Python tracker ___

[issue17305] IDNA2008 encoding missing

2016-11-02 Thread Christian Heimes
Christian Heimes added the comment: I reported the issue for curl, CVE-2016-8625 https://curl.haxx.se/docs/adv_20161102K.html -- ___ Python tracker ___

[issue19042] Idle: add option to autosave 'Untitled' edit window

2016-11-02 Thread perilbrain
perilbrain added the comment: "To run without saving" was the first idea I got, but it was difficult to pursue in first phase. After your hints I think I have achieved what you have described. I have done a few fixes(luckily in a single file ScriptBinding.py) which are giving satisfactory

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +ned.deily priority: normal -> release blocker stage: -> commit review ___ Python tracker ___

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread INADA Naoki
INADA Naoki added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28575] Error 0x80070643 While installing in Win 10 32 Bit

2016-11-02 Thread Nixon
Nixon added the comment: Hi Steve, Thanks for the fast reply. Issue has been solved. That yesterday I was trying to install but couldn't tried different troubleshoots like restarting,clearing temp files, changing permission etc. But same error so I raised a issue. Now

[issue28583] PyDict_SetDefault doesn't combine split table when needed

2016-11-02 Thread Xiang Zhang
Xiang Zhang added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file45308/PyDict_SetDefault.patch ___ Python tracker