[issue12867] linecache.getline() Returning Error

2011-08-31 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The linecache module functions take a filename string as an argument, not a file object. Try: linecache.getlines(/path/to/filename, lineno) http://docs.python.org/py3k/library/linecache.html -- nosy: +ned.deily resolution: - works for me

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
New submission from Remi Pointel pyt...@xiri.fr: Hello, the test_stack_overflow failed on OpenBSD. Don't hesitate if you need more information. Details: $ ./python Lib/test/test_faulthandler.py test_disable (__main__.FaultHandlerTests) ... ok test_dump_traceback (__main__.FaultHandlerTests)

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: Info: I read issue 12469 but I prefered to create new issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12868 ___

[issue12850] [PATCH] stm.atomic

2011-08-31 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___

[issue1215] documentation doesn't say that you can't handle C segfaults from python

2011-08-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 31 août 2011 02:52:01, vous avez écrit : What do you want to do on a SIGSEGV? On a real fault, you cannot rely on Python internal state, you cannot use any Python object. To handle a real SIGSEGV fault, you have to

[issue12765] test_packaging failure under Snow Leopard

2011-08-31 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Still failing. -- resolution: fixed - stage: commit review - needs patch status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12765

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-08-31 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: There is a problem in this area of the code, not especially with the patch but with how gcc works (or doesn't). To illustrate: --- Version info --- vinay@eta-hardy:/tmp$ uname -a Linux eta-hardy

[issue12869] PyOS_StdioReadline is printing the prompt on stderr

2011-08-31 Thread Albert Zeyer
New submission from Albert Zeyer alb...@googlemail.com: PyOS_StdioReadline from Parser/myreadline.c is printing the prompt on stderr. I think it should print it on the given parameter sys_stdout. Other readline implementations (like from the readline module) also behave this way. Even if it

[issue12861] PyOS_Readline uses single lock

2011-08-31 Thread Albert Zeyer
Albert Zeyer alb...@googlemail.com added the comment: Even more problematic: The readline lib itself is absolutely not designed in a way to be used from multi threads at once. -- ___ Python tracker rep...@bugs.python.org

[issue11435] Links to source code should now point to hg repo

2011-08-31 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: After getting Georg’s greenlight on python-dev, I have adapted the source reST role for 2.7 and updated all links. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10086] test_sysconfig failure when prefix matches /site

2011-08-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1e01543c3d0a by Éric Araujo in branch '3.2': Fix test_sysconfig when run from a Python installed under /site (#10086). http://hg.python.org/cpython/rev/1e01543c3d0a New changeset 0968acf0e6db by Éric Araujo in

[issue12765] test_packaging failure under Snow Leopard

2011-08-31 Thread Bill Janssen
Bill Janssen bill.jans...@gmail.com added the comment: I'm on vacation right now and can't get to it... Bill On Thu, Aug 18, 2011 at 12:22 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: Bill is the owner of that buildbot. --

[issue12785] list_distinfo_file is wrong

2011-08-31 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I've tested the attached patch against 3.3 on Windows XP, and it seems to fix the test_database failures. Thanks. I've uploaded the exact diff of what I tested with. Your diff matches the one I get after updating my clone, we’re good. I

[issue10086] test_sysconfig failure when prefix matches /site

2011-08-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4dcbae65df3f by Éric Araujo in branch '2.7': Fix test_sysconfig when run from a Python installed under /site (#10086). http://hg.python.org/cpython/rev/4dcbae65df3f --

[issue10086] test_sysconfig failure when prefix matches /site

2011-08-31 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think I can commit this fix for a minor issue in a test without worrying about regressions. I manually tested and it’s fixed. Done! Thanks again. -- assignee: tarek - eric.araujo resolution: - fixed stage: patch review -

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-08-31 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I only meant that when writing data resources, one might reasonably use 'wb', but when writing scripts, which are text, 'w' is more appropriate. I don’t see why. All text is bytes, so we can do all I/O in bytes when writing resources and

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-08-31 Thread trevor
trevor tre...@well.com added the comment: [eric.araujo] Do you see that when running a test, a command or some other code? when attempting to install a self-created package. tools from 3.3a ~72060:1696e2789d91 -- ___ Python tracker

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: OpenBSD's threads are userland threads, and sigaltstack() doesn't work when the program is built with -pthread: http://marc.info/?l=openbsd-bugsm=114323355014696w=2 Note that POSIX warns about this:

[issue12870] Regex object should have introspection methods

2011-08-31 Thread Matt Chaput
New submission from Matt Chaput m...@whoosh.ca: Several times in the recent past I've wished for the following methods on the regular expression object. These would allow me to speed up search and parsing code, by limiting the number of regex matches I need to try. literal_prefix(): Returns

[issue12870] Regex object should have introspection methods

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: These additions sounds more useful as an external tool than regex functions/methods. There are already a few tools able to explain what a regex matches. The use cases you proposed are too specific to deserve new methods, and using them

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: Hi, results: Out of curiosity, could you try this: $ ./python -c import faulthandler; faulthandler.enable(); faulthandler._stack_overflow(); echo $? $ ./python -c import faulthandler; faulthandler.enable(); faulthandler._stack_overflow(); echo

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: If Pyton is configured without thread support (--without-threads), the compilation fails on OpenBSD : $ make [...] ./Modules/posixmodule.c:4582: undefined reference to `sched_get_priority_min'

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I have a problem if I add --without-threads Yeah, it's a recent regression: I opened the issue #12871. I don't think that it's specific to OpenBSD. -- ___ Python tracker

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: Yeah, it's a recent regression: I opened the issue #12871. I don't think that it's specific to OpenBSD. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12868

[issue12636] IDLE ignores -*- coding -*- with -r option

2011-08-31 Thread ledave123
ledave123 ledave...@yahoo.fr added the comment: Here is the patch: diff -r e8da570d29a8 Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.pyWed Jul 27 21:28:23 2011 +0200 +++ b/Lib/idlelib/PyShell.pyWed Aug 31 20:16:38 2011 +0200 @@ -582,7 +582,9 @@ def execfile(self, filename,

[issue6721] Locks in python standard library should be sanitized on fork

2011-08-31 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: For the record, turns out there was a bit of misunderstanding. I used the term deprecate above to mean warn users (through documentation) that they should not use (a feature) and not in its Python-dev sense of remove (a feature) after a period of

[issue12793] allow filters in os.walk

2011-08-31 Thread Jacek Pliszka
Jacek Pliszka jacek.plis...@gmail.com added the comment: Looks like the proper way to do it is described in the manual: http://docs.python.org/dev/library/os.html#os.walk for root, dirs, files in os.walk('python/Lib/email'): if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file23078/openbsd_sigaltstack.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12868

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: I haven't been able to reproduce this on Linux (2.6.38; Ubuntu 11.04). Some searching around seems to suggest that OpenBSD doesn't provide those functions (or didn't until recently). Modules/posixmodule.c and configure.in seem to assume that

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: There's no reason to disable sched_get_priority_(min|max) when Python is built without threads: those libraries control the scheduling policy, and should be available even without pthread. However, it's really likely that pthread has

[issue12793] allow filters in os.walk

2011-08-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12793 ___ ___

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: It does not build completely, I have a problem if I add --without-threads: Until this gets fixed, if you want to do a quick test, you could just remove the calls to sched_get_priority_(min|max): diff -r 0968acf0e6db

[issue6721] Locks in python standard library should be sanitized on fork

2011-08-31 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Anyway, since my view does not seem to resonate with core developers I I'll give it a rest for now. Well, the problem is that many views have been expressed in this thread, which doesn't help getting a clear picture of what's needed

[issue12472] Build failure on IRIX

2011-08-31 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I'm closing, since IRIX header files seem terminally broken, and we can't do much about it. Furthermore, I'm 99% sure IRIX isn't officially supported anymore. -- resolution: - wont fix stage: - committed/rejected status:

[issue12872] --with-tsc crashes on ppc64

2011-08-31 Thread Dave Malcolm
New submission from Dave Malcolm dmalc...@redhat.com: On 64-bit PPC builds configured --with-tsc, Python segfaults within the first function call in the bytecode interpreter. Upon investigation this is due to this code in Python/ceval.c: 32 typedef unsigned long long uint64; 33

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-08-31 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I don’t see why. All text is bytes, so we can do all I/O in bytes when writing resources and avoid special-casing. I was only commenting on how the bug might have come about. A link to a specific changeset or file would be great.

[issue12873] 2to3 incorrectly handles multi-line imports from __future__

2011-08-31 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: $ cat test1.py from __future__ import (absolute_import, division, print_function, unicode_literals) print(1, 2) $ cat test2.py from __future__ import (absolute_import, division, print_function,

[issue12874] Rearrange descriptions of builtin types

2011-08-31 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Section 4 of the Standard Library reference currently includes the two following sections (amongst others): 4.6. Sequence Types — str, bytes, bytearray, list, tuple, range 4.9. memoryview type This is crazy - memoryview, a fairly niche

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- title: Rearrange descriptions of builtin types - Rearrange descriptions of builtin types in the Library reference ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12874

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12874 ___ ___ Python-bugs-list

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Better titles for the proposed new sections: 4.7 Text Data - str 4.8 Binary Data - bytes, bytearray, memoryview -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12874

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: I agree on the subdivision, but I think they should still be grouped together somehow, since these all really *do* share some interfaces: __getitem__ (with slicing), __iter__, __len__, at least; arguably __contains__; probably some others

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Putting the new sections on tier 2 makes a big difference in discoverability, since that's the lowest level the main ToC page shows. Perhaps just including the phrase Sequence Type in the new section titles would provide enough logical

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: That sounds fine. Or list most of them at tier 2: 4.6 Sequence Types - list, tuple, range, str, bytes and friends 4.6.1 Sequence containers - list, tuple, range 4.6.2 Text Sequence Type - str 4.6.3 Binary Data Sequence Types - bytes,

[issue12472] Build failure on IRIX

2011-08-31 Thread kais58
kais58 kai...@sucs.org added the comment: Apologies for not getting back to you sooner, I discovered some more pressing issues with the machine regarding gcc, I'll try and fix/hack it together as I have found some possible fixes for the headers. --

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: 'Sequence Types - list, tuple, str, bytes, etc' *might* work, but I think part of the problem is that str's brevity is actually a downside in this case. I know I missed it when I was scanning the ToC earlier (I wanted to check if the internal

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: How about list, tuple, text and binary strings ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12874 ___

[issue12874] Rearrange descriptions of builtin types in the Library reference

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I believe this is a duplicate of #4966. -- nosy: +ezio.melotti resolution: - duplicate stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4966] Improving Lib Doc Sequence Types Section

2011-08-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Bringing a suggestion over from #12874, I think it may be worth splitting the current Sequence Types section into 3 pieces that all appear in the top level table of contents for the library reference: 4.6 Sequence Types - list, tuple, range

[issue12720] Expose linux extended filesystem attributes

2011-08-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4eb0b1819bda by Benjamin Peterson in branch 'default': expose linux extended file system attributes (closes #12720) http://hg.python.org/cpython/rev/4eb0b1819bda -- nosy: +python-dev resolution: - fixed

[issue6676] expat parser throws Memory Error when parsing multiple files

2011-08-31 Thread David H. Gutteridge
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: Ned: My proposed wording is: Note that only one document can be parsed by a given instance; it is not possible to reuse an instance to parse multiple files. To provide more detail, one could also add something like: The isfinal

[issue6560] socket sendmsg(), recvmsg() methods

2011-08-31 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon resolution: fixed - stage: committed/rejected - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560 ___

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-31 Thread David H. Gutteridge
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: Okay. I'd seen the earlier issue, but had submitted this separately because I wasn't sure if it was a security-related bug, whereas the older issue didn't mention anything of the sort. (In retrospect, I could've just added to

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-08-31 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: The second patch looks good. Tests? I think it would be better to kill the process than to let it carry on. But, it *probably* shouldn't be applied to 2.7 3.2 given that it is a behaviour change. --

[issue6069] casting error from ctypes array to structure

2011-08-31 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Hmmm ... Assuming a native VC++ compiler on an x86 machine running Windows, then it doesn't make sense to validate these test cases in such an environment. All the tests are all big-endian. 'ctypes' can't be expected to behave the same as

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2011-08-31 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: This is now generating a compiler warning under OS X because the older POSIX standard is followed where socklen_t can be unsigned. Attached is a patch to cast msg_controllen to a size big enough to hold either signed 2**31-1 or unsigned 2**32-1

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Eli Bendersky
New submission from Eli Bendersky eli...@gmail.com: In the 2.7 docs, re.compile has this signature: re.compile(pattern[, flags]) From here it isn't clear what the default value of 'flags' is, to be able to write code like this: re.compile(pattern, re.I if options['ignore_case'] else

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I don't think you are missing anything, but using ints instead of flags is discouraged (see #11957). OTOH there's no re.NOFLAGS flag that can be used instead. -- ___ Python tracker

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: Hi, without-threads, it segfault: $ ./python -c import faulthandler; faulthandler.enable(); faulthandler._stack_overflow(); echo $? Fatal Python error: Segmentation fault Current thread 0x: File string, line 1 in module zsh:

[issue12868] test_faulthandler.test_stack_overflow() failed on OpenBSD

2011-08-31 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: However, if I run test_faulthandler.py, it seems to be ok: $ ./python Lib/test/test_faulthandler.py test_disable (__main__.FaultHandlerTests) ... ok test_dump_traceback (__main__.FaultHandlerTests) ... ok test_dump_traceback_file

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Two more things: 1) Python 2 doc used to use the func(arg[, optional1[, optional2]]) notation, and with Python 3 we switched to func(arg, optional1=default1, optional2=default2). The latter is also used in Python 2 now, and the [] are