[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2014-04-17 Thread Sam Kimbrel
Sam Kimbrel added the comment: Here's a patch that corrects col_offset for binops in both the ast module and in the compiler proper. I've incorporated Aivar's test into test_ast.py; if there are test suites for compile.c please let me know and I can add somet

[issue21263] test_gdb failures on os x 10.9.2

2014-04-16 Thread Sam Kimbrel
New submission from Sam Kimbrel: test_gdb fails under OS X 10.9.2 and gdb 7.6.1 (built with homebrew on Apple LLVM version 5.1 (clang-503.0.40)): FAIL: test_pycfunction (test.test_gdb.PyBtTests) Verify that "py-bt" displays invocations of PyCFunction

[issue6490] os.popen documentation is probably wrong

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Yes, I think that wording works a lot better. Thanks for the touch-up. -- ___ Python tracker <http://bugs.python.org/issue6

[issue6490] os.popen documentation is probably wrong

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Updated the patch as per Martin's notes in msg203483. -- nosy: +sam.kimbrel Added file: http://bugs.python.org/file34896/6490-os-popen-docs.diff ___ Python tracker <http://bugs.python.org/i

[issue18401] Tests for pdb import ~/.pdbrc

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Picked up Martin's patch and added docs, misc/NEWS entry, and a test for readrc=False behavior. -- nosy: +sam.kimbrel Added file: http://bugs.python.org/file34892/18401-pdb-readrc-kwarg-with-docs-and-tests

[issue21075] fileinput should use stdin.buffer for "rb" mode

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Patch attached that checks for 'b' in self._mode and sets self._file to sys.stdin.buffer as appropriate. -- keywords: +patch nosy: +sam.kimbrel Added file: http://bugs.python.org/file34880/21075-fileinput-

[issue17078] string.Template.safe_substitute hard-wires "braces" as {}

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: Florent Xicluna already fixed this in r84888 for 3.2+; I've tested that the patch applies cleanly to 2.7 and tests pass. Someone with the commit bit should transplant that commit into 2.7 as it does not change the public API to this module. --

[issue20956] tokenize module claims tokenize.tokenize returns namedtuple, but it doesn't

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: Attached patch to update 2.7 docs to refer to the plain-old-tuple returned from generate_tokens(). -- keywords: +patch nosy: +sam.kimbrel Added file: http://bugs.python.org/file34841/20956-tokenize-docs.diff ___ Python

[issue10481] subprocess PIPEs are byte streams

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: I've created a patch that updates the docs to reflect the behavior of communicate() and check_output(), which is that both the "input" argument and stdin/stdout/stderr PIPEs will convert to and from strings when self.univeral_newlines is True an