[issue15539] Fixing Tools/scripts/pindent.py

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Tests added. I am not sure tests will be passed on Windows. -- Added file: http://bugs.python.org/file28224/pindent_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue6912] Add 'with' block support to Tools/Scripts/pindent.py

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually without next['with'] = 'end' with support is broken. See issue15539. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6912

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible this is a duplicate of issue16601. -- nosy: +serhiy.storchaka versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16631

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I also noticed this. However, int(x=0) - integer is not enough. The right calltip should be int(x=0) - integer\nint(x, base=10) - integer. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OK. Then those issues are just related. -- nosy: +lars.gustaebel stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16631

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Related issue: issue16631. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16601

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lars.gustaebel versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16601

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16601 ___ ___ Python-bugs

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch, which adds multiline calltips support. -- Added file: http://bugs.python.org/file28235/idle_calltips_multiline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16629

[issue16630] IDLE: Calltip fails if __getattr__ raises exception

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. rpcclt.remotecall also can raise an exception. 2. I think fetch_tip() should return '' in case of exception as for non-existent arguments or for non-callables. You can add tests for this cases too. 3. break is a reserved word. It's not a good name

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16629 ___ ___ Python-bugs

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Done. Here is an updated patch. -- Added file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16629

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28235/idle_calltips_multiline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16629

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since you iterated to the end any iterators are independent (they are just indices in the list of members). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16631

[issue16636] codecs: readline() followed by readlines() returns trunkated results

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Confirm for 3.x. See also issue8260, issue12446, and issue14475. -- components: +IO, Unicode nosy: +ezio.melotti, serhiy.storchaka stage: - needs patch versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The number of lines in the return value of get_argspec should be limited, otherwise the calltip window can become too large. Calltip limited by first empty line. But I agree, some reasonable hard limit (say 10 lines) should be. I would separate

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Added hard limit (10) for number of calltip lines. -- Added file: http://bugs.python.org/file28246/idle_calltips_multiline_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16629

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think it was ever a requirement of docstrings that their signature fit on one line or that they render fully in IDLE. I think this is a requirement of IDLE. I still think that the rendering of multi-line signatures should be considered

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the patch is wrong or is not optimal for case when chars is -1, but size is not. If we want to read all data in any case, then we should call self.stream.read() without argument if chars  0 or size 0. If we want to read no more than size bytes

[issue12446] StreamReader Readlines behavior odd

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is obviously a duplicate of issue8260. -- nosy: +serhiy.storchaka resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - When I use codecs.open(...) and f.readline() follow up by f.read() return bad

[issue14475] codecs.StreamReader.read behaves differently from regular files

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is obviously a duplicate of issue8260 and issue12446. -- nosy: +serhiy.storchaka resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - When I use codecs.open(...) and f.readline() follow up by f.read() return

[issue16636] codecs: readline() followed by readlines() returns trunkated results

2012-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - committed/rejected status: open - closed superseder: - When I use codecs.open(...) and f.readline() follow up by f.read() return bad result ___ Python tracker rep

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As showed in issue12446, issue14475 and issue16636 there are different methods to reproduce this bug (read(size, chars) + readlines(), readline() + readlines()). All this cases should be tested. -- ___ Python

[issue16624] subprocess.check_output should allow specifying stdin as a string

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a beautiful patch. LGTM. However it should be tested on Windows. I'm not sure that reading not closed file in different process works on Windows. Zack, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http

[issue16638] support multi-line docstring signatures in IDLE calltips

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch moved from issue16629. I think this is a bugfix, because current behavior is wrong. Many functions (i.e. int, str, list, dict) have multiline signatures and IDLE shows only first line in a tip. I.e. int(x=0) - integer showed for int

[issue16638] support multi-line docstring signatures in IDLE calltips

2012-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think we should add empty lines after signatures in all docstrings where it needed (i.e. for super()). Here is a command which shows calltips for all builtins: ./python -c from idlelib.CallTips import get_argspec, get_entity; import builtins for name

[issue16165] sched.scheduler.run() blocks scheduler

2012-12-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27826/sched_unblock_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16165

[issue16165] sched.scheduler.run() blocks scheduler

2012-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I submitted wrong patch (it contained unrelated changes). Here is a right one. -- Added file: http://bugs.python.org/file28254/sched_unblock_3.patch ___ Python tracker rep...@bugs.python.org http

[issue16640] Less code under lock in sched.scheduler

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In additional to issue16165 I think that sched.scheduler runs more code under a lock than needed. The proposed patch moves this code outside a lock. This unlikely a bug, may be only small enhancement and cleanup. -- components: Library (Lib) files

[issue16641] sched.scheduler.enter arguments should be modifiable

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Example: import sched s=sched.scheduler() s.enter(10, 1, print) Event(time=7452.676787873, priority=1, action=built-in function print, argument=[], kwargs={}) next(s.queue).argument.append(spam) s.enter(5, 1, print) Event(time=7473.326011725, priority

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- title: sched.scheduler.enter arguments should be modifiable - sched.scheduler.enter arguments should not be modifiable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28256/sched_nonmodifiable_args.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, wrong patch. -- Added file: http://bugs.python.org/file28257/sched_nonmodifiable_args.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641

[issue16642] Mention new kwargs named tuple parameter in sched module

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which adds missed mentions of kwargs named tuple parameter. -- assignee: docs@python components: Documentation files: sched_docs_kwargs.patch keywords: patch messages: 177154 nosy: docs@python, giampaolo.rodola, serhiy.storchaka

[issue16643] Wrong documented default value for timefunc parameter in sched.scheduler()

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: sched.scheduler() prefers to use time.monotonic as a default value for timefunc parameter, and time.time used only as a fallback. But time.time documented as a default value. -- assignee: docs@python components: Documentation messages: 177155 nosy

[issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Test ContextManagerTests.test_invalid_args() in file Lib/test/test_subprocess.py contains code which has no sense. When Popen() fail then this code will not reachable. When Popen() success then c.exception will not assigned. Here is a patch with right

[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Test test_extract_hardlink() in Lib/test/test_tarfile.py ran 4 times. First time (uncompressed tarfile) it extract symbolic and hard links successfully, but in other 3 times (gzipped, bzipped and lzma'ed tarfile) extracting fails becouse this links

[issue16646] FTP.makeport() loses socket error details

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In FTP.makeport() a socket error catched and saved but then raised a new error with saved error as argument. Here is a patch which reraises an original error. -- components: Library (Lib) files: ftplib_makeport_raise_err.patch keywords: patch

[issue16646] FTP.makeport() loses socket error details

2012-12-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28262/ftplib_makeport_raise_err.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16646

[issue16646] FTP.makeport() loses socket error details

2012-12-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28263/ftplib_makeport_raise_err.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16646

[issue16647] LMTP.connect() loses socket error details

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In LMTP.connect() a socket error catched and saved but then raised a new error with saved error as argument. Here is a patch which reraises an original error. -- components: Library (Lib) files: smtplib_LMTP_connect_raise_err.patch keywords: patch

[issue16648] stdib should use new exception types from PEP 3151

2012-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Right now I'm working on a patch. ;) A pack of issues were produced in process. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16648

[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: As noted in Popen._internal_poll() docstring this method cannot reference anything outside of the local scope. However it references errno.ECHILD. The proposed patch fixes this. Is it good that Popen._handle_exitstatus() references building

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I found one bug and add some nitpicks and optimization suggestion on Rietveld. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue11159] Sax parser crashes if given unicode file name

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: However Python doesn't work with bytes filenames (I don't think this is a bug). The proposed patch allows unicode filenames be used in SAX parser. -- keywords: +patch nosy: +serhiy.storchaka stage: - patch review Added file: http://bugs.python.org

[issue16647] LMTP.connect() loses socket error details

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. It can be simpler. -- Added file: http://bugs.python.org/file28269/smtplib_LMTP_connect_raise_err_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16647

[issue16647] LMTP.connect() loses socket error details

2012-12-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28264/smtplib_LMTP_connect_raise_err.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16647

[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm just asking if this is a bug. If using building exceptions is safe, then we can get rid of _os_error and _ECHILD in 3.3+, using OSError and ChildProcessError instead. -- ___ Python tracker rep

[issue15955] gzip, bz2, lzma: add option to limit output size

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: you can just stick if not output: continue before it. And then hang. Because d.unconsumed_tail is not empty and no new data will be read. Why is this necessary? If unconsumed_tail is b'', then there's no need to prepend it (and the concatenation would

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: array audioop binascii random re struct xml.parsers.expat cjkcodecs zlib, bz2, lzma and crypts also can be implemented in pure Python. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Hynek, for review and committing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Hynek, for review and committing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg177269 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872

[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28260/test_tarfile_test_extract_hardlink.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16645

[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28275/test_tarfile_test_extract_hardlink.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16645

[issue16656] os.walk ignores international dirs on Windows

2012-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is reproduced on 3.x? -- nosy: +serhiy.storchaka type: - behavior versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16656] os.walk ignores international dirs on Windows

2012-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg177278 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16656] os.walk ignores international dirs on Windows

2012-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it reproduced on 3.x? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656 ___ ___ Python-bugs-list

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So expat doesn't count as that literally wraps the expat library. XML parser can be implemented in pure Python. There are a lot of XML parsers implemented in different programming languages. Random also requires accessing the system randomization

[issue16659] Pure Python implementation of random

2012-12-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: C implemented part of random module does not depend on any specific C level abilities. Here is a patch which implements this part on pure Python. May be this is not a best implementation. And I don't know how write tests for both implementations

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Tests now test both implementation. Thank Ezio for tip. -- Added file: http://bugs.python.org/file28279/random_pure_python_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Pure Python implementation of random ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16651

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I wonder whether it would make sense to use an array to hold the MT state, for a closer match with the C code. I don't think it makes sense. The algorithm is same and list is more natural for Python. Also arrays a little slower than lists, but it doesn't

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are the results of os.listdir(b'.') and os.listdir(u'.') on Python 2.7 and Python 3.3+? What are the results of os.stat(b'Русское имя') and os.stat(b'Русское имя') on Python 2.7 and Python 3.3+? What are the results of sys.getdefaultencoding

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I used test_heapq and test_decimal as an example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28278/random_pure_python.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My guess is that your unicode issue is issue 1602, which is non-trivial to solve. In such case the output will be something like: ['English name', ''] [] [] -- ___ Python tracker rep...@bugs.python.org http

[issue16664] [PATCH] Test Glob: files starting with .

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue16618. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16664

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Thanks Amaury for nits. -- Added file: http://bugs.python.org/file28282/sched_nonmodifiable_args_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28283/random_pure_python_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28279/random_pure_python_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue15861 has a more general patch which fixes also this issue. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11290

[issue15861] ttk.Treeview unmatched open brace in list

2012-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28011/tkinter_quoting_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15861

[issue15861] ttk.Treeview unmatched open brace in list

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Added additional tests for ttk.Combobox (see issue11290). -- Added file: http://bugs.python.org/file28286/tkinter_quoting_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue15861] ttk.Treeview unmatched open brace in list

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch for 2.7 added. -- Added file: http://bugs.python.org/file28287/tkinter_quoting_3-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15861

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- superseder: - ttk.Treeview unmatched open brace in list versions: +Python 2.7, Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11290

[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ezra's patch is working, but a little non-optimal. However, I'm not sure, that it is right to extend a set of whitespace characters. See comments at the top of the file. Also this approach should be slower, especially for trivial case (no changes

[issue16656] os.walk ignores international dirs on Windows

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Anatoly, for report. I'll try to investigate this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16656] os.walk ignores international dirs on Windows

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Anatoly, can you please run the attached test? -- Added file: http://bugs.python.org/file28291/test_unicode_fname.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16656] os.walk ignores international dirs on Windows

2012-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28293/test_unicode_fname.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16656] os.walk ignores international dirs on Windows

2012-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28291/test_unicode_fname.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656

[issue16669] Docstrings for namedtuple

2012-12-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here are two patches which implementation two different interface for same feature. In first patch you can use *doc* and *field_docs* arguments to specify namedtuple class docstring and field docstrings. For example: Point = namedtuple('Point', 'x y

[issue16669] Docstrings for namedtuple

2012-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28295/namedtuple_docstrings_tuples_seq.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16669

[issue16659] Pure Python implementation of random

2012-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Comments and docstrings a little enhanced. Thanks Brett for review. Also Python implementation of core generator now is threadsafe (in particular random() and getrandbits() methods) as its C implementation and its private members now

[issue16659] Pure Python implementation of random

2012-12-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28296/random_pure_python_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659

[issue16659] Pure Python implementation of random

2012-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. One bug fixed. Also I made some benchmarks. The pure Python random() about 100 times slower and getrandbits(32) about 13 times slower than the C implementation. -- Added file: http://bugs.python.org/file28303/random_pure_python_5

[issue16669] Docstrings for namedtuple

2012-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, we can use inheritance trick/idiom to specify a class docstring. But there are no way to specify attribute docstrings. I encountered this when rewriting some C implemented code to Python. PyStructSequence allows you to specify docstrings for a class

[issue16674] Faster getrandbits() for small integers

2012-12-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch adds a fast patch for generating small integers (the most common use case). Microbenchmark: $ ./python -m timeit -s import random; r=random.getrandbits; n=30 r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n) Non patched: 4.27 usec per

[issue16656] os.walk ignores international dirs on Windows

2012-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks, Anatoly. I see an actual bug. FindFirstFile and FindNextFile return broken name if file unicode name can't be represented in current codepage. I don't know what is perfect solution for this issue. On 2.7 we can decode listdir() argument to unicode

[issue16682] Document that audioop works with bytes, not strings

2012-12-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The audioop module documentation says that functions works with Python strings. This was right in 2.x, but in 3.x here should be bytes objects (actually the functions accept strings too, but this is an implementation detail, meaningless in general

[issue16682] Document that audioop works with bytes, not strings

2012-12-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file28312/audioop_docs_bytes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16682

[issue16683] Resort audioop documentation

2012-12-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Functions in the audioop module documentation enumerated in alphabetic order. Only one function out of order. Here is a patch that fixes this. -- assignee: docs@python components: Documentation files: audioop_docs_resort.patch keywords: patch

[issue16685] Deprecate accepting strings as arguments in audioop functions

2012-12-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Inadvertently strings accepted as arguments of audioop functions. This is a meaningless behavior and remnant of Python 2. We should drop string support. -- components: Extension Modules messages: 177477 nosy: serhiy.storchaka priority: normal

[issue16656] os.walk ignores international dirs on Windows

2012-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Surrogateescape is for non-decodable names. Here we have a problem with non-encodable names. I know that naive approach with using only Unicode API inside is not work because Windows use complex logic for filename encoding (for example dropping diacritics

[issue16686] audioop overflow issues

2012-12-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The audioop module has some issues with an overflow. 1. It uses post-checks for an integer overflow. This means using an undefined behavior. 2. When the result truncated in case of overflow, -maxval used as minimal value. But real minimum value is less

[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch contains unrelated changes. Sorry, my fault. Here is a cleaned patch. -- Added file: http://bugs.python.org/file28314/glob_magic_in_drive.patch ___ Python tracker rep...@bugs.python.org http

[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28221/glob_magic_in_drive.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16626

[issue16685] Deprecate accepting strings as arguments in audioop functions

2012-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What happens if you pass strings? They are encoded with UTF-8. See 's#' and 's*' formats in PyArg_ParseTuple() ('y*' recommended for bytes). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16656] os.walk ignores international dirs on Windows

2012-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I misunderstood your comment. Ah, you misunderstood my comment right now. So, listdir is returning the correct the filename, it's just that we can't encode it to the console encoding. listdir() returns already irremediably broken filename (all

  1   2   3   4   5   6   7   8   9   10   >