[issue18553] os.isatty() is not Unix only

2013-09-19 Thread Dmi Baranov
Dmi Baranov added the comment: I found a little difference in isatty implementaions: Windows Determines whether a file descriptor is associated with a character device [1] Unix Test whether a file descriptor refers to a terminal [2] So, we having a same behavior for pipes, but different for I

[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Dmi Baranov
Dmi Baranov added the comment: Guys, don't talk with bot - here is a summary [1] and his "history of glory" with patches to contributors lists [2]. Better way is cut-off this email from python.org services. [1] http://wiki.gbatemp.net/wiki/User:TaeWong [2] https://www.goog

[issue13107] Text width in optparse.py can become negative

2013-09-02 Thread Dmi Baranov
Dmi Baranov added the comment: I think "ugly look is better than silence" here. Elazar, can you touch a optparse too (with some tests - test.support.EnvironmentVarGuard context manager will be helpful here)? -- nosy: +dmi.baranov ___ Pyth

[issue18553] os.isatty() is not Unix only

2013-09-02 Thread Dmi Baranov
Dmi Baranov added the comment: isatty is a part of of POSIX sub-system at Windows > 5.x (AKA 2000) [1] (file handling equivalents [2]). I think, we need to remove availability note here. [1] http://msdn.microsoft.com/en-us/library/f4s0ddew.aspx [2] http://msdn.microsoft.com/en-us/libr

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-07-11 Thread Dmi Baranov
Dmi Baranov added the comment: Yeah, my first patch applied :) thanks, David -- ___ Python tracker <http://bugs.python.org/issue17987> ___ ___ Python-bugs-list m

[issue18146] Document miss, Stats objects has no method called "print_results"

2013-06-06 Thread Dmi Baranov
Dmi Baranov added the comment: Duplication of issue 18033 -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue18146> ___ ___ Python-bugs-list m

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread Dmi Baranov
Dmi Baranov added the comment: anh, nice catch. Madison, I'm not see any terrible consequences, only urlsplit is affected now: >>> urlsplit('http://user:passw...@domain.com:80/path?query#fragment') SplitResult(scheme='http', netloc='user:passw...@doma

[issue18021] Update broken link to Apple Publication Style Guide

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: That link will be outdated in next few months (I believe :-)). What about https://help.apple.com/asg/mac ? -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue18

[issue18124] Broken build on target machine with incorrect hostname (non-ascii)

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: Just a another behavior. My mistake, sorry. -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: There is patch. Test is non-LGTM, because having a side effect for hostname and requires root's permissions for manipulations with hostname[*]. Someone having ideas how I can "mock" system `uname` call? [*] But this way is OK for Lib/test/test_

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: My system python-2.7.3 affected too: python -c 'import sys;print(sys.version);import x' 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] Traceback (most recent call last): File "", line 1, in RuntimeError: not holding the import lo

[issue18122] RuntimeError: not holding the import lock

2013-06-02 Thread Dmi Baranov
Dmi Baranov added the comment: Looks like old history from issue 7242 -- nosy: +dmi.baranov, gregory.p.smith ___ Python tracker <http://bugs.python.org/issue18

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-02 Thread Dmi Baranov
Dmi Baranov added the comment: Thanks Charles - I'm reproduced Dominik's issue at default branch: $ python -c 'import os, sys;print(sys.version);print(os.uname())' 3.4.0a0 (default:adfec512fb32, Jun 3 2013, 08:09:43) [GCC 4.6.3] Traceback (most recent call last):

[issue18124] Broken build on target machine with incorrect hostname (non-ascii)

2013-06-02 Thread Dmi Baranov
New submission from Dmi Baranov: As a part of issue #18109 $ echo hât | sudo tee /proc/sys/kernel/hostname $ hostname #Yes, I know about RFC952;-) hât $ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="

[issue18110] Nested set comprehensions in class scope fail

2013-05-31 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue18110> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dmi Baranov
Dmi Baranov added the comment: /offtop Dumn, sorry for duplication here, Victor. We not having websockets here, my page not refreshed. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-05-31 Thread Dmi Baranov
Dmi Baranov added the comment: I just checked RFC952 [1] and RFC1123 [2], that host name is incorrect. I think, you need report to Arch Linux bug-tracker. $ sudo hostname hât hostname: the specified hostname is invalid $ uname -a Linux d9frog9n-desktop 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-30 Thread Dmi Baranov
Dmi Baranov added the comment: Amended -- Added file: http://bugs.python.org/file30430/issue17987_6.patch ___ Python tracker <http://bugs.python.org/issue17

[issue18045] get_python_version is not import in bdist_rpm.py

2013-05-30 Thread Dmi Baranov
Dmi Baranov added the comment: I would agree that the patch is incorrect, if it was produced with additional refactoring or changes in functionality, not described in the issue. It's just a PEP8 compliance at package level. -- ___ Python tr

[issue17681] Work with an extra field of gzip files

2013-05-29 Thread Dmi Baranov
Dmi Baranov added the comment: I'll be glad to do it, but having some questions for discussing. First about FEXTRA format - it consists of a series of subfields [1] and current Lib/test/test_gzip.py :: test_read_with_extra having a bit incorrect extra field - sure, if somebody using f

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-29 Thread Dmi Baranov
Dmi Baranov added the comment: Fred or Serhiy - any news here? I'm signed Contributor Agreement few days ago, just waiting a change in my profile here, please don't worry about copyright :-) -- ___ Python tracker <http://bugs.python.o

[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dmi Baranov
Dmi Baranov added the comment: > Also, as mentioned, what you want to hide is not necessarily > well-defined. For example, under Unix you might want > to hide "*~" files. Yes, and instead of adding another parameters, something like that: os.listdir(path, show_hidden=False

[issue18087] os.listdir don't show hidden option

2013-05-28 Thread Dmi Baranov
Dmi Baranov added the comment: So, I'm having a .gitignore file on Windows. Its hidden or not? In other words, only your code feel the difference in "hidden files policy". BTW, Mas OSX using two ways - dotfiles and "invisible" flags in Finder: $ chflags hidden i-am

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-28 Thread Dmi Baranov
Dmi Baranov added the comment: Thanks for review, Serhiy - updated. -- Added file: http://bugs.python.org/file30400/issue17987_5.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-28 Thread Dmi Baranov
Dmi Baranov added the comment: Amended, as discussed. Also changed documentation from "how to use a context managers with that" to "how it works". -- Added file: http://bugs.python.org/file30398/issue17987_4.patch ___ P

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-28 Thread Dmi Baranov
Dmi Baranov added the comment: `captured_stdin` test changed, docs updated. -- Added file: http://bugs.python.org/file30396/issue17987_3.patch ___ Python tracker <http://bugs.python.org/issue17

[issue18045] get_python_version is not import in bdist_rpm.py

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Added a patch. Not covered by test, because this case require external module in test package definition. -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30392/issue18045.patch ___ Python

[issue18033] Example for Profile Module shows incorrect method

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Added py3 patch -- keywords: +patch nosy: +dmi.baranov versions: +Python 3.4 Added file: http://bugs.python.org/file30390/issue18033_py3.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18033] Example for Profile Module shows incorrect method

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: py2 -- Added file: http://bugs.python.org/file30391/issue18033_py2.patch ___ Python tracker <http://bugs.python.org/issue18

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Yes, I agree that this is not an obvious sample, but: $ ./python -m test.test_support | grep test_captured_stdin test_captured_stdin (__main__.TestSupport) ... ok What's about that? with captured_stdin() as s: s.write('hello\n') s.seek(

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Sorry for noise, missed changes in Doc/library/test.rst. Updated patch added -- hgrepos: +192 Added file: http://bugs.python.org/file30389/issue17987_2.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Added a patch -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30387/issue17987.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17878] There is no way to get a list of available codecs

2013-05-02 Thread Dmi Baranov
Dmi Baranov added the comment: Sorry for additional nose - currently there is no way to change the codecs_search_path. Similarly with sys.patch_hooks is a great way to increase the level of customization (maybe I have a faster codec

[issue17878] There is no way to get a list of available codecs

2013-05-02 Thread Dmi Baranov
Dmi Baranov added the comment: My +1 for __iter__ with default `raise StopIteration`, it is more elegant solution than declaration and guarantee of the interfaces (based at collections.abc.Callable and collections.abc.Iterator). Paul, result as iterable of CodecInfo objects is gives much

[issue17878] There is no way to get a list of available codecs

2013-05-02 Thread Dmi Baranov
Dmi Baranov added the comment: I think the "function" is a bit misleading. I suggest something like CodecsSearcher, please look at attached implementation (dirty code, just for start discussion about interfaces, lazy caches, etc). -- Added file: http://bugs.python.org

[issue17878] There is no way to get a list of available codecs

2013-05-01 Thread Dmi Baranov
Dmi Baranov added the comment: I think its not possible while codecs registry contains search callbacks (stateless-registry) -- components: +Library (Lib) nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue17

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-05-01 Thread Dmi Baranov
Dmi Baranov added the comment: Found only this "patch" [1] :) I think is possible to change VARIANT_BOOL._type_ to any of short types [2] for non-"nt" platforms? [1] https://code.launchpad.net/~mandel/python-distutils-extra/import_issues/+merge/53519 [2] http://msdn

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2013-05-01 Thread Dmi Baranov
Dmi Baranov added the comment: Attached patch for checking status code based at RFC 2616 [1]. Covered by tests. [1] http://tools.ietf.org/html/rfc2616#section-6.1.1 -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30100/issue17319.patch

[issue17630] Create a pure Python zipfile importer

2013-04-30 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue17630> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17829] csv.Sniffer.snif doesn't set up the dialect properly for a csv created with dialect=csv.excel_tab and containing quote (") char

2013-04-30 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue17829> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12458] Tracebacks should contain the first line of continuation lines

2013-04-30 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue12458> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17872] Crash in marshal.load() with bad reader

2013-04-29 Thread Dmi Baranov
Changes by Dmi Baranov : -- nosy: +dmi.baranov ___ Python tracker <http://bugs.python.org/issue17872> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17714] str.encode('base64') add trailing new line character. It is not documented.

2013-04-29 Thread Dmi Baranov
Dmi Baranov added the comment: Added a patch -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30069/issue17714.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17867] Deleting __import__ from builtins can crash Python3

2013-04-29 Thread Dmi Baranov
Dmi Baranov added the comment: Another example of post-effects: >>> del __builtins__.__dict__['__import__'] >>> 1/0 Traceback (most recent call last): File "", line 1, in Fatal Python error: __import__ missing Curr

[issue17867] Deleting __import__ from builtins can crash Python3

2013-04-29 Thread Dmi Baranov
New submission from Dmi Baranov: Simple case - let's delete __import__ and try to import anything $ python3.3 Python 3.3.0 (default, Oct 7 2012, 11:03:52) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more informati