[issue6251] c++ extension module implementation guide/example in extending/embedding documentation

2009-06-10 Thread John O'Driscoll
John O'Driscoll added the comment: I'm aware of Boost without being familiar. I should find out more. I don't have any reason to think it might not be the better approach. I guess when I wrote this I was thinking in terms of minimising dependencies: writing a program that depended only on the

[issue6252] logging midnight rotation

2009-06-10 Thread Turnaev Evgeny
Turnaev Evgeny added the comment: I am sorry for my poor english. You must be misunderstood me. I attached a file try it like this: wget -o /dev/null http://localhost:9022/ then 5-7 times wget -o /dev/null http://localhost:9022/s then 4-5 times wget -o /dev/null http://localhost:9022/ i bet

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Naoki INADA
Naoki INADA added the comment: You're right. PyInt_FromSize_t() isn't safe for unsigned long. > Maybe a PyInt_FromUnsignedLong method would be useful? It would be trivial to > implement. I hope that all of py3k's PyInt_From** are in Python 2.x. It makes maintaining extension module for both

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Right. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: Regardless of whether the extra wording is added or not, the docstring for random.uniform should probably be changed to match the online documentation. It currently says: """Get a random number in the range [a, b).""" That should probably be: """Get a rand

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: georg.brandl -> rhettinger nosy: +rhettinger priority: -> low ___ Python tracker ___ ___ P

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Mark Dickinson
New submission from Mark Dickinson : The documentation for random.uniform() was recently updated to reflect the fact that it's possible for random.uniform(a, b) to produce the value b; see issue 4979. In a recent c.l.p. thread, Robert Kern suggested that 'it might be confusing to a user why

[issue6258] distributions built with bdist_msi on 64-bit Windows fail to install correctly

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm adding Martin to this as he appears to be the author of msilib. If it's inappropriate for me to do this, I apologize. Just let me know and I won't do it again. -- nosy: +loewis ___ Python tracker

[issue6258] distributions built with bdist_msi on 64-bit Windows fail to install correctly

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: Based on the MSDN article and what I read in a blog entry (http://blogs.msdn.com/heaths/archive/2005/10/24/windows-installer-on-64-bit-platforms.aspx), I thought that the enclosed patch might work around the issue... and while it does set the template property

[issue6258] distributions built with bdist_msi on 64-bit Windows fail to install correctly

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: Indeed, I confirmed that using the simple example from the distutils manual (http://docs.python.org/distutils/introduction.html#a-simple-example) on a clean install of Python 2.6.2, bdist_msi exhibits the behavior previously described. I suspect that the Ta

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: It seems to me that PyInt_FromSize_t() wouldn't be the right way to create a Python int from a C unsigned long anyway, since there's no guarantee that C's unsigned long and size_t have the same precision. (I'm not disputing that PyInt_FromSize_t should be do

[issue6260] os.utime should allow None values for ATIME or MTIME

2009-06-10 Thread James
New submission from James : Hi, in using os.utime, it's nice that you can specify `None' for the second argument. However it would be even `nicer' to be able to specify None for either (or potentially both) values for the argument in the tuple. to emulate this, i've been using os.stat to read the

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
Michael K Johnson added the comment: We are doing output, and mode='w|' works. We were using tarfile.TarFile, not realizing that the default constructor was an unsupported and deprecated interface (!?!) -- status: open -> closed ___ Python tracker

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
Changes by Thomas Heller : -- assignee: -> theller components: +ctypes versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-li

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
New submission from Thomas Heller : This patch implements some pointer arithmetic operations for ctypes. -- files: ctypes-pointerarith.patch keywords: patch messages: 89225 nosy: theller severity: normal status: open title: ctypes pointer arithmetic type: behavior versions: Python 2.7 Ad

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Lars Gustäbel
Lars Gustäbel added the comment: If I am not mistaken the functionality you look for is the streaming mode of tarfile.open(): tar = tarfile.open(fileobj=sys.stdin, mode="r|*") Does this solve your problem? -- assignee: -> lars.gustaebel nosy: +lars.gustaebel

[issue1254718] GCC detection for runtime_library_dirs when ccache is used

2009-06-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue1254718] GCC detection for runtime_library_dirs when ccache is used

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: min() is a substitute for all() and max() is a substitute for any(). They are O(n) but do not have the early out behavior of any() and all(). -- ___ Python tracker _

[issue1254718] GCC detection for runtime_library_dirs when ccache is used

2009-06-10 Thread Jason Kankiewicz
Jason Kankiewicz added the comment: Seo, This ticket specifies Python-2.6 as the only version so using "any" didn't seem to be a problem. I was not aware of PEP 291 until you mentioned it and, in order to maintain compatibility with Python-2.3, the generator expression would have to be dispense

[issue6258] distributions built with bdist_msi on 64-bit Windows fail to install correctly

2009-06-10 Thread Jason R. Coombs
New submission from Jason R. Coombs : It appears as if bdist_msi isn't properly tagging 64-bit binary builds. When launching an .msi built by Python 2.6.2 using bdist_msi, such as numpy found here (https://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103), it improperly dete

[issue1069410] import on Windows: please call SetErrorMode first

2009-06-10 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: i.e., fixed in r60221 -- nosy: +srid ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue2320] Race condition in subprocess using stdin

2009-06-10 Thread Robert Cronk
Robert Cronk added the comment: Could this problem be associated with issue4749? It was found that something goes wrong when two cmd children processes are spawned from different threads, when the first exits, it is closing file handles shared with the first (or something like that) and it's

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk added the comment: One more possibly related bug is issue2320 where subprocesses are spawned from multiple threads. They found an interesting workaround that I found seems to help our problem too: "on Windows, if close_fds is true then no handles will be inherited by the child p

[issue6257] Idle terminates on source save while debugging

2009-06-10 Thread Andy Harrington
New submission from Andy Harrington : When I am running the idle debugger, and change something in a source file and save it, the save works but idle immediately closes. I can see the debugger not liking it, but it would be much better if just the debugger stopped, not the whole idle environmen

[issue6250] Python compiles dead code

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like the patch is extensive and well thought out. I look forward to going through it in detail. -- ___ Python tracker ___ _

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk added the comment: I found Issue1425127 which may be a different symptom of this core problem. I suggested that we create a bug that documents the core problem here as described by Vinay in msg89174 and links to these two bugs (along with any others we find) as examples of the t

[issue1425127] os.remove OSError: [Errno 13] Permission denied

2009-06-10 Thread Robert Cronk
Robert Cronk added the comment: Could this problem be associated with issue4749? It was found that something goes wrong when two cmd children processes are spawned from different threads, when the first exits, it is closing file handles shared with the first (or something like that) and it's

[issue6250] Python compiles dead code

2009-06-10 Thread Collin Winter
Collin Winter added the comment: As another data point, Unladen Swallow had to take explicit steps to deal with this dead code when compiling bytecode to machine code. Since Python's compiler isn't smart enough to ignore code following a "return" or "raise" in the same suite, support for that ha

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Vinay Sajip
Vinay Sajip added the comment: You may want to re-test with Popen(..., close_fds=True) with the latest Python 2.6. From the latest docs: http://docs.python.org/library/subprocess.html "If close_fds is true, all file descriptors except 0, 1 and 2 will be closed before the child process is execu

[issue6256] Wrong stacklevel in warning for contextlib.nested

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed. r7 and r73334 -- assignee: -> rhettinger nosy: +rhettinger resolution: -> accepted status: open -> closed ___ Python tracker __

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk added the comment: I changed the script to use subprocess (attached file) and got the same rollover errors as before. I had to change cd and del to be cd.bat and del.bat which contained cd %1 and del %1 respectively since it appears subprocess can't run internal commands like cd

[issue6256] Wrong stacklevel in warning for contextlib.nested

2009-06-10 Thread Hagen Fürstenau
New submission from Hagen Fürstenau : This leads to unhelpful warnings: >>> with contextlib.nested(open("x", "w")) as f: pass ... /usr/local/lib/python3.1/contextlib.py:17: DeprecationWarning: With-statements now directly support multiple context managers return next(self.gen) Patch is attac

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Naoki INADA
New submission from Naoki INADA : PyInt_FromSize_t() is not in Python/C API document. People seeing document may be not able to find how to make int from unsigned long. -- assignee: georg.brandl components: Documentation messages: 89208 nosy: georg.brandl, naoki severity: normal status:

[issue6252] logging midnight rotation

2009-06-10 Thread Vinay Sajip
Vinay Sajip added the comment: I'm unable to reproduce this problem with Python 2.5.2 on either Windows XP or Ubuntu Hardy. I used a test script (httpd.py, attached). This sets up an HTTP server which you can use to trigger logging events. I created a time simulator to allow testing in a timel

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
New submission from Michael K Johnson : In python 2.6 (not 2.4, haven't checked 2.5), the __init__() method of the TarFile class calls the tell() method on the tar file, which doesn't work if you are reading from standard input or writing to standard output, two very reasonable things to do with

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo : Added file: http://bugs.python.org/file14257/fix_optparse_usage_formatter2.diff ___ Python tracker ___ ___ Python-bug

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo : Removed file: http://bugs.python.org/file14256/fix_optparse_usage_formatter2.diff ___ Python tracker ___ ___ Python-

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-10 Thread OG7
OG7 added the comment: Closing the stdin fd without closing the stdin file is very dangerous. It means that stdin will now access some random resource, for example, a pipe created with os.pipe(). Closing stdin is useful to let the parent be alone in reading from it. It can be achieved by replac

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Jan Pobrislo added the comment: On second thought method name starting with get_ doesn't signify any formatting, so it might be better to either: 1) Move call to formatter.format_usage from get_usage directly to format_help. 2) Create method format_usage in OptionParser and call it from there.

[issue6247] should we include argparse

2009-06-10 Thread Eric Smith
Eric Smith added the comment: I'll take a look at it. I've been meaning to use argparse, anyway. -- nosy: +eric.smith ___ Python tracker ___ _

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo : Removed file: http://bugs.python.org/file14254/fix_optparse_usage_formatter.diff ___ Python tracker ___ ___ Python-bu

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo : Added file: http://bugs.python.org/file14255/fix_optparse_usage_formatter.diff ___ Python tracker ___ ___ Python-bugs

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
New submission from Jan Pobrislo : When using OptionParser.format_help(formatter), the formatter parameter should be used to format all of the help message. This is not the case for usage message, as the method get_usage() is not passed the formatter and always uses self.formatter. I'm using pyth

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Lowell Alleman
Lowell Alleman added the comment: I must say that Vinay's findings are most interesting. Thanks Vinay for tracking this down! Just a thought, but has anybody tried this using the subprocess module? I've glanced through subprocess.py and it certainly does not use os.system(). Instead it uses

[issue6247] should we include argparse

2009-06-10 Thread Steven Bethard
Steven Bethard added the comment: On Tue, Jun 9, 2009 at 11:45 PM, Martin v. Löwis wrote: > It would be useful if several people could confirm that argparse > is *not* horribly designed. A totally reasonable request. Anyone willing to evaluate this can take a look at: http://argparse.googlecod

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-10 Thread Pablo Torres Navarrete
Pablo Torres Navarrete added the comment: Wouldn't it be more pythonic to just try sys.stdin.fileno() and catch the AtributeError too? def _bootstrap(self): try: os.close(sys.stdin.fileno()) except AtributeError: sys.stdin.clo

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-10 Thread Graham Dumpleton
Graham Dumpleton added the comment: Worth noting is that Python documentation in: http://docs.python.org/library/stdtypes.html says: """ file.fileno() Return the integer “file descriptor” that is used by the underlying implementation to request I/O operations from the operating system. This

[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-06-10 Thread Floris Bruynooghe
Floris Bruynooghe added the comment: Hi What's the status of this? I haven't seen a commit message regarding this. Cheers -- ___ Python tracker ___ ___

[issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get())

2009-06-10 Thread OG7
OG7 added the comment: Issue 5313 seems to be the culprit. -- nosy: +OG7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-10 Thread OG7
OG7 added the comment: Using sys.stdin.close() fixes issues 5155 and 5331. -- nosy: +OG7 ___ Python tracker ___ ___ Python-bugs-list m

[issue5331] multiprocessing hangs when Pool used within Process

2009-06-10 Thread OG7
OG7 added the comment: It seems the root cause is at http://bugs.python.org/issue5155 . A workaround is to use a duplex Pipe in SimpleQueue. -- ___ Python tracker ___ ___

[issue6251] c++ extension module implementation guide/example in extending/embedding documentation

2009-06-10 Thread Skip Montanaro
Changes by Skip Montanaro : -- nosy: +skip.montanaro ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue6252] logging midnight rotation

2009-06-10 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vsajip nosy: +vsajip title: logging midnigh rotation -> logging midnight rotation ___ Python tracker ___

[issue6251] c++ extension module implementation guide/example in extending/embedding documentation

2009-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Did you take a look at Boost.Python? This is a much more natural (from C++ point of view) way to create Python types. All boilerplate code comes from template techniques (creation/destruction, static methods...) The tutorial is interesting: http://www.boo

[issue5331] multiprocessing hangs when Pool used within Process

2009-06-10 Thread Gabriel de Perthuis
Gabriel de Perthuis added the comment: Apparently the pool workers die all at once, just after the pool creates them and before the pool is used. I added a few lines to multiprocessing/pool.py to get the stack and the exception backtrace. except (EOFError, IOError): import t

[issue6252] logging midnigh rotation

2009-06-10 Thread Turnaev Evgeny
New submission from Turnaev Evgeny : i have a very basic setup of logging in a long running daemon app.. I use TimedRotatingFileHandler with rotating at midnight. The bug: The last open logging file was for 2009-05-25.. app was running without logging anything for about a week or more. After a we

[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-10 Thread Jeremy Thurgood
Changes by Jeremy Thurgood : -- nosy: +jerith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue6251] c++ extension module implementation guide/example in extending/embedding documentation

2009-06-10 Thread John O'Driscoll
New submission from John O'Driscoll : feature: extension module C++ howto/example in extending-embedding/c-api documentation why:The embedding/extension documentation states that module implementation in c++ is possible, without providing any guidance beyond this. Coders more familiar/comfo

[issue6247] should we include argparse

2009-06-10 Thread Ritesh Raj Sarraf
Ritesh Raj Sarraf added the comment: I'm not sure about the design part, but as a user, I find both to have very similar interfaces. argparse is better because it handles nargs=*. This has long been asked in optparse. Positional arguments is something I wanted recently, and argparse makes it ve

[issue6006] ffi.c compile failures on AIX 5.3 with xlc

2009-06-10 Thread rubisher
rubisher added the comment: Having a look at gcc libffi is wel available for Aix, though? That said, I just need python for bzr and associated tools to maintain localy a small number of script, so imho I would be abl