[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Trent Mick added the comment: c.f. some discussion on python-dev here: http://mail.python.org/pipermail/python-dev/2010-October/104501.html -- ___ Python tracker <http://bugs.python.org/issue2

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Changes by Trent Mick : -- assignee: -> trentm ___ Python tracker <http://bugs.python.org/issue2142> ___ ___ Python-bugs-list mailing list Unsubscri

[issue8029] bug in 2to3 dealing with "print FOO, " followed by "sys.stdout.write('')"

2010-02-27 Thread Trent Mick
New submission from Trent Mick : According to http://docs.python.org/reference/simple_stmts.html#the-print-statement the following with result in the print statement NOT printing a trailing space: import sys print u"ASD",; sys.stdout.write(u"") However, 2to3 curre

[issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe)

2009-06-29 Thread Trent Mick
Changes by Trent Mick : -- nosy: +trentm ___ Python tracker <http://bugs.python.org/issue6378> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue6164] [AIX] Patch to correct the AIX C/C++ linker argument used for 'runtime_library_dirs'

2009-06-16 Thread Trent Mick
Trent Mick added the comment: Tarek, This should not affect anyone using gcc or g++ on AIX because of this check just before the lines added by this patch: elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir The in

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char (same with context_diff)

2009-05-26 Thread Trent Mick
Trent Mick added the comment: Here is a new patch that also fixes the same issue in difflib.context_diff() and adds a couple test cases. -- stage: test needed -> patch review title: naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that d

[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace

2008-11-07 Thread Trent Mick
Changes by Trent Mick <[EMAIL PROTECTED]>: -- nosy: +trentm ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3073> ___ ___ Python

[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-07 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > What if you compile using 'gcc -arch ppc64 main.c'? $ gcc -arch ppc64 main.c $ ./a.out sizeof(_Bool) is 1 As you figured out. ___ Python tracker <[EMAIL PROTECTED]> <http

[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-07 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > I get: > > sizeof(_Bool)=4 bytes > > on a G4 PPC. Same thing on a G5 PPC: $ cat main.c #include int main(void) { printf("sizeof(_Bool) is %d\n", sizeof(_Bool)); } $ gcc main.c $ ./a.out sizeo

[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-07 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > Added file: http://bugs.python.org/file11723/pymacconfig.h.patch I'll test that on my end tomorrow -- though it looks like it will work fine. Thanks. -- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wron

=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick
Changes by Trent Mick <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file11720/issue4060_macosx_endian.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > BTW: Does this simplified approach really work for Python on Mac OS X It works for Python 2.5: http://svn.python.org/view/*checkout*/python/branches/release25-maint/configure.in?rev=66299 search for &

=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > Does this also affect sys.byteorder and the struct module ? Doesn't seem to affect sys.byteorder: $ /usr/bin/python -c "import sys; print sys.byteorder" big $ python2.6 -c "import sys; print sys.byteorder" b

[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-06 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: This also shows up in the byte ordering that Python uses to encode utf-16: $ uname -a Darwin sphinx 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc $ python

[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-06 Thread Trent Mick
New submission from Trent Mick <[EMAIL PROTECTED]>: Revision 63955 removed a block from configure.in (and effectively from pyconfig.h.in) having to do with endianness that results in an incorrect setting for "WORDS_BIGENDIAN" in Universal builds on Mac OS X. The remov

[issue3905] subprocess failing in GUI applications on Windows

2008-09-18 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: The failure is in the DuplicateHandle call that subprocess makes on, in this case, the stdin handle (as returned by `GetStdHandle(STD_INPUT_HANDLE)`) call earlier. Two cases here: 1. When this is run in a subsystem:windows process

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-22 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: Thanks Ronald. Any comment on http://bugs.python.org/msg69936 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-21 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: This bug should be re-opened. The patch to configure.in wasn't quite right. I'm attaching a slight fix. `autoconf`ing removes one level of square brackets in the 'sed' command to create $tgt. (Q about the issue tracker

[issue3393] `cd Mac && make installmacsubtree` fails on Mac OS X < 10.5 because of r63955

2008-07-17 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > The current trunk should be correct, there are no explicit calls to the > arch command left, all go through the configure replacement magic. $ svn info Path: . URL: svn+ssh://[EMAIL PROTECTED]/python/trunk/Ma

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-17 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: Ronald, The @ARCH_RUN_32BIT@ also needs to be added to two places in Mac/Makefile.in (as indicated in issue 3393), no? Would you like me to make that change? ___ Python tracker <[EMAIL PROTECTE

[issue3393] `cd Mac && make installmacsubtree` fails on Mac OS X < 10.5 because of r63955

2008-07-17 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: Alternative potential solution: use the ARCHPREFERENCE environment variable as described in the Mac OS X 10.5 arch man page. Ronald, if you could test if that works for you on 10.5, then presumably setting that environment var would be

[issue3393] `cd Mac && make installmacsubtree` fails on Mac OS X < 10.5 because of r63955

2008-07-17 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: Similar change in Mac/IDLE/Makefile.in: - --- python/trunk/Mac/IDLE/Makefile.in (original) +++ python/trunk/Mac/IDLE/Makefile.in Thu Jun 5 14:58:24 2008 @@ -42,7 +42,7 @@ $(srcdir)/..

[issue3393] `cd Mac && make installmacsubtree` fails on Mac OS X < 10.5 because of r63955

2008-07-17 Thread Trent Mick
New submission from Trent Mick <[EMAIL PROTECTED]>: http://svn.python.org/view?rev=63955&view=rev "MacOS X: Enable 4-way universal builds ..." This revision made the following change to Mac/Makefile.in: http://svn.python.org/view/python/trunk/Mac/Makefile.in?rev=63955&a

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-16 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > Yet another version: configure-patch-3381-2.txt is a slight enhancement > of the first version. Ronald, Did that accidentally not get attached? ___ Python tracker <[EMAIL PROTECTED]> <h

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-16 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: > BTW. Feel free to commit if the patch works for you, I'm rather swamped > at work and won't be able to test on 10.4 anytime soon. Thanks for the quick patches. Other than verifying that `configure && make` w

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-16 Thread Trent Mick
New submission from Trent Mick <[EMAIL PROTECTED]>: Configuring with "--enable-universalsdk" fails on Mac OS X 10.4/x86 because of a change in r63997. This in the python trunk (i.e. the 2.6 tree). The failure looks like this: $ ./configure --

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char

2008-02-18 Thread Trent Mick
Trent Mick added the comment: At a glance I suspect this patch will work back to Python 2.3 (when difflib.unified_diff() was added). I haven't looked at the Py3k tree yet. Note: This *may* also applied to difflib.context_diff(), but I am not sure. __ Tr

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char

2008-02-18 Thread Trent Mick
Trent Mick added the comment: Attached is a patch against the Python 2.6 svn trunk for this. -- versions: +Python 2.3, Python 2.4, Python 2.6 Added file: http://bugs.python.org/file9460/python_difflib_unified_diff.patch __ Tracker <[EMAIL PROTEC

[issue2142] naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs with inputs that don't end with end-of-line char

2008-02-18 Thread Trent Mick
New submission from Trent Mick: When comparing content with difflib, if the resulting diff covers the last line of one or both of the inputs that that line doesn't end with an end-of-line character(s), then the generated diff lines don't include an EOL. Fair enough. Naive (and I suspe