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

2015-08-02 Thread Ashley Anderson
Ashley Anderson added the comment: Thanks for the review and the good suggestions. Hopefully this new patch is an improvement. I didn't know about the context manager for assertRaises - I was just following the format for another ValueError test a few lines above. The frozenset and

[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem with astral chars and open/save dialogs is the subject of #21084. The problem with printing astral chars generated by programs is #22742 and maybe #21084. I added a fix for the very new display of filenames on the run separator bar, which is the

[issue24750] IDLE: Cosmetic improvements for main window

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, ttk detection doesn't work this way. ImportError is not raised on import, and TclError is raised instead on widget creation. Here is a patch for 3.4 that is compatible with 8.4 (tested). @scroll.diff LGTM for 3.5+. -- Added file:

[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

2015-08-02 Thread sanad
sanad added the comment: On the lines of changes proposed by Terry and others in the comments, this is the patch I'm submitting. The function _filename_to_unicode() plays the major part in the plot. The function can get two types of filename ,'str' and 'bytes'. When its str, all the astral

[issue23672] IDLE can crash if file name contains non-BMP Unicode characters

2015-08-02 Thread sanad
sanad added the comment: Correction: This patch fixes the problem of idle not opening when recent file list has filenames outside BMP and the crashing of idle on using filenames with astral characters. The added benefit is that you can create a file with such chars and save it and access it

[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-02 Thread Bernd Dietzel
New submission from Bernd Dietzel: if the filename contains Shell Commands they will be executed if they are passed to os.system() as discribed in the docs. Filename should be quoted with quote(filename) to fix the bug. https://docs.python.org/2/library/mailcap.html mailcap.findmatch(/caps/,

[issue24759] Idle: add ttk widgets as an option

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note also that committed patch doesn't work at all. from tkinter import ttk doesn't raise an exception with Tcl/Tk 8.4. See my patch in issue24750 that does working check. I consider impractical complex code for supporting 8.4 and ttk too. But in simplest

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: I'm having trouble compiling the latest default (@859a45ca1e86). Getting linker errors. I've updated the patch with Yury's tests in it. Would someone mind running them? Apparently they do pass on 3.5b3 at least. --

[issue23973] PEP 484 implementation

2015-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: I'm bumping this up since the CPython repo is several changes behind the typehinting repo (https://github.com/ambv/typehinting/tree/master/prototyping). Those should not miss RC1. -- priority: normal - release blocker

[issue24272] PEP 484 docs

2015-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: This should probably be committed before RC1 -- it's better than nothing! -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24272

[issue22227] Simplify tarfile iterator

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martin's comments. Thanks Martin. -- versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file40101/tarfile_tariter_2.diff ___ Python tracker rep...@bugs.python.org

[issue20557] Use specific asserts in io tests

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually Raymond objected. But under pressure of positive feedbacks and to avoid non-polite discussion I'll commit the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20557

[issue22227] Simplify tarfile iterator

2015-08-02 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7 ___

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: Yury, your tests complete even without any patches on cpython default (@74fc1af57c72). How is that possible? I verified that they are run. -- ___ Python tracker rep...@bugs.python.org

[issue24774] inconsistency in http.server.test

2015-08-02 Thread Chiu-Hsiang Hsu
Chiu-Hsiang Hsu added the comment: I'm not quite sure we should put argument parsing back into the test() function or just fix docstring. It already expose port and bind through function arguments. It looks wierd to me to have function arguments CLI arguments modifying the same variable in

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: Ah hehe, I forgot to actually attach the patch. Thanks Yury. The asyncio docs need to explicitly mention that concurrent.futures.Futures can be directly awaited from coroutines. Aside from that, I think we're set -- just need Guido to chime in on this.

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

2015-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: It would be nice to have this applied to 3.5 even. I'm aware that this is a new feature that shouldn't go in any more at this point, but if it could get added in 3.5.1 at least, I think it would fill a rather clear and annoying gap when it comes to tool

[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-02 Thread Bernd Dietzel
Bernd Dietzel added the comment: Maybe it would be a good idea to do so as run-mailcap does : theregrunner@mint17 : ~ € run-mailcap --debug ';xterm;#'.txt - parsing parameter ';xterm;#'.txt - Reading mime.types file /etc/mime.types... - extension txt maps to mime-type text/plain - Reading

[issue20557] Use specific asserts in io tests

2015-08-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20557

[issue20556] Use specific asserts in threading tests

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I missed to remove one old assertion. Thanks Mark. -- versions: +Python 3.5, Python 3.6 -Python 3.3 Added file: http://bugs.python.org/file40102/test_threading_asserts_2.patch ___ Python tracker

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

2015-08-02 Thread Yury Selivanov
Yury Selivanov added the comment: Alex, the updated patch is attached. Guido, do you like the new approach? Can I commit this in 3.6? -- Added file: http://bugs.python.org/file40103/concurrent.patch ___ Python tracker rep...@bugs.python.org

[issue24759] Idle: add ttk widgets as an option

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: If 2.7 and 3.4 are left out of consideration, then, AFAIK, the only people necessarily affected are those with a PowerPC with OS 10.5 who upgrade to python3.5 and also want to run Idle. People with an Intel machine instead might be if there is no python3.5

[issue20557] Use specific asserts in io tests

2015-08-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset ace74c445a3f by Serhiy Storchaka in branch '3.4': Issue #20557: Use specific asserts in io tests. https://hg.python.org/cpython/rev/ace74c445a3f New changeset 2453ac990e5b by Serhiy Storchaka in branch '3.5': Issue #20557: Use specific asserts in

[issue24272] PEP 484 docs

2015-08-02 Thread Daniel Andrade Groppe
Daniel Andrade Groppe added the comment: I dropped the ball here. The last message from the review system was misclassified by Gmail as spam... Sorry about that. I can take a look at this tonight but if anyone can address the comments earlier, go for it. --

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: Nevermind, I was running the wrong Python version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24383 ___ ___

[issue24272] PEP 484 docs

2015-08-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Is anyone working on this right now? If not, I could implement the comments by Guido to the latest patch by Daniel. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24272

[issue24217] O_RDWR undefined in mmapmodule.c

2015-08-02 Thread Jeffrey Armstrong
Jeffrey Armstrong added the comment: There is a patch attached to this report for greater than 2 months. Should I mark this as won't fix? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24217

[issue24780] unittest assertEqual difference output foiled by newlines

2015-08-02 Thread Chris Jerdonek
New submission from Chris Jerdonek: When newlines are present, the error message displayed by unittest's self.assertEqual() to show where strings differ can be nonsensical. For example, the caret symbol can show up in a strange location. The first example below shows a case where things work

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: You're right Stefan -- I too was appalled that this was not possible in 3.5 to begin with. It feels completely natural to be able to await for concurrent Futures. But as this is considered a feature, it'll probably have to wait until 3.6. Otherwise you'll end

[issue24779] Python/ast.c: decode_unicode is never called with rawmode=True

2015-08-02 Thread Eric V. Smith
New submission from Eric V. Smith: The only call to decode_unicode is this: if (!*bytesmode !rawmode) { return decode_unicode(c, s, len, rawmode, c-c_encoding); } So rawmode will always be 0. Removing this will delete a call to PyUnicode_DecodeRawUnicodeEscape in decode_unicode.

[issue24779] Python/ast.c: decode_unicode is never called with rawmode=True

2015-08-02 Thread Eric V. Smith
Eric V. Smith added the comment: That's poor wording on my part: the call to PyUnicode_DecodeRawUnicodeEscape isn't actually execute if rawmode is false. So it's really just a dead branch that's being deleted. -- ___ Python tracker

[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2015-08-02 Thread Ilia Kurenkov
Ilia Kurenkov added the comment: I notice folks have been subscribing to this. Any chance we could review it and merge? :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20362 ___

[issue24779] Python/ast.c: decode_unicode is never called with rawmode=True

2015-08-02 Thread Brett Cannon
Brett Cannon added the comment: Then I say delete it. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24779 ___ ___

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

2015-08-02 Thread Yury Selivanov
Yury Selivanov added the comment: We may be able to do this for 3.5.1 (since PEP 492 was accepted provisionally, see https://mail.python.org/pipermail/python-dev/2015-May/139844.html) although it's still a pretty big new feature. I agree. I'm -1 on pushing this to 3.5.0 or to 3.5.1.

[issue24776] Improve Fonts/Tabs UX for IDLE

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: What do you think of the layout in cfg_font_layout.png? (before/after) -- Added file: http://bugs.python.org/file40105/cfg_font_layout.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24776

[issue24777] sys.getrefcount takes no arguments

2015-08-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. Some functions like getrefcount in sys module are specific to CPython. Other Python implementations like IronPython(it doesn't use reference counting for example) may not implement or partially implement those functions.

[issue23218] Modernize the IDLE Find/Replace/Find in Files dialogs

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: For illustration, attached idle_find_ttk.png, which is a minor layout tweak of the existing one (works on all the various find dialogs, though not shown in screen shot). I agree with Al's other suggestions here. -- nosy: +markroseman Added file:

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-08-02 Thread Mark Roseman
New submission from Mark Roseman: I'm wondering about moving the functionality of the 'configure extensions' dialog into the main configuration dialog. As I don't know the history here, I'm wondering why it was made separate. My proposal would be to add an 'Extensions' tab in the main config

[issue22227] Simplify tarfile iterator

2015-08-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks good and passes tests. Go ahead and apply. -- assignee: lars.gustaebel - serhiy.storchaka nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I find the new arrangement more confusing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24781 ___ ___

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would make theme element chooser a list box and move the sample to the right. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24781

[issue23218] Modernize the IDLE Find/Replace/Find in Files dialogs

2015-08-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: These changes all seem reasonable and have a nice look. I have misgivings about shortening regular expression to regex. Otherwise, +1 for everything else. -- nosy: +rhettinger ___ Python tracker

[issue6631] Disallow relative files paths in urllib*.open()

2015-08-02 Thread Robert Collins
Robert Collins added the comment: test_relativelocalfile is still in place in the urllib tests, so its affecting urlopen to this point. So I think the bug is fixed at least to the extent of the original report. I'm going to close this. -- nosy: +rbcollins stage: commit review -

[issue22397] test_socket failure on AIX

2015-08-02 Thread Robert Collins
Robert Collins added the comment: I've updated the ref in the patch to this bug per Victor's comments, and applied. I'm not sure of protocol here. Do we close this ticket, or keep it open to analyze the actual cause? -- nosy: +rbcollins ___ Python

[issue24217] O_RDWR undefined in mmapmodule.c

2015-08-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1838f37a8d9e by Benjamin Peterson in branch '3.4': include fcntl.h on all *nix platforms (closes #24217) https://hg.python.org/cpython/rev/1838f37a8d9e New changeset 25ba5e7af08a by Benjamin Peterson in branch '3.5': Merge 3.4 (#24217)

[issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris

2015-08-02 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: -- nosy: +baikie ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16263 ___ ___

[issue24759] Idle: add ttk widgets as an option

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I realize now that tkinter.ttk is (normally) present and will define Python classes even if the tk widgets needed for them to work are not present. More comments on the added module on #24750 -- ___ Python tracker

[issue22397] test_socket failure on AIX

2015-08-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset e48826904e63 by Robert Collins in branch '3.4': Issue #22397: Skip failing tests on AIX https://hg.python.org/cpython/rev/e48826904e63 New changeset a12d29f87e4c by Robert Collins in branch '3.5': Issue #22397: Skip failing tests on AIX

[issue22397] test_socket not running all tests on AIX

2015-08-02 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: commit review - needs patch title: test_socket failure on AIX - test_socket not running all tests on AIX ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22397

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: One of the other options I was playing with previously was a listbox for choosing the theme (what I'd suspect is the main user activity here). -- Added file: http://bugs.python.org/file40110/cfg_highlight_alt.png ___

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: In general, Idle-sig is a better place to ask question ;-). I applied the extension dialog patch just a year ago (#3068), It still needs improvements (#22704, #22705, #22706, #22707 #22726). Before that, people had to hand-edit either the idlelib or user

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

2015-08-02 Thread Alex Grönholm
Alex Grönholm added the comment: Updated patch per review comments. I also corrected the order of the lines in the new block. If _must_cancel is True, it would have tried to call cancel() on _fut_waiter before it was set. Now the code matches that of the original block. The docs don't seem

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2015-08-02 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: -- nosy: +baikie ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20174 ___ ___

[issue24760] IDLE settings dialog shouldn't be modal

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: Incidentally (and this I would say is a definite bug) because the modal doesn't fully work on the Mac, you can actually create multiple copies of the config dialog! -- ___ Python tracker rep...@bugs.python.org

[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-08-02 Thread Robert Collins
Robert Collins added the comment: Looks committed a way back to me. -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23524

[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2015-08-02 Thread Robert Collins
Robert Collins added the comment: See also issue 6631 -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22852 ___ ___

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

2015-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: I find it questionable to mix await and threads, as I have said several times in the discussion about Nick Coghlan's proposal to introduce helper functions with a similar function. There are a couple of use cases in the context of asyncio, but definitely also

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11 DP with Cannot allocate memory

2015-08-02 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: -- nosy: +baikie ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24725 ___ ___

[issue24272] PEP 484 docs

2015-08-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New version of the patch by Daniel, latest comments by Guido are taken into account. -- Added file: http://bugs.python.org/file40108/typing_doc_v3.patch ___ Python tracker rep...@bugs.python.org

[issue24750] IDLE: Cosmetic improvements for main window

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Minor nit: you import 'ttkcompat' and add 'compat'. On to the new 'compat': the only doc for .setup_master is the docstring If master is not None, itself is returned. If master is None, the default master is returned if there is one, otherwise a new

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Mark Roseman
New submission from Mark Roseman: Placeholder for improvements to the syntax highlighting tab in IDLE config dialog. I've attached cfg_highlight.png which shows a before and after I'm suggesting as a starting point. It would have the same functionality but uses a lot less pieces to implement

[issue24750] IDLE: Cosmetic improvements for main window

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: While I think this approach would largely be a bad idea for an IDLE-sized application, where I think it definitely would be useful is in something very restricted like the tkSimpleDialog code. To improve the various little 'askstring', 'askinteger' etc.

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Mark Roseman
Mark Roseman added the comment: cfg_highlight_alt.png shows with the listbox for choosing a theme Also added highlight3.png... same kind of thing, but by renaming the tab as 'Themes' you no longer even need the row of labels at the top. And it parallels the fonts/tabs design suggestion

[issue24750] IDLE: Cosmetic improvements for main window

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Keep in mind that most option substitution would be at the file rather than widget level. The scrollbar switching would be for something like editor windows, which are basically generic. For the option dialog, we would copy ConfigDialog.py to, say,

[issue24783] Import Error (undefined symbol: PyFloat_Type) when Importing math Module on Shared Build

2015-08-02 Thread David E. Narvaez
New submission from David E. Narvaez: The original bug report can be found at https://bugs.kde.org/show_bug.cgi?id=335965. I was not able to reproduce this on Gentoo until the Fedora maintainer commented they build their Python with --enable-shared. At that point, I built two copies of Python

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: After I added a custom Terry theme, my main activity has been tweaking it. Version 3 is an clear improvement over the existing tab. With the example box on top, I think the comment should be # Click here or dropbox # below to change item. 0 Foregound 0

[issue6500] urllib2 maximum recursion depth exceeded

2015-08-02 Thread Berker Peksag
Berker Peksag added the comment: Here is a patch for 2.7. I don't think backporting 9eceb618274a to 2.7 is worth the effort for this, so I just fixed the __getattr__ method and added a test. -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review Added file: