[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The problem may occur just because of the way file handles work with child processes. I'm not sure if it's a bug, or even if it's specific to Python, so I'm not going to raise another issue. It's worth searching to see if there's an existing

[issue6249] Error Prompt

2009-06-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Please consult a Python mailing list or newsgroup to learn how to use the command box. This is not a Python bug. -- nosy: +georg.brandl resolution: - invalid status: open - closed ___ Python tracker

[issue6250] Python compiles dead code

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: We've rejected dead-code elimination in the past (too much effort for nearly zero benefit). Will take a look at your patch though. -- assignee: - rhettinger nosy: +rhettinger priority: - low type: - performance

[issue6247] should we include argparse

2009-06-10 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Steven Bethard wrote: In particular, the optparse extension API is horribly designed, and exposes so many internals of optparse that it's nearly impossible to add any new features to optparse without breaking this. It would be useful if

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

2009-06-10 Thread rubisher
rubisher rubis...@scarlet.be added the comment: Having a look at http://www- 03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html 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

[issue6247] should we include argparse

2009-06-10 Thread Ritesh Raj Sarraf
Ritesh Raj Sarraf r...@researchut.com 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

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

2009-06-10 Thread John O'Driscoll
New submission from John O'Driscoll biggerbu...@yahoo.co.in: 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.

[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-10 Thread Jeremy Thurgood
Changes by Jeremy Thurgood fir...@gmail.com: -- nosy: +jerith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6232 ___ ___ Python-bugs-list mailing

[issue6252] logging midnigh rotation

2009-06-10 Thread Turnaev Evgeny
New submission from Turnaev Evgeny xi...@yandex.ru: 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

[issue5331] multiprocessing hangs when Pool used within Process

2009-06-10 Thread Gabriel de Perthuis
Gabriel de Perthuis ony...@users.sourceforge.net 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,

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

2009-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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

[issue6252] logging midnight rotation

2009-06-10 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vsajip nosy: +vsajip title: logging midnigh rotation - logging midnight rotation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6252

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

2009-06-10 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6251 ___ ___ Python-bugs-list

[issue5331] multiprocessing hangs when Pool used within Process

2009-06-10 Thread OG7
OG7 ony...@users.sourceforge.net 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 rep...@bugs.python.org http://bugs.python.org/issue5331

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

2009-06-10 Thread OG7
OG7 ony...@users.sourceforge.net added the comment: Using sys.stdin.close() fixes issues 5155 and 5331. -- nosy: +OG7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5313 ___

[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 ony...@users.sourceforge.net added the comment: Issue 5313 seems to be the culprit. -- nosy: +OG7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5155 ___

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

2009-06-10 Thread Floris Bruynooghe
Floris Bruynooghe floris.bruynoo...@gmail.com added the comment: Hi What's the status of this? I haven't seen a commit message regarding this. Cheers -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5201

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

2009-06-10 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com 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

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

2009-06-10 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com 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:

[issue6247] should we include argparse

2009-06-10 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: On Tue, Jun 9, 2009 at 11:45 PM, Martin v. Löwisrep...@bugs.python.org 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

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Lowell Alleman
Lowell Alleman lowel...@gmail.com 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

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
New submission from Jan Pobrislo c...@volny.cz: 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.

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

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

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo c...@volny.cz: Removed file: http://bugs.python.org/file14254/fix_optparse_usage_formatter.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6253 ___

[issue6247] should we include argparse

2009-06-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'll take a look at it. I've been meaning to use argparse, anyway. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6247

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Jan Pobrislo c...@volny.cz 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

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

2009-06-10 Thread OG7
OG7 ony...@users.sourceforge.net 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.

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

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

[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2009-06-10 Thread Jan Pobrislo
Changes by Jan Pobrislo c...@volny.cz: Added file: http://bugs.python.org/file14257/fix_optparse_usage_formatter2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6253 ___

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
New submission from Michael K Johnson a1237+pyb...@danlj.org: 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

[issue6252] logging midnight rotation

2009-06-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk 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

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Naoki INADA
New submission from Naoki INADA songofaca...@gmail.com: 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

[issue6256] Wrong stacklevel in warning for contextlib.nested

2009-06-10 Thread Hagen Fürstenau
New submission from Hagen Fürstenau hfuerste...@gmx.net: 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)

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com 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

[issue6256] Wrong stacklevel in warning for contextlib.nested

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed. r7 and r73334 -- assignee: - rhettinger nosy: +rhettinger resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk 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

[issue6250] Python compiles dead code

2009-06-10 Thread Collin Winter
Collin Winter coll...@gmail.com 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,

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

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com 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

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com 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

[issue6250] Python compiles dead code

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org

[issue6257] Idle terminates on source save while debugging

2009-06-10 Thread Andy Harrington
New submission from Andy Harrington ahar...@luc.edu: 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

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com 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

[issue2320] Race condition in subprocess using stdin

2009-06-10 Thread Robert Cronk
Robert Cronk cron...@gmail.com 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

[issue1069410] import on Windows: please call SetErrorMode first

2009-06-10 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: i.e., fixed in r60221 -- nosy: +srid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1069410 ___

[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 jar...@jaraco.com: 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=1369package_id=175103),

[issue1254718] GCC detection for runtime_library_dirs when ccache is used

2009-06-10 Thread Jason Kankiewicz
Jason Kankiewicz jkankiew...@acm.org 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

[issue1254718] GCC detection for runtime_library_dirs when ccache is used

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1254718 ___ ___ Python-bugs-list

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de 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

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: 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

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- assignee: - theller components: +ctypes versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6259 ___

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6259 ___ ___

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
Michael K Johnson a1237+pyb...@danlj.org 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

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

2009-06-10 Thread James
New submission from James purplei...@gmail.com: 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

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com 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

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

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com 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

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

2009-06-10 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com 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

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: 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

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: georg.brandl - rhettinger nosy: +rhettinger priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6261

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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:

[issue6261] Clarify behaviour of random.uniform

2009-06-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Right. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6261 ___ ___

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-10 Thread Naoki INADA
Naoki INADA songofaca...@gmail.com 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

[issue6252] logging midnight rotation

2009-06-10 Thread Turnaev Evgeny
Turnaev Evgeny xi...@yandex.ru 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