[issue22410] Locale dependent regexps on different locales

2017-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened issue30215 for more comprehensive solution. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue30215] Make re.compile() locale agnostic

2017-04-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1471 ___ Python tracker ___ ___

[issue30215] Make re.compile() locale agnostic

2017-04-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently the result of re.compile() with the re.LOCALE flag depends on the locale at compile time. The locale at matching time should be the same as the locale at compile time, otherwise the matching can work incorrectly. This complicates caching in

[issue30214] make_zip.py lacks command a few line options and has a bug.

2017-04-29 Thread Decorater
New submission from Decorater: make_zip.py does not offer the options to include tests with the tkinner stuff when making the full distributions immediately after building python using MSVC. Basically running makezip like this: ".\PCbuild\amd64\python.exe" ".\Tools\msi\make_zip.py" -a x64 -o

[issue30213] ZipFile from 'a'ppend-mode file generates invalid zip

2017-04-29 Thread BoppreH
New submission from BoppreH: I may be misunderstanding file modes or the `zipfile` library, but from zipfile import ZipFile ZipFile(open('a.zip', 'ab'), 'a').writestr('f.txt', 'z') unexpectedly creates an invalid zip file. 7zip is able to open and show the file list, but files inside

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I mean 'IDLE' in the Components: box, to the left of the Versions: box, both in the 'classification' frame near the top of this page. -- components: +IDLE ___ Python tracker

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Cheryl Sabella added the comment: For this "Please check IDLE component also for IDLE doc issues.", I see the same text as the doc page in idlelib/help/html. Is that the one you want me to change or is that created automatically by Sphinx? -- ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From what I have seen, one PR for each branch is correct. I believe >cherry-pick.py was initially written by Mariatta. Please bring up any >problems or questions using it on core-mentorship, where she and others will >see it. -- resolution: ->

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 4734c2d5c0529632e4b51eb75104b50955afd692 by terryjreedy (csabella) in branch '2.7': [2.7] bpo-30208: DOC: fix small typos in IDLE (#1358) https://github.com/python/cpython/commit/4734c2d5c0529632e4b51eb75104b50955afd692 --

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 52630ae17aa5bd8bffdb430b6515d07ffbaabc9e by terryjreedy (csabella) in branch '3.5': [3.5] bpo-30208: DOC: fix small typos in IDLE (#1357) https://github.com/python/cpython/commit/52630ae17aa5bd8bffdb430b6515d07ffbaabc9e --

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5a8dcec93936de816cef5c17522e48fca9c30b43 by terryjreedy (csabella) in branch '3.6': [3.6] bpo-30208: DOC: fix small typos in IDLE (#1356) https://github.com/python/cpython/commit/5a8dcec93936de816cef5c17522e48fca9c30b43 --

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Cheryl Sabella added the comment: I followed the steps for cherry-pick, but messed up a little as I made 3 PRs instead of one. However, I couldn't do the labels asked for in this section: When a cherry-pick was applied successfully, this script will open up a browser tab that points to the

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1470 ___ Python tracker ___ ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1469 ___ Python tracker ___ ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1468 ___ Python tracker ___ ___

[issue30212] test_ssl.py is broken in Centos7

2017-04-29 Thread david-cpi
New submission from david-cpi: To make the test pass, I added the following try statement: try: sock.sendall(buf) except: pass -- components: Tests files: test.log messages: 292608 nosy: david-cpi priority: normal severity: normal

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: #30209 has a file that cannot be opened and another description of symptoms. -- ___ Python tracker ___

[issue30209] some UTF8 symbols

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Duplicate, or close enough, of #30019, which has more on issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE freezes when opening a file with astral characters ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- type: enhancement -> behavior ___ Python tracker ___ ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the review. These are definitely bugs. Please check IDLE component also for IDLE doc issues. That will auto-assign them to me. Your first merged PR? If so, congrats. Changes should be applied to at least 3.6, if not 3.5 and 2.7. 3.6 doc

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 9dc2b3809f38be2e403ee264958106badfda142d by terryjreedy (csabella) in branch 'master': bpo-30208: DOC: fix small typos in IDLE (#1354) https://github.com/python/cpython/commit/9dc2b3809f38be2e403ee264958106badfda142d -- nosy:

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread STINNER Victor
STINNER Victor added the comment: Right, my API change was unintentional. -- ___ Python tracker ___ ___

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-29 Thread STINNER Victor
STINNER Victor added the comment: I also like the plan starting with refactoring ;-) -- ___ Python tracker ___

[issue19417] Bdb: add a unittest file (test.test_bdb)

2017-04-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Bdb: add docstrings title: Bdb: add docstrings and a unittest file (test.test_bdb) -> Bdb: add a unittest file (test.test_bdb) ___ Python tracker

[issue968063] Add fileinput.islastline()

2017-04-29 Thread John Tapsell
John Tapsell added the comment: > If you need islastline() you can use a wrapper: This doesn't work because fileinput.filename() and fileinput.filelineno() are going to be wrong and pointing to the next file. -- nosy: +John Tapsell ___ Python

[issue30209] some UTF8 symbols

2017-04-29 Thread Matthew Barnett
Matthew Barnett added the comment: IDLE uses tkinter, which wraps tcl/tk. Versions up to tcl/tk 8.6 can't handle 'astral' codepoints. See also: Issue #30019: IDLE freezes when opening a file with astral characters Issue #21084: IDLE can't deal with characters above the range (U+-U+)

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-29 Thread Cheryl Sabella
Cheryl Sabella added the comment: Moved to issue 30211 for docstrings. -- ___ Python tracker ___ ___

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-29 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: -1462 ___ Python tracker ___ ___

[issue30211] Bdb: add docstrings

2017-04-29 Thread Cheryl Sabella
New submission from Cheryl Sabella: Add docstrings to Bdb. See issue 19417. -- assignee: docs@python components: Documentation messages: 292598 nosy: csabella, docs@python, terry.reedy priority: normal pull_requests: 1467 severity: normal status: open title: Bdb: add docstrings type:

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: While I have previously done docstrings and tests together, I can see that for this issue, separation might be preferable. Cherl, can you open a new issue and re-title the PR? (I don't know if that will be sufficient to 'move' it, but I hope so.)

[issue30210] No Documentation on tkinter dnd module

2017-04-29 Thread Anthony Flury
New submission from Anthony Flury: There is a level of drag and drop support within the tkinter package - namely the tkinter.dnd module. However there is no documentation at this time about drag and drop either on docs.python.org or on the tkinter reference manual. The only documentation

[issue30209] some UTF8 symbols

2017-04-29 Thread Priit Oorn
Changes by Priit Oorn : Added file: http://bugs.python.org/file46843/goth - crasher.py ___ Python tracker ___

[issue30209] some UTF8 symbols

2017-04-29 Thread Priit Oorn
Changes by Priit Oorn : Removed file: http://bugs.python.org/file46842/goth - crasher.py ___ Python tracker ___

[issue30209] some UTF8 symbols

2017-04-29 Thread Priit Oorn
Changes by Priit Oorn : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue30209] some UTF8 symbols

2017-04-29 Thread Priit Oorn
Changes by Priit Oorn : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___

[issue30209] some UTF8 symbols

2017-04-29 Thread Priit Oorn
New submission from Priit Oorn: It seems that idle has problems with some UTF8 / Unicode characters and loading files that have them inside them. I tried to do code to replace text with other symbols from unicode table. First in idle and pasting the symbol "프" into the idle it caused both the

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2017-04-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list

[issue30195] writing non-ascii characters in xml file using python code embedded in C

2017-04-29 Thread mahboubi
mahboubi added the comment: I have just tried to do this task using xml.etree.ElementTree and still have the same problem. In the file 'write_to_xml1.py' I'm trying to develop some function that creates an xml file and then add data containing non ascii characters.The python program works

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1466 ___ Python tracker ___ ___

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Cheryl Sabella
New submission from Cheryl Sabella: Fix some small typos in IDLE doc. -- assignee: docs@python components: Documentation messages: 292593 nosy: csabella, docs@python priority: normal severity: normal status: open title: Small typos in IDLE doc type: enhancement

[issue30128] xid_start definition for Unicode identifiers refers to xid_continue

2017-04-29 Thread Xiang Zhang
Xiang Zhang added the comment: Quoting from PEP3131: XID_Start then closes this set under normalization, by removing all characters whose NFKC normalization is not of the form ID_Start ID_Continue* anymore. -- nosy: +loewis, xiang.zhang ___ Python

[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2017-04-29 Thread Martin Panter
Martin Panter added the comment: I suggest to close this as a duplicate. The pull request itself looks like the right direction to me, but let’s not split the discussion up more than necessary. -- nosy: +martin.panter resolution: -> duplicate superseder: -> urllib FTP protocol

[issue30207] Rename test.test_support to test.support in 2.7

2017-04-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1465 ___ Python tracker ___ ___

[issue30207] Rename test.test_support to test.support in 2.7

2017-04-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch converts test.test_support into package and rename it to test.support, move test.script_helper into the test.support package. Old names test.test_support and test.script_helper are left as aliases to test.support and

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1464 ___ Python tracker ___ ___

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because this change looks unintentional (no one of reviewers even noticed it) and was not documented, I think it is better to make the data parameter positional-only in 3.7. The chance of breaking a user code is very low, and even if this breaks some code,

[issue30204] socket.setblocking(0) changes socket.type

2017-04-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Woo! I completely forgot I already bumped into this and that I even filed a ticket for it. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue30204] socket.setblocking(0) changes socket.type

2017-04-29 Thread Martin Panter
Martin Panter added the comment: Is this a duplicate of Issue 21327? There is some discussion there and a patch to add get_socket_type that excludes SOCK_NONBLOCK. -- nosy: +martin.panter superseder: -> socket.type value changes after using settimeout()

[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-04-29 Thread Charles-François Natali
Charles-François Natali added the comment: The rationale for rejecting wouldn't be "DRY does not apply in this case", it would be that this makes the code more complicated, and that a negligible speedup would not be worth it. Now, thanks to your benchmark, a 10% speedup is not negligible, so

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread Xiang Zhang
New submission from Xiang Zhang: Before functions in binascii having *data* parameter all accept it as positionaly-only. But after #25357, binascii.b2a_base64 changed it to accept keyword argument also but it looks unintentional. -- components: Library (Lib) messages: 292585 nosy:

[issue29606] urllib FTP protocol stream injection

2017-04-29 Thread Dong-hee Na
Dong-hee Na added the comment: And if we update FTPHandler will be only affected on Python3. The other patch would be needed for python2. -- ___ Python tracker

[issue29606] urllib FTP protocol stream injection

2017-04-29 Thread Dong-hee Na
Dong-hee Na added the comment: Okay, this part is going to require discussion between core-devs. The ftplib committer says we need to modify urllib, and you seem to think that ftplib's fix is ​correct. The conclusion is needed. Discuss about ftplib is here

[issue29606] urllib FTP protocol stream injection

2017-04-29 Thread Martin Panter
Martin Panter added the comment: I think changing FTPHandler may be more appropriate than urlsplit. But I thought your other pull request in “ftplib” might be enough. Or are you trying to make it more user-friendly? Also, FTPHandler is not used by

[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-04-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The change was introduced here: https://github.com/python/cpython/commit/b10c71daa2099c450101e5854fd693a405bec49c -- nosy: +neologix versions: +Python 2.7 ___ Python tracker

[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-04-29 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': >>> import socket >>> s = socket.socket(socket.AF_UNIX) >>> s.getsockname() b'' >>> s.bind('foo') >>> s.getsockname() 'foo' -- messages: 292580 nosy: giampaolo.rodola priority: normal severity: normal status: open title: socket.getsockname() type

[issue30103] uu package uses old encoding

2017-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm +0 for something containing "space" in the option name since the purpose of changing the UU encoding is avoiding stripping spaces. But this is not strong preference. Actually there is no need to add a new option in b2a_uu(), since we can just use

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: > The file is nearly devoid of docstrings, so I would like to add those first, > probably in a separate patch. Please move this new request for enhancement to a separate issue. -- ___ Python tracker

[issue30203] AttributeError in Popen.communicate()

2017-04-29 Thread Luke Campagnola
Luke Campagnola added the comment: Update: this appears to be the prior exception that causes _communication_started and _fileobj2ouput to be out of sync: File "/usr/lib/python3.5/subprocess.py", line 1072, in communicate stdout, stderr = self._communicate(input, endtime, timeout)

[issue30204] socket.setblocking(0) changes socket.type

2017-04-29 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': This caused me a lot of headaches (broken test) before figuring out what the heck was wrong: =) >>> import socket >>> s = socket.socket() >>> s.type >>> s.setblocking(0) >>> s.type 2049 >>> s.setblocking(1) >>> s.type getsockopt() on the other hand

[issue30203] AttributeError in Popen.communicate()

2017-04-29 Thread Luke Campagnola
New submission from Luke Campagnola: In my application, calling communicate() on a Popen instance is giving the following exception: . . . File "/usr/lib/python3.5/subprocess.py", line 1072, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46840/py3.6.1.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46839/py3.5.3.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46838/py2.7.13.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Removed file: http://bugs.python.org/file46835/py3.5.3.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Removed file: http://bugs.python.org/file46837/py2.7.13.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Removed file: http://bugs.python.org/file46836/py3.6.1.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Frank Pae added the comment: Thanks for the answers Can you please explain why python 3.6 requires another treatment? In 2.7 und 3.5 I do not need that Thank you -- ___ Python tracker

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Louie Lu
Louie Lu added the comment: This behavior is as same as on my Linux Python 2.7.13: (, (2,)) # Select Font (, (3,)) # Select Style (, ()) # Deselect Font And also, you don't need a try expect to handle this situation. You can see that when de-select the listbox, curselection() will return

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Louie Lu
Louie Lu added the comment: I think this is only a normal behavior now. Generate two events make sense, they are generate by different widget: .!editor.!font_dialog.!frame.!frame.!listbox (0,) # Select Font .!editor.!font_dialog.!frame2.!frame.!listbox (0,) # Select Style

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Frank Pae added the comment: it works in py 2.7 and 3.5 normal there must be a change in 3.6, intended or unintentional this is my Workaround: def get_size(event): # self.size.set(listbox_size.get(listbox_size.curselection())) # TEST > ok=True try: lb_siz_cur =

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Louie Lu
Louie Lu added the comment: But I'm not sure if this is a behavior error or something else, I'm still trying to find the root cause. -- ___ Python tracker

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Louie Lu
Louie Lu added the comment: The problem cause by listbox.curselection(). When crossing from a listbox to another listbox, it will trigger twice event. The first time get a valid select tuple from curselection() (which will return (index, label)), and the second time will generate empty tuple.

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Frank Pae added the comment: i have added my picture for 2.7.13 i mean there is no problem -- Added file: http://bugs.python.org/file46837/py2.7.13.gif ___ Python tracker

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Louie Lu
Louie Lu added the comment: I can reproduce the problem at 2.7.13 on Linux. Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1542, in __call__ return self.func(*args) File "tests.py", line 174, in get_style

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Frank Pae added the comment: thank you for your answer sorry for the "Long" code, but sometime is an longer example better than many words (and the most code is for layout, please fold with PyCharm) i use "original" Python with tcl/tk as it is in the installer in my gif-pictures you can see

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46836/py3.6.1.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46835/py3.5.3.gif ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Added file: http://bugs.python.org/file46834/tk_ListboxSelect.py ___ Python tracker ___

[issue30200] tkinter ListboxSelect

2017-04-29 Thread Frank Pae
Changes by Frank Pae : Removed file: http://bugs.python.org/file46833/tk_ListboxSelect.py ___ Python tracker ___