[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-30 Thread Charles-François Natali
Charles-François Natali added the comment: > I think that the problem is that fdopendir() is not defined. If a function is > not defined, C uses int as the result type. An int is not enough to store a > 64-bit pointer. See in gdb output: dirp is 0x0afb0e80 whereas other pointers > look like 0

[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: >> I tried "AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features >> from IEEE Stds 1003.1-2008)" but it doesn't work. > > You mean that the patch you attached doesn't work, correct? I ran autoconf, re-ran configure and it doesn't work. You can test

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: > Would it be better to put this note in a different place? You may just say that StreamReader.readline() uses unicode.splitlines(), and so point to unicode.splitlines() doc (use :meth:`unicode.splitlines` syntax). unicode.splitlines() is now well documented:

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Unicode versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mail

[issue7171] Add inet_ntop and inet_pton support for Windows

2011-08-30 Thread honglei jiang
Changes by honglei jiang : -- nosy: +honglei.jiang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue10278] add time.wallclock() method

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: I think that we should process in two steps: * Expose low level C functions * Write a high level reusing the best low level function depending on the OS Low level functions: * Expose clock_gettime() into the time module, with CLOCK_MONOTONIC and CLOCK_MONOTO

[issue10278] add time.wallclock() method

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: Note: it would be very pratical if time.monotonic() has always the same unit on all platforms. clock_gettime() uses seconds (and nanoseconds), time.clock() uses also seconds. -- ___ Python tracker

[issue12857] Expose called function on frame object

2011-08-30 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12850] [PATCH] stm.atomic

2011-08-30 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-30 Thread Remi Pointel
Remi Pointel added the comment: Hi, this is the result of gcc -E on Modules/posixmodule.o, asked by haypo. Thanks for your help, Cheers, Remi. -- Added file: http://bugs.python.org/file23072/gcc-E-Modules_posixmodule_output ___ Python tracker

[issue12850] [PATCH] stm.atomic

2011-08-30 Thread Nick Coghlan
Nick Coghlan added the comment: Nothing specific, just a reflexive C++ induced dislike for linker-accessible globals in general. However, while I slightly prefer the function driven API, I wouldn't actively oppose direct linker access if someone else wanted to check it in :) --

[issue10278] add time.wallclock() method

2011-08-30 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: The problem with QueryPerformanceCounter is that it drifts. It has high resolution, but can drift far out of sync with GetTickCount64. The best solutions on windows combine the two, but that's tricky to impolement. QPC will wrap, but only after a long

[issue11682] PEP 380 reference implementation for 3.3

2011-08-30 Thread Nick Coghlan
Nick Coghlan added the comment: The pep380 branch in my bitbucket repo has been updated with the refactored tests that Ryan Kelly put together at the PyconAU sprints (as well as being brought up to speed with 3.x tip). The update depends on the new dis.get_opinfo() API added by issue #11816 (

[issue12850] [PATCH] stm.atomic

2011-08-30 Thread Armin Rigo
Armin Rigo added the comment: Ok, I followed Nick's suggestion, and I finally found out how to write the code in order to avoid all (or most?) deadlocks without any change in the rest of CPython. It requires a way to be sure that some callback function is invoked _at the next cross-bytecode

[issue10946] bdist doesn’t pass --skip-build on to subcommands

2011-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 326a7e44bb66 by Éric Araujo in branch '3.2': Make bdist_* commands respect --skip-build passed to bdist (#10946) http://hg.python.org/cpython/rev/326a7e44bb66 New changeset 2f69b4f3df2e by Éric Araujo in branch 'default': Merge fix for #10946 from

[issue10946] bdist doesn’t pass --skip-build on to subcommands

2011-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ff92eb1a915 by Éric Araujo in branch '2.7': Make bdist_* commands respect --skip-build passed to bdist (#10946) http://hg.python.org/cpython/rev/4ff92eb1a915 -- ___ Python tracker

[issue9041] raised exception is misleading

2011-08-30 Thread Meador Inge
Meador Inge added the comment: That is a good question. While it is true that errors other than 'PyExc_OverflowError', will be mapped onto a 'TypeError' I don't think that is a bad thing. Any errors that come out of 'PyFloat_AsDouble' should be handled on a case-by-case basis and not blindl

[issue12858] crypt.mksalt: use ssl.RAND_pseudo_bytes() if available

2011-08-30 Thread STINNER Victor
New submission from STINNER Victor : A salt doesn't need to be strong random bits, but I'm not sure that Mersenne Twister is a best candidate to generate salt. It would be nice to use ssl.RAND_pseudo_bytes() if available. Problem: implement random.choice() from a generator generating bytes =>

[issue12858] crypt.mksalt: use ssl.RAND_pseudo_bytes() if available

2011-08-30 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +jafo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue12754] Add alternative random number generators

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: Before trying to find the best (CS)PRNG, can't we start with ssl.RAND_bytes() and ssl.RAND_pseudo_bytes()? I would be nice to use ssl.RAND_pseudo_bytes() to generate crypt.mksalt(): see issue #12858 -- ___ Python t

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Matthew Boehm added the comment: I can fix the patch to list all the unicode line boundaries. The three places I've considered putting it are: 1. On the howto/unicode.html 2. Somewhere in the stdtypes.html#typesseq description (maybe with other notes at the bottom) 3. As a note to the stdty

[issue10946] bdist doesn’t pass --skip-build on to subcommands

2011-08-30 Thread Éric Araujo
Éric Araujo added the comment: I simplified my patch and pushed it. I had to discover again that I needed to inject customized command objects into dist.command_obj, like you found out a few months ago when we had a private email discussion :) > Using set_undefined_options in install_* is de

[issue12759] "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception

2011-08-30 Thread Éric Araujo
Éric Araujo added the comment: Great! Feel free to ask any questions here or through the core-mentorship mailing list. Remember to read the devguide and work from a Mercurial clone of Python 3.2. Thanks! -- ___ Python tracker

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: > 1. On the howto/unicode.html > 2. Somewhere in the stdtypes.html#typesseq description (maybe with other > notes at the bottom) > 3. As a note to the stdtypes.html#str.splitlines method description (where it > is in the previous patch.) (3) is the best place

[issue2945] bdist_rpm does not list dist files (should effect upload)

2011-08-30 Thread Éric Araujo
Éric Araujo added the comment: Even thought bdist_rpm is gone from distutils2, this is a bug that can be fixed in distutils. Adding the easy keyword to let potential contributors find this bug; hint: look at how bdist_dumb registers distributions with dist.dist_files. -- keywords: +e

[issue12853] global name 'r' is not defined in upload.py

2011-08-30 Thread Éric Araujo
Éric Araujo added the comment: Does it work if you replace r with result? -- versions: -Python 3.2, Python 3.3 ___ Python tracker ___ __

[issue9041] raised exception is misleading

2011-08-30 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: -eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2011-08-30 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo, haypo versions: +Python 3.3 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

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

2011-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: My understanding is that what you did: import xml.parsers.expat is now the proper way to use expat. After some searching, it seems the sentence about direct use of pyexpat being deprecated refers to http://sourceforge.net/tracker/?func=detail&aid=2745230&group_

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

2011-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seems to be a Mac-only issue. Barry, does this seem to be a security issue to you, or should we delete 2.6 from the versions? -- assignee: -> ronaldoussoren components: +Macintosh nosy: +barry, ned.deily, ronaldoussoren

[issue12555] PEP 3151 implementation

2011-08-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23074/8a0e40f4f004.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12555] PEP 3151 implementation

2011-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a new patch implementing the latest PEP changes. -- ___ Python tracker ___ ___ Python-bugs-

[issue12859] readline implementation doesn't release the GIL

2011-08-30 Thread Albert Zeyer
New submission from Albert Zeyer : Modules/readline.c 's `call_readline` doesn't release the GIL while reading. -- messages: 143226 nosy: Albert.Zeyer priority: normal severity: normal status: open title: readline implementation doesn't release the GIL versions: Python 2.7 _

[issue12860] http client attempts to send a readable object twice

2011-08-30 Thread Lang Martin
New submission from Lang Martin : on line 765 of client/http.py, the client loops over the read method, sending it's content to the web server. It appears as though the send method should return at this point; instead it falls through and attempts to send the data object through first self.soc

[issue12859] readline implementation doesn't release the GIL

2011-08-30 Thread Albert Zeyer
Albert Zeyer added the comment: Whoops, sorry, invalid. It doesn't need to. It is handled in PyOS_Readline. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue12861] PyOS_Readline uses single lock

2011-08-30 Thread Albert Zeyer
New submission from Albert Zeyer : In Parser/myreadline.c PyOS_Readline uses a single lock (`_PyOS_ReadlineLock`). I guess it is so that we don't have messed up stdin reads. Or are there other technical reasons? However, it should work to call this function from multiple threads with differen

[issue12862] ConfigParser does not implement "comments need to be preceded by a whitespace character" correctly

2011-08-30 Thread Daniel Fortunov
New submission from Daniel Fortunov : ConfigParser does not implement "comments need to be preceded by a whitespace character" correctly and in most cases will treat a value beginning with a comment character as a comment, even though it is not preceded by a whitespace character. The ConfigPa

[issue12844] Support more than 255 arguments

2011-08-30 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12861] PyOS_Readline uses single lock

2011-08-30 Thread Albert Zeyer
Albert Zeyer added the comment: Ok, it seems that the Modules/readline.c implementation is also not really threadsafe... (Whereby, I think it should be.) -- ___ Python tracker

[issue1462440] socket and threading: udp multicast setsockopt fails

2011-08-30 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue12863] py32 > Lib > xml.minidom > usage feedback > overrides

2011-08-30 Thread GPU Group
New submission from GPU Group : Py32 > Lib > xml.dom.minidom > usage feedback > overrides I like the minidom. I use it -and over-ride the Element.writexml() and _write_data() methods for a few of my Blender.org B259 personal export scripts to formats: .x3d - a www.web3d.org public format, an

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4aa00f465b4f by Amaury Forgeot d'Arc in branch '2.7': Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to http://hg.python.org/cpython/rev/4aa00f465b4f -- ___ Python tracker

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5df1609fbd8f by Amaury Forgeot d'Arc in branch '3.2': Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to http://hg.python.org/cpython/rev/5df1609fbd8f New changeset d8c73a7d65f8 by Amaury Forgeot d'Arc in branch 'default': M

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e23532f694d by Amaury Forgeot d'Arc in branch '3.2': Issue #11241: subclasses of ctypes.Array can now be subclassed. http://hg.python.org/cpython/rev/5e23532f694d -- nosy: +python-dev ___ Python tracker

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-08-30 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2011-08-30 Thread STINNER Victor
STINNER Victor added the comment: > def handler(signal, stackframe): > print "OUCH" > stdout.flush() > _exit(1) 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 ha

[issue12864] 2to3 creates illegal code on import a.b inside a package

2011-08-30 Thread simohe
New submission from simohe : When the current module is in a package and imports submodules, the following lines are converted to illegal code. -import sub.subsub +from . import sub.subsub -import sub, sub.subsub, sub2 +from . import sub, sub.subsub, sub2 A valid alternative: -import sub.sub

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-30 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue12865] import SimpleHTTPServer

2011-08-30 Thread Andrey Men
New submission from Andrey Men : In russian windows seven SP1, x32, installed from 2.7.1/2.7.2 MSI installer: >>> import SimpleHTTPServer Traceback (most recent call last): File "", line 1, in import SimpleHTTPServer File "C:\Python\lib\SimpleHTTPServer.py", line 27, in class Simp

[issue12866] Want to submit our Audioop.c patch for 24bit audio

2011-08-30 Thread Peder Jørgensen
New submission from Peder Jørgensen : Hi, I'm working with audio in python 2.7 and I needed Audioop to work with 24bit files, it currently only supports 8 16 and 32 bit sound files. (24bit files are very common in the audio world) My brother knows c quite well, so he managed to patch it up to sup

[issue12865] import SimpleHTTPServer

2011-08-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is a duplicate of issue9291. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> mimetypes initialization fails on Windows because of non-Latin characters in registry ___

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

2011-08-30 Thread Ned Deily
Ned Deily added the comment: This is the same issue as highlighted by Issue6676. The root cause is attempting to reuse a parser instance and that is known to not work with the version of expat included with Python. Whether the test program crashes with a memory access violation or just uses

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

2011-08-30 Thread Ned Deily
Ned Deily added the comment: I agree that, at a minimum, the documentation should be updated to include a warning about not reusing a parser instance. Whether it's worth trying to plug all the holes in the expat library is another issue (see, for instance, issue12829). David, would you be w

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

2011-08-30 Thread Ned Deily
Ned Deily added the comment: Also, note issue1208730 proposes a feature to expose a binding for XML_ParserReset and has the start of a patch. -- ___ Python tracker ___ _

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

2011-08-30 Thread Martin Pool
Martin Pool added the comment: On 31 August 2011 07:56, STINNER Victor wrote: > > STINNER Victor added the comment: > >> def handler(signal, stackframe): >>     print "OUCH" >>     stdout.flush() >>     _exit(1) > > What do you want to do on a SIGSEGV? On a real fault, you cannot rely on   > P

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Matthew Boehm added the comment: I've attached a patch for 2.7 and will attach one for 3.2 in a minute. I built the docs for both 2.7 and 3.2 and verified that there were no warnings and that the resulting web pages looked okay. Things to consider: * Placement of unicode.splitlines() method:

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Changes by Matthew Boehm : Added file: http://bugs.python.org/file23077/linebreakdoc.v2.py32.patch ___ Python tracker ___ ___ Python-bugs-list

[issue12409] Moving "Documenting Python" to Devguide

2011-08-30 Thread Adam Woodbeck
Changes by Adam Woodbeck : -- nosy: +adam.woodbeck ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue11176] give more meaningful argument names in argparse documentation

2011-08-30 Thread Adam Woodbeck
Changes by Adam Woodbeck : -- nosy: +adam.woodbeck ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-30 Thread Meador Inge
Meador Inge added the comment: Thanks a lot for committing this for me Amaury. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12867] linecache.getline() Returning Error

2011-08-30 Thread Jordan Meyer
New submission from Jordan Meyer : In trying to use the linecache.getline() function to extra data from a plain-text database format that I'm building. Every time I make a call to it (even from the interpreter directly) I get an error like the one below. I believe the problem lies in the linec

[issue12857] Expose called function on frame object

2011-08-30 Thread Eric Snow
Eric Snow added the comment: Thanks for the review, Nick. I'll be uploading a new patch in a couple hours with your recommended fixes. Regarding the comments on python-ideas, would it be better to use a weakref proxy around the function, to help with the reference cycles? That's what I was

[issue12857] Expose called function on frame object

2011-08-30 Thread Eric Snow
Eric Snow added the comment: On second thought, I probably won't be able to get an updated patch tonight. I need to mull over the PyEval_EvalFunction implementation and the interaction with fast_function. -- ___ Python tracker