[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Dolda2000
Dolda2000 added the comment: Python 3.3.3 (default, Dec 8 2013, 14:51:59) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import io >>> io.TextIOWrapper(open("/dev/tty", "rb+")) Traceback (most recent call last): File "", line 1, in io.Unsuppor

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It's nice that that's at least possible, but I, for one, would still consider > it a bug that it isn't possible to open it in text mode. >>> io.TextIOWrapper(open("/dev/tty", "r+b", buffering=0)) <_io.TextIOWrapper name='/dev/tty' encoding='UTF-8'> > Just

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Dolda2000
Dolda2000 added the comment: Just to demonstrate failure of getpass, by the way: $ cat >/tmp/pwtest.py import getpass print(getpass.getpass()) $ python3 /tmp/pwtest.py print(getpass.getpass()) File "/usr/lib/python3.3/getpass.py", line 83, in unix_getpass passwd = fallback_getpass(pro

[issue20076] Add UTF-8 locale aliases

2013-12-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Dolda2000
Dolda2000 added the comment: >I don't think getpass will fail, since it uses os.open, not open. It also uses fdopen() on the resulting file descriptor, however, which has the same problem. >Use unbuffered binary file. It's nice that that's at least possible, but I, for one, would still consid

[issue19683] test_minidom has many empty tests

2013-12-26 Thread Julian Gindi
Julian Gindi added the comment: Modernizing these tests will be a decent undertaking but seems important. I'll go a head and try to fix these up further. Thanks for the guidance and motivation on this one :) -- ___ Python tracker

[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2013-12-26 Thread Nandiya
New submission from Nandiya: I am using the zipfile module on a webserver which provides a service which processes files in zips uploaded by users, while hardening against zip bombs, I tried binary editing a zip to put in false file size information. The result is interesting, when with a ZIP_

[issue20077] Format of TypeError differs between comparison and arithmetic operators

2013-12-26 Thread Mitchell Model
New submission from Mitchell Model: [ctypes correct component for this?] The TypeError messages given for incompatible types in comparison operators differ from incompatible types in arithmetic operators. The arithmetic operator error messages show the names of the types in single quotes, whil

[issue20054] IDLE won't work (Mac)

2013-12-26 Thread Sophie Chancheong
Sophie Chancheong added the comment: Sorry for not replying, I followed the solution on the other thread and got it to work! Thank you so much for your help!! -- ___ Python tracker ___

[issue20075] help(open) eats first line

2013-12-26 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Hi guys, probably this patch can fix it? -- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file33276/20075.patch ___ Python tracker ___

[issue20076] Add UTF-8 locale aliases

2013-12-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The makelocalealias.py ignores UTF-8 mapping. Expected that this encoding is available for all locales. After enabling UTF-8 mapping in makelocalealias.py most aliases are optimized out except following: +'be_bg.utf8': 'bg_BG.

[issue20046] Optimize locale aliases table

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Marc-Andre for your reviews. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue20046] Optimize locale aliases table

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63bc68d7f449 by Serhiy Storchaka in branch 'default': Issue #20046: Locale alias table no longer contains entities which can be http://hg.python.org/cpython/rev/63bc68d7f449 -- nosy: +python-dev ___ Pytho

[issue20046] Optimize locale aliases table

2013-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.12.2013 23:19, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> I probably wasn't clear: I meant some tests that show that the >> alias definitions (on the left) from the X11 file are actually mapped to the >> correct alias locales

[issue20075] help(open) eats first line

2013-12-26 Thread Meador Inge
Meador Inge added the comment: Looks like the changes from 78ec18f5cb45 attempt to skip the signature, but can't handle multi-line signatures. -- nosy: +meador.inge ___ Python tracker __

[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed. However in Modules/_io/_iomodule.c: PyDoc_STRVAR(open_doc, "open(file, mode='r', buffering=-1, encoding=None,\n" " errors=None, newline=None, closefd=True, opener=None) -> file object\n" "\n" "Open file and return a stream. Raise IOError upon fail

[issue20046] Optimize locale aliases table

2013-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.12.2013 22:43, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> Could you add a test for the optimization function ? > > I have no ideas. The optimization function is a part of the > makelocalealias.py > which ran manually very

[issue20075] help(open) eats first line

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Interestingly, it doesn't look like pydoc's fault: P:\ath\to\cpython\>PCbuild\python_d.exe -ISc "import sys;print(sys.version);print(open.__doc__[:75]);print('pydoc' in sys.modules)" 3.4.0b1 (default:94a04b8b3a12, Dec 26 2013, 09:27:14) [MSC v.1600 32 bit (Intel

[issue20046] Optimize locale aliases table

2013-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.12.2013 21:19, Serhiy Storchaka wrote: > > Here is updated patch. It doesn't include any additions to locale alias table > (including devanagari). Added several tests cases (many other test cases for > removed aliases already exist). optimize() is ca

[issue20073] IDLE crashes on Unicode characters

2013-12-26 Thread Ned Deily
Ned Deily added the comment: Please follow the instructions at http://www.python.org/getit/mac/tcltk/ and install an up-to-date third-party version of Tcl/Tk 8.5 such as ActiveTcl 8.5.15.0. This crash has been fixed in the newer versions of Cocoa Tk but still present in the Apple-supplied Tk

[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The output of help(open) (and `pydoc open`) in 3.4 is: Help on built-in function open in module io: open(...) errors=None, newline=None, closefd=True, opener=None) -> file object Open file and return a stream. Raise IOError upon failure. ...

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use unbuffered binary file. >>> open("/dev/tty", "r+b", buffering=0) <_io.FileIO name='/dev/tty' mode='rb+'> -- nosy: +serhiy.storchaka ___ Python tracker __

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread R. David Murray
R. David Murray added the comment: I don't think getpass will fail, since it uses os.open, not open. Presumably you can work around the problem by opening the stream twice: once for reading and once for writing. I'll leave it to Antoine to say whether or not that is in fact the expected solut

[issue20073] IDLE crashes on Unicode characters

2013-12-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> ronaldoussoren components: +Macintosh nosy: +hynek, kbk, ned.deily, roger.serwy, ronaldoussoren, terry.reedy ___ Python tracker ___

[issue20046] Optimize locale aliases table

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch. It doesn't include any additions to locale alias table (including devanagari). Added several tests cases (many other test cases for removed aliases already exist). optimize() is called only once, looks as second run has no effect until

[issue16351] Add a function to get GC statistics

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 17bd04fbf3d3 by R David Murray in branch 'default': whatsnew for gc.get_stats, plus doc tweaks. http://hg.python.org/cpython/rev/17bd04fbf3d3 -- ___ Python tracker ___

[issue20074] open() of read-write non-seekable streams broken

2013-12-26 Thread Dolda2000
New submission from Dolda2000: It seems open() is slightly broken in Python 3, in that one cannot open non-seekable files in read-write mode. One such common use is open("/dev/tty", "r+") for interacting directly with the controlling TTY regardless of standard stream redirections. Note that th

[issue20027] Fixed support for Indian locales

2013-12-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue20027] Fixed support for Indian locales

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset aad582f717da by Serhiy Storchaka in branch '2.7': Issue #20027: Fixed locale aliases for devanagari locales. http://hg.python.org/cpython/rev/aad582f717da New changeset 7615c009e925 by Serhiy Storchaka in branch '3.3': Issue #20027: Fixed locale ali

[issue20027] Fixed support for Indian locales

2013-12-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.12.2013 19:59, Serhiy Storchaka wrote: > > Could you please make a decision about last patch, Marc-Andre? Looks good. Thanks, Serhiy. -- ___ Python tracker

[issue20027] Fixed support for Indian locales

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please make a decision about last patch, Marc-Andre? -- ___ Python tracker ___ ___ Pytho

[issue20072] Ttk tests fail when wantobjects is false

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes tkinter so that it now works when wantobjects is false (at least functions and methods return more sensible results) and fixes ttk tests so they conform to current behavior. If wantobjects is true, the behavior should not be changed. --

[issue20072] Ttk tests fail when wantobjects is false

2013-12-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Ttk tests fail when wantobjects is false. See attached log file. -- assignee: serhiy.storchaka components: Tkinter files: test_ttk_guionly.log messages: 206951 nosy: gpolo, serhiy.storchaka priority: normal severity: normal status: open title: Ttk te

[issue20067] Tkinter variables no works with wantobject is false

2013-12-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue20067] Tkinter variables no works with wantobject is false

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset b13c15a9ae54 by Serhiy Storchaka in branch '2.7': Issue #20067: Tkinter variables now work when wantobjects is false. http://hg.python.org/cpython/rev/b13c15a9ae54 New changeset fbc1a39b68e4 by Serhiy Storchaka in branch '3.3': Issue #20067: Tkinter

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Matthias Klose
Matthias Klose added the comment: fixed -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue20071] What should happen if someone runs ./python -m ensurepip in the build environment?

2013-12-26 Thread R. David Murray
New submission from R. David Murray: Someone on IRC reported doing this, and it (logically enough) gave a permission error trying to install into /opt. That may be exactly what it should do...but if he'd done it as root, presumably it would have tried to install PIP without python having been

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset e00bfb70a0c0 by doko in branch 'default': - Issue #20070: Don't run test_urllib2net when network resources are not http://hg.python.org/cpython/rev/e00bfb70a0c0 -- nosy: +python-dev ___ Python tracker

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Matthias Klose
Matthias Klose added the comment: this fixes it for me: --- a/Lib/test/test_urllib2net.py Wed Dec 25 17:36:20 2013 +0200 +++ b/Lib/test/test_urllib2net.py Thu Dec 26 17:05:47 2013 +0100 @@ -14,6 +14,8 @@ except ImportError: ssl = None +support.requires("network") + TIMEOUT =

[issue19938] Re-enable test_bug_1333982 on 3.x

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Committed; thanks for the review, Serhiy! I made similar changes to the 3.3 patch before committing. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue19938] Re-enable test_bug_1333982 on 3.x

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset e04fc45b7555 by Zachary Ware in branch '3.3': Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been http://hg.python.org/cpython/rev/e04fc45b7555 New changeset 285313c95e37 by Zachary Ware in branch 'default': Issue #19938: Re-enable

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Matthias Klose
Changes by Matthias Klose : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue20070] test_urllib2net is run even when the network resource is disabled

2013-12-26 Thread Matthias Klose
New submission from Matthias Klose: test_urllib2net is run even when the network resource is disabled, unlike test_urllibnet: run_tests.py -j 1 -w -uall,-network,-urlfetch ... [349/380/6] test_urllib2net Resource 'http://www.python.org/' is not available Resource 'http://www.example.com' is not

[issue19938] Re-enable test_bug_1333982 on 3.x

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> zach.ware stage: patch review -> commit review ___ Python tracker ___ ___ P

[issue19938] Re-enable test_bug_1333982 on 3.x

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Here's a much better patch to 3.4. -- Added file: http://bugs.python.org/file33269/test_dis_1333982-3.4.v2.diff ___ Python tracker ___ ___

[issue19683] test_minidom has many empty tests

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Some refactoring of the tests is certainly acceptable. If there are some tests that can be merged together, it is fine to do so; also for removing ones that don't make any sense (it's not like they've ever tested anything anyway :)). We don't have anyone liste

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2013-12-26 Thread Alexandr Zarubkin
Alexandr Zarubkin added the comment: An alternative solution, which worked for me, is: add file named sitecustomize.py in Lib\site-packages folder. The contents of the file: import sys sys.setdefaultencoding("cp1251") The default encoding should be determined for every localized Windows version

[issue20069] Add unit test for os.chown

2013-12-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Python 2.7. -- Added file: http://bugs.python.org/file33267/add_unit_test_os_chown_python27.patch ___ Python tracker ___ __

[issue20069] Add unit test for os.chown

2013-12-26 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is no tests for os.chown except for the invalid input. Attached the patch to add tests for os.chown. This test has not exercised the keyword `dir_fd` and `follow_symlinks` because `follow_symlinks` (I think) is kinda broken on Windows and I prefer to add

[issue16500] Add an 'atfork' module

2013-12-26 Thread xupeng
Changes by xupeng : -- nosy: +xupeng ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma