[issue7114] HTMLParser doesn't handle

2009-12-08 Thread Denis
Denis added the comment: The CDATA sections are part of XML specification. http://www.w3.org/TR/REC-xml/#sec-cdata-sect HTML is not XML, so HTMLParser does the right thing here. -- nosy: +Denis ___ Python tracker

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15505/fastsearch_rfind.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox
flox added the comment: (removed comment which should not be copied) -- Added file: http://bugs.python.org/file15507/fastsearch_rfind.patch ___ Python tracker ___ ___

[issue7454] Solaris SPARC: _multiprocessing.so: symbol sem_timedwait: referenced symbol not found

2009-12-08 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: After ./configure step, I made the following changes to pyconfig.h in order to fix this issue: $ diff pyconfig.h.orig pyconfig.h 561c561 < /* #undef HAVE_SEM_TIMEDWAIT */ --- > #undef HAVE_SEM_TIMEDWAIT Ideally, something needs to be changed in configure

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I added a test for iterating and committed the patch in r76723 and r76724. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, iterating already works. Sorry for the noise. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue5596] memory leaks in py3k

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: No leaks anymore! http://mail.python.org/pipermail/python-checkins/2009-December/088162.html Thanks flox! -- ___ Python tracker ___

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: We should also proxy other special methods. There is __iter__, __next__, what else? -- ___ Python tracker ___ __

[issue7454] Solaris SPARC: _multiprocessing.so: symbol sem_timedwait: referenced symbol not found

2009-12-08 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : Added file: http://bugs.python.org/file15506/pyconfig.h ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox
New submission from flox : While looking at issue7458 I stopped on: /* XXX - create reversefastsearch helper! */ Here is the patch which is just the translation of the same algorithm already implemented for "find/index". http://effbot.org/zone/stringlib.htm Note: it supersedes patch for 7458

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is a patch+test -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file15504/with_popen.patch ___ Python tracker __

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Ronald: sorry, I wasn't clear. I only get that failure before your fix; afterwards, it's fine. -- ___ Python tracker ___ ___

[issue4111] Add Systemtap/DTrace probes

2009-12-08 Thread Mark Wielaard
Mark Wielaard added the comment: I took the patch and tweaked it a little so that it works with systemtap (at least for the function entry/exit probes). It is against 2.6.2 since that was what was in the Fedora 12 src package I was using. Cleaned up the configure checks a little, but otherwise i

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily
Ned Deily added the comment: Ronald, it's a more complicated configure issue. I'm in the middle of pinning down the details. More shortly ... -- ___ Python tracker ___

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Ned: which version of Python do you build? The issue was only in the trunk (2.7), the other branches were fine (although the code in 3.1 and 3.2 was suboptimal). BTW. The issue affected universal builds on all OSX versions. The trunk should be fine now as w

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : This works under trunk but fails under py3k: >>> import os >>> with os.popen("ls", "r") as f: ... print(f.read()) ... Traceback (most recent call last): File "", line 1, in AttributeError: __exit__ -- components: Library (Lib) messages: 96151 no

[issue5596] memory leaks in py3k

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed fixes to test_urllib and test_zipimport_support similar to the ones you proposed. Thank you! -- ___ Python tracker ___ __

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread GD
GD added the comment: Point me in the direction of a binary to download and I can test it for you. GD _ Get gifts for them and cashback for you. Try Bing now. http://www.bing.com/shopping/sea

[issue7458] crash in str.rfind() with an invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: flox> Actually the "find" method was not broken. Oh, you're right, str.find() was already fixed by r66631 (related to issue #3967). I prefer your patch flox ;-) I fixed this issue title. -- title: crash in str.find() and str.rfind() with invalid start

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Ned: maybe your pyconfig.h isn't defining HAVE_GCC_ASM_FOR_X87 in the first place, for some reason? I *do* get that error for trunk / 10.6 (with the 10.5 SDK; I don't have the 10.4 SDK installed): Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ /usr/bin/gcc-4.

[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Guido van Rossum
Guido van Rossum added the comment: I don't see a bug here. The value returned by imp.get_magic() matches the first bytes of a bytecode file. That's all that matters. Of course, we could remove the global variable and just use the defined constant; but that's just an optimization, not a bugfi

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily
Ned Deily added the comment: "PPC (G3) machine rather than Intel (which shouldn't make a difference)" ... but did in this case. Perhaps it's too early in the morning yet but I don't see why that error doesn't show up for me when building trunk on an Intel machine under 10.6, i.e. this gives n

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: > Do you get the same problem with py3k? Not in 3.1.1 at least. > Fixed in r76712 (trunk) That fixes the issue. Thanks! Let me know if you still need pyconfig.h. -- status: pending -> open ___ Python tracker

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox
flox added the comment: I reviewed the patch, and it seems partially redundant. Actually the "find" method was not broken. There is already a test "if (str_len < 0) return -1;" for this one. See attached patch. -- Added file: http://bugs.python.org/file15501/issue7458_rfind.diff

[issue7460] extended slicing not sufficiently covered in docs

2009-12-08 Thread Lorenz Quack
New submission from Lorenz Quack : I find the documentation regarding extended slicing to be lacking. To be honest I couldn't find any documentation about it. The only - and quite good - source of information I found was [1]. Maybe I didn't search enough. If so I would appreciate a link to the re

[issue7184] build failures on Snow Leopard

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: richard: could you please elaborate on what you think is wrong? readline doesn't get build because OSX' libedit isn't good enough for the readline module in 2.6, this is fixed in 2.7. On my machine the other ones do get build, although I had to move /Library

[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file15499/python-3.1-fix_documentation_of_magic_word.patch ___ Python tracker ___

[issue7190] Problems running threaded Tkinter program under OS X IDLE

2009-12-08 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue3432] Mac, 2.6 framework install error

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Is this issue still relevant? I cannot reproduce this on my machines. -- nosy: +ronaldoussoren ___ Python tracker ___ _

[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : Python/import.c defines magic word which is used in the beginning of .pyc files to verify if .pyc files have been generated by compatible version of Python. Python 2 supports undocumented -U option increases magic word by 1. Python 3 use

[issue6800] os.exec* raises "OSError: [Errno 45] Operation not supported" in a multithreaded application

2009-12-08 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- assignee: ronaldoussoren -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: This should be fixed in r76715, I've removed the documentation that caused the installer issues in the first place. -- resolution: -> fixed stage: -> test needed status: open -> pending type: -> behavior ___ Pyt

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Fixed in r76712 (trunk), r76713 (3.2), r76714 (3.1). The python3 branches contained about half of the fix, I merged the trunk version into python3 anyway to keep all 3 branches in sync. The issue does not affect the 2.6 branch. -- resolution: -> fi

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is due to a block starting at '#ifdef HAVE_GCC_ASM_FOR_X87' in Python/pymath.c. A simple patch to pymacconfig.h fixes the issue, I'll commit it once I've fully tested the result. -- ___ Python tracker

[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: This has been committed in r76708, r76710, r76711. Thank you! -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15495/str_find-2.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15493/CRASH_rfind.py ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15492/str_find.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15496/str_find-3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: sys.maxint/sys.maxsize: oops, sys.maxsize *does* exist (in Python >= 2.6), sorry. Here is a new patch using sys.maxsize. Anyway, sys.maxsize sounds better because the integer overflow occurs in a Py_ssize_t variable (j). -- Added file: http://bugs.pyth

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: pitrou> You shouldn't harcode 1 << 63 and 1 << 64, but calculate pitrou> them based on sys.maxsize instead. (sys.maxint) Yes, you're right. Does str_find-3.patch looks better? It's not easy to always detect an Heisenbug :-) -- Added file: http://bugs.

[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks good to me. -- priority: -> high resolution: -> accepted stage: -> commit review type: -> crash versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: The problem shouldn't be present in 3.1 and 2.7, both trees no longer contain the ancient documentation files. IMHO the best fix is to remove Mac/Resources/app/Resources/English.lproj/Documentation/ide/ (and the link to ide/index.html in .../Documentation/i

[issue1495089] sys.getfilesystemencoding

2009-12-08 Thread R. David Murray
R. David Murray added the comment: This is surprisingly non-transparent. However, it works as documented in py3. It sorta works as documented in p2, except that there's a bit left out of the docs. In py2, the code that results in getfilesystemencoding's value sets the locale based on the envi

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: You shouldn't harcode 1 << 63 and 1 << 64, but calculate them based on sys.maxsize instead. -- nosy: +pitrou ___ Python tracker ___

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Could you also post the generated pyconfig.h? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Do you get the same problem with py3k? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: I wrote new patches to: - implement the "alternate method" - add unit tests - and finally to move the tests in the right file Is the patch now correct? Can you apply it? It doesn't still crash Python trunk and it generates a lot of noise in my fuzzer :-) --

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox
flox added the comment: I got it to crash (2.7): ~ $ ./python Lib/test/regrtest.py string_tests test_unicode test_str test_unicode test test_unicode failed -- Traceback (most recent call last): AssertionError: -1 != -8276732 test_str test test_str failed -- Traceback (most recent call last): A

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: New patch with a more stable test. test_unicode does also fail (error or crash) without the patch on find.h. -- Added file: http://bugs.python.org/file15495/str_find-2.patch ___ Python tracker

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: > This bug does not occur on Debian 64 bits. It does, sometime :-) Read uninitiliazed memory doesn't always crash. $ python -c "'ab'.rfind('xxx', (1 << 63) + 10, 0)" Erreur de segmentation Note: my 64 bits test in CRASH_rfind.py is wrong, ctypes.c_long

[issue7455] cPickle: stack underflow in load_pop()

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: > Can you add a test for this? I wasn't sure of the right place to add the test. I tried Lib/test/pickletester.py, but it doesn't work because UnpicklingError is not defined there. Well, here is a new version of my patch with an unit test. -- Added fi

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox
flox added the comment: This bug does not occur on Debian 64 bits. ~ $ uname -srvm Linux 2.6.30-bpo.1-amd64 #1 SMP Mon Aug 17 08:42:50 UTC 2009 x86_64 Tested with variants: from random import getrandbits self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(64), 0) self

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: The bug was introduced in Python 2.5 during the needforspeed sprint: r46469 (May 27 2006). http://wiki.python.org/moin/NeedForSpeed Python < 2.5 is not affected, Python 3.x is affected. CRASH_rfind.py is more stable and should always crash if your Python versi

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
STINNER Victor added the comment: In my test, start=6287518193 is an arbitrary value, it may crash or not. The test might use any random integer > 0. -- ___ Python tracker ___ __

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file15492/str_find.patch ___ Python tracker ___ ___

[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor
New submission from STINNER Victor : str.find() and str.rfind() reads non initialized memory (using memcmp()) if start is bigger than end. Attached patch fixes the issue and includes a patch. -- components: Interpreter Core messages: 96117 nosy: haypo severity: normal status: open title

[issue7457] Adding a read_pkg_file to DistributionMetadata

2009-12-08 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r76702 + r76704 (2.7) and r76706 (3.2) -- status: open -> closed versions: -Python 3.1 ___ Python tracker ___

[issue7456] rfc822.Message.getheaders undocumented

2009-12-08 Thread Tarek Ziadé
Tarek Ziadé added the comment: Forget about this, I have realized this module is deprecated in python 3. -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily
Ned Deily added the comment: Works for me on 10.4.11 PPC (G3) machine rather than Intel (which shouldn't make a difference). But from your config.log, the gcc version is older than what I have on 10.4 (build 5250 vs build 5370). Suggest ensuring you have the most recent Xcode for 10.4 insta

[issue7457] Adding a read_pkg_file to DistributionMetadata

2009-12-08 Thread Tarek Ziadé
New submission from Tarek Ziadé : This API will allow readong back static PKG-INFO files. -- assignee: tarek components: Distutils messages: 96113 nosy: tarek priority: normal severity: normal status: open title: Adding a read_pkg_file to DistributionMetadata versions: Python 2.7, Python