Re: Playing sounds at time indexes

2010-09-25 Thread OKB (not okblacke)
Thomas Jollans wrote: On Wednesday 22 September 2010, it occurred to OKB (not okblacke) to exclaim: I'm looking for an audio library for Python. I googled and found a few, but none of them seem to have a simple way to play a particular sound file from a particular

Re: inspect.stack() or inspect.currentframe() gives list index out of range error

2010-09-25 Thread deluxstar
On 24 Eylül, 12:39, Peter Otten __pete...@web.de wrote: deluxstar wrote: We have an application working on several servers generally written with Python 2.6 and Twisted 10. The source codes are located in one server and compiled in this server. The compiled files are copied to other

sequence multiplied by -1

2010-09-25 Thread Yingjie Lan
Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to me that there is a more meaningful symantics. Simply put, a sequence multiplied by -1 can give a reversed sequence. Then for any

Re: inspect.stack() or inspect.currentframe() gives list index out of range error

2010-09-25 Thread Steven D'Aprano
On Sat, 25 Sep 2010 00:53:13 -0700, deluxstar wrote: The traceback is: 2010-09-25 10:50:38+0300 [-] Traceback (most recent call last): 2010-09-25 10:50:38+0300 [-] File ../appsrv/lqcommon.py, line 983, in getPRMS 2010-09-25 10:50:38+0300 [-] File /usr/lib/python2.6/inspect.py, line 931,

Re: inspect.stack() or inspect.currentframe() gives list index out of range error

2010-09-25 Thread Wolfgang Rohdewald
On Samstag 25 September 2010, Steven D'Aprano wrote: My guess is that you've copied the .pyc file onto the server, BUT there is also an older version of the .py file there as well. Because the modification date is older than that of the .pyc file, Python executes the compiled code from the

Re: Pyflakes and IPython does not work for Emacs on Windows?

2010-09-25 Thread Thomas Jollans
On Saturday 25 September 2010, it occurred to Dsrt Egle to exclaim: Thanks for your reply, Ben. Actually I have the paths C:\Python25;C: \Python25\Scripts in the %PATH% variable, and the %PYTHONPATH% has the following: [...] Looking at the file

Re: sequence multiplied by -1

2010-09-25 Thread Thomas Jollans
On Saturday 25 September 2010, it occurred to Yingjie Lan to exclaim: Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to me that there is a more meaningful symantics. Um... for

Re: sequence multiplied by -1

2010-09-25 Thread Yingjie Lan
--- On Sat, 9/25/10, Thomas Jollans tho...@jollybox.de wrote: for every list l and integer n = 0:     len(l*n) == len(l)*n Well, this invariance is indeed broken under my proposal. But it is *already broken* in current python3k. However, the following invariance is maintained under my proposal:

Re: SocketServer: replace network by hard drive

2010-09-25 Thread Nobody
On Fri, 24 Sep 2010 19:28:45 +0200, Thomas Jollans wrote: If you're using UNIX, and you don't actually need the stream to be passed via the hard drive (why would you?), but for some reason want to use the file system, look info UNIX/local sockets. But, really, I'm guessing that local TCP

Re: SocketServer: replace network by hard drive

2010-09-25 Thread Thomas Jollans
On Saturday 25 September 2010, it occurred to Nobody to exclaim: On Fri, 24 Sep 2010 19:28:45 +0200, Thomas Jollans wrote: If you're using UNIX, and you don't actually need the stream to be passed via the hard drive (why would you?), but for some reason want to use the file system, look

Re: sequence multiplied by -1

2010-09-25 Thread Stefan Schwarzer
Hi, On 2010-09-25 14:11, Yingjie Lan wrote: Having more than one way of doing things sometimes is good. In my opinion this _isn't_ a situation where it's good. :) L[::-1] is only marginally longer than -1 * L I think this small gain doesn't justify violating this Python Zen rule

Re: sequence multiplied by -1

2010-09-25 Thread Yingjie Lan
Hi, In my opinion this _isn't_ a situation where it's good. :)     L[::-1] is only marginally longer than     -1 * L I think this small gain doesn't justify violating this Python Zen rule (from `import this`):     There should be one-- and preferably only one --obvious way to

solve alphametic puzzles in just 9 lines of code

2010-09-25 Thread Yingjie Lan
Hi, I am teaching Python this semester and as I am trying to explain the code by Raymond Hettinger, I need to make it simpler (this is an introductory course). And it ends up to be just 9 lines of code. Just for fun. See also: http://diveintopython3.org/advanced-iterators.html Regards,

Re: sequence multiplied by -1

2010-09-25 Thread Stefan Schwarzer
Hi, On 2010-09-25 15:54, Yingjie Lan wrote: The first one is simpler (4 chars v.s. 9 chars). One thing is whether a certain form is shorter, another thing to take into account is how often you need the functionality. I thought it was also intuitive because if you multiply a vector by -1, you

Re: sequence multiplied by -1

2010-09-25 Thread Mel
Stefan Schwarzer wrote: On 2010-09-25 15:54, Yingjie Lan wrote: The first one is simpler (4 chars v.s. 9 chars). I thought it was also intuitive because if you multiply a vector by -1, you should get a vector in the reversed direction. But, intuitiveness depends on who you are, what you do,

Re: inspect.stack() or inspect.currentframe() gives list index out of range error

2010-09-25 Thread Terry Reedy
On 9/25/2010 3:53 AM, deluxstar wrote: The traceback is: 2010-09-25 10:50:38+0300 [-] Traceback (most recent call last): 2010-09-25 10:50:38+0300 [-] File ../appsrv/lqcommon.py, line 983, in getPRMS 2010-09-25 10:50:38+0300 [-] File /usr/lib/python2.6/inspect.py, line 931, in getouterframes

Re: sequence multiplied by -1

2010-09-25 Thread Terry Reedy
On 9/25/2010 4:22 AM, Yingjie Lan wrote: Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. This is explicitly documented: Values of n less than 0 are treated as 0 (which yields an empty

Re: sequence multiplied by -1

2010-09-25 Thread Emile van Sebille
On 9/25/2010 10:24 AM Terry Reedy said... On 9/25/2010 4:22 AM, Yingjie Lan wrote: I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. This is explicitly documented: Values of n less than 0 are

Python2.7 on OSX

2010-09-25 Thread Jonas Galvez
Just installed Python2.7 on my OSX Leopard with make altinstall. No missing dependencies, but I have one annoying problem: the delete key prints '^H' on the Python shell. Does anyone know how to fix that? Thanks in advance, -- Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python2.7 on OSX

2010-09-25 Thread Shashwat Anand
On Sun, Sep 26, 2010 at 12:32 AM, Jonas Galvez jo...@codeazur.com.brwrote: Just installed Python2.7 on my OSX Leopard with make altinstall. No missing dependencies, but I have one annoying problem: the delete key prints '^H' on the Python shell. Does anyone know how to fix that? Thanks in

Re: sequence multiplied by -1

2010-09-25 Thread Stefan Schwarzer
Hi Terry, On 2010-09-25 19:24, Terry Reedy wrote: On 9/25/2010 4:22 AM, Yingjie Lan wrote: There is already a builtin reversed() function whose output can be multiplied. Seemingly, it can't: $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type help,

Re: sequence multiplied by -1

2010-09-25 Thread Arnaud Delobelle
On 25 Sep, 09:22, Yingjie Lan lany...@yahoo.com wrote: Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to me that there is a more meaningful symantics. Simply put, a sequence

Re: Learning inheritance

2010-09-25 Thread Niklasro
On Sep 20, 7:39 am, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: Niklasro a écrit : Good to learn what I'm doing :-) since important being able to explain choices taken farther than doing it because it works. I understand the concept of modules may not correspond

Re: Learning inheritance

2010-09-25 Thread Niklasro
On Sep 21, 1:30 am, alex23 wuwe...@gmail.com wrote: Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: alex23 a écrit : Python only actually executes a module the first time it's imported, Beware of multithreading and modules imported under different names... There

Re: SocketServer: replace network by hard drive

2010-09-25 Thread Nobody
On Sat, 25 Sep 2010 14:45:29 +0200, Thomas Jollans wrote: The problem with using the loopback interface is that it's still network access, which can run into all kinds of issues with security policies, firewalls, etc. What kind of crappy firewall blocks loopback traffic? Really? The sort

Re: sequence multiplied by -1

2010-09-25 Thread Steven D'Aprano
On Sat, 25 Sep 2010 13:45:11 +0200, Thomas Jollans wrote: On Saturday 25 September 2010, it occurred to Yingjie Lan to exclaim: Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to

Re: sequence multiplied by -1

2010-09-25 Thread Steven D'Aprano
On Sat, 25 Sep 2010 06:54:36 -0700, Yingjie Lan wrote: For the rule above, how about the case to reverse and multiply: L*-3 #L reversed and repeated three times v.s. L[::-1]*3 #L reversed and repeated three times The first one is simpler (4 chars v.s. 9 chars). I thought it was also

Re: sequence multiplied by -1

2010-09-25 Thread Yingjie Lan
Hi all, Thanks for considering this proposal seriously and all your discussions shed light on the pro's and cons (well, more cons than pros, to be honest). It occurrs to me that this proposal is not a sound one, for the reasons already well documented in this thread, which I need not repeat.

Re: solve alphametic puzzles in just 9 lines of code

2010-09-25 Thread Yingjie Lan
Sorry, didn't document my code well enough. Here is the code with an example. Yingjie #Code begins### from itertools import permutations def solve(puzzle): solve alphametic puzzles in just 9 lines of code. Make sure each operator is seperated from the words by

toy list processing problem: collect similar terms

2010-09-25 Thread Xah Lee
here's a interesting toy list processing problem. I have a list of lists, where each sublist is labelled by a number. I need to collect together the contents of all sublists sharing the same label. So if I have the list ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2 k l) (4 m n) (2 o p) (4 q r) (5

Re: sequence multiplied by -1

2010-09-25 Thread John Nagle
On 9/25/2010 4:45 AM, Thomas Jollans wrote: On Saturday 25 September 2010, it occurred to Yingjie Lan to exclaim: Hi, I noticed that in python3k, multiplying a sequence by a negative integer is the same as multiplying it by 0, and the result is an empty sequence. It seems to me that there is a

Re: toy list processing problem: collect similar terms

2010-09-25 Thread Gary Herron
On 09/25/2010 09:05 PM, Xah Lee wrote: here's a interesting toy list processing problem. I have a list of lists, where each sublist is labelled by a number. I need to collect together the contents of all sublists sharing the same label. So if I have the list ((0 a b) (1 c d) (2 e f) (3 g h) (1

Re: toy list processing problem: collect similar terms

2010-09-25 Thread Alexander Burger
In PicoLisp: (mapcar '((X) (apply conc (cdr X))) (group List) ) Cheers, - Alex -- http://mail.python.org/mailman/listinfo/python-list

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-25 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Martin Lowis do you mean API when you type SDK? When I said SDK examples, then I really meant examples as published in the SDK, not examples as published in the API (and the SDK documentation, in turn, is published on msdn). But yes, the

[issue9940] Strange error reporting with with statement

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: At least not without losing generality, and we don't like that. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9940 ___

[issue9941] Unify trace and profile interfaces

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Sounds good to me. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9941 ___

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: My first thought is Why is the reference counter stored with the object itself? Because if you move the reference counter out of the object, you a) add another indirection and b) depending on how you implement it require a certain amount of

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-25 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I think the unhelpful part is mostly that it does not distinguish between argument types any more when the distinction is important in this context. In fact, it could be argued that what it said isn't even true: f() takes exactly

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Answering the question as best I can: I don't know how the reference counter is implemented in CPython, but if it's just a field in a struct, then madvise could be sent the memory location starting with the byte immediately following the

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment makes accept() return None in case no connection takes place and modifies the doc to make this very clear, also providing an example on how an asyncore-based server should be properly set-up . -- versions:

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: EAGAIN can be raised too. I never experienced this error condition myself in pyftpdlib From the accept() man page: EAGAIN or EWOULDBLOCK The socket is marked nonblocking and no connections are present to be accepted.

[issue9931] test_ttk_guionly hangs on XP5

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pmoore type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9931 ___ ___

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +db3l ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list

[issue8423] tiger buildbot: test_pep277 failures

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +db3l ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8423 ___ ___ Python-bugs-list mailing list

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I'm not convinced hiding operating system bugs is a good idea. Do you propose to let the error raise then? The point of frameworks such as asyncore and twisted is to hide all system-specific errors as much as possible and provide a

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The point of frameworks such as asyncore and twisted is to hide all system-specific errors as much as possible and provide a portable interface across all platforms. As long as these errors are reasonably explainable. If a strange error only

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: As long as these errors are reasonably explainable. If a strange error only occurs when running nmap on an OS X server, then it might be useful for the user to know that the OS X server isn't able to service all connections properly

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-25 Thread Jon Anglin
Jon Anglin jang...@fortresgrand.com added the comment: I have the long-term plan to eliminate all CRT usage from Python on Windows. In this case, there is a straight-forward opportunity to do so. Oh, OK. If that is the plan then I am on board. I will re-code the patch using the Win32 API

[issue9783] _elementtree.c warnings under 64-bit Windows

2010-09-25 Thread Jon Anglin
Jon Anglin jang...@fortresgrand.com added the comment: Martin is correct about this patch. In cases where we really can't propagate Py_ssize_t to (e.g. XML_Parse), we need to check for an int overflow, and raise an exception if it does overflow. Is this an appropriate approach? int

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2010-09-25 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke jgehr...@gmail.com added the comment: Sorry for the delay. Before suggesting a doc change to correct/complete the description of the *current* situation, we actually should consider changing this situation. I think this is reasonable and I feel encouraged by Gabriel

[issue9945] Improper locking in logging

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: I found a a useless lock acquiring in the 27 maintenance branch in logging and a missing one as well: Logger.removeHandler() locks around a handler lock, however the code executed in this lock is not depending on anything of that

[issue9944] Typo in doc for itertools recipe of consume

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r85008. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9944

[issue9896] Introspectable range objects

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: One other thought. If there is a perceived need, I would rather an alternate approach that unifies a language a bit by letting range() expose its arguments as a slice and modify its input to accept a slice. This sounds like an obscure

[issue1865] Document bytes alias for 2.7

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r85010. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1865 ___

[issue9946] lock use in logging

2010-09-25 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: From logging.Logger: def removeHandler(self, hdlr): Remove the specified handler from this logger. if hdlr in self.handlers: hdlr.acquire() try:

[issue9946] lock use in logging

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Dupe of #9945, sorry. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9946 ___

[issue9947] Weird locking in logging config system

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: Another case of improper locking in logging. The stopListening() method of the logging config acquires the logging lock, but it doesn't do it early enough. In order for this function to be thread safe it would have to lock

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu added the comment: Well, first, this would only work for large objects. [...] Why do you think you might have such duplication in your workload? Some of the projects with which I work involve multiple manipulations of large datasets. Often, we use Python

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, first, this would only work for large objects. [...] Why do you think you might have such duplication in your workload? Some of the projects with which I work involve multiple manipulations of large datasets. Often, we use Python

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: findCaller() on loses case information on the files on Windows and has in general a really bad performance. The attached patch does not depend on filename comparisions and instead compares the object identity of the caller's

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher armin.ronac...@active-4.com: Added file: http://bugs.python.org/file19009/find-caller.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9948 ___

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher armin.ronac...@active-4.com: Removed file: http://bugs.python.org/file19008/find-caller.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9948 ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2010-09-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: In Lib/ntpath.py: # realpath is a no-op on systems without islink support realpath = abspath However, Windows Vista and newer support symbolic links and other Python methods support them. (noticed this through source code

[issue1703592] have a way to ignore nonexisting locales in locale.setlocale

2010-09-25 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Certainly at a minimum, the docs should describe the exception and workaround instead of just: setlocale() is not thread safe on most systems. Applications typically start with a call of import locale locale.setlocale(locale.LC_ALL,

[issue5412] extend configparser to support mapping access(__*item__)

2010-09-25 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18760/issue5412.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5412 ___

[issue5412] extend configparser to support mapping access(__*item__)

2010-09-25 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Patch updated: * uses collections because they are built into the executable for 3.2 * uses itertools for the same reasons * in the end doesn't use weakrefs since after recent commits (Raymond removed __del__ from OrderedDict) the reference

[issue9360] nntplib cleanup

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: And here is a patch integrating doc fixes and updates. -- Added file: http://bugs.python.org/file19011/nntplib_cleanup7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9360

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2010-09-25 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I do not use threads so I cannot comment on the technical issue. Since the current behavior is not clearly a bug, I do not think a change would or know that it should be applied to 2.7/3.1. So I suggest that you both 1. Suggest a doc patch on

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Are you sure of that? I don't see how Python behaviour would be different to a the same program written in C. Could you write a short example written in C to prove that? I also found this surprising, so I wroke a quick C program

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list

[issue9562] Slightly misleading wording in documentation of dict.update

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, does the attached patch contains the expected wording? Thanks, Sandro -- nosy: +sandro.tosi Added file: http://bugs.python.org/file19013/issue9562-py3k.patch ___ Python tracker

[issue9562] Slightly misleading wording in documentation of dict.update

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed original suggestion as r85011. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9562

[issue9945] Improper locking in logging

2010-09-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into py3k and release27-maint branches, r85012. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9945

[issue9947] Weird locking in logging config system

2010-09-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into py3k and release27-maint, r85013. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9947

[issue6293] Have regrtest.py echo back sys.flags

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, I've changed the initial patch to add a CLI option ('-g/--sysflags', '-f' is already used) to enable the echoing of sys.flags. If you need some other changes, just ping me. Regards, Sandro -- nosy: +sandro.tosi Added file:

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This was introduced by r74426 which addressed issue1628205. socket.sendall() calls PyErr_CheckSignals() (and potentially returns to the caller) without having the GIL. import socket c, s = socket.socketpair() s.sendall(bx*(100 * 1024**2))

[issue9890] Visual C++ Runtime Library Error is there a fix?

2010-09-25 Thread Gösta Huldt
Gösta Huldt ghu...@gmail.com added the comment: I get the same error, but only when IDLE is run with the -n flag. In my case, the error occurs when attempting to switch back to the IDLE gui after executing a script that opens a graphics window (using the vtk module). This is with Python 2.6.

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The fix is very simple, but perhaps a test should be added. diff -r af0d7b32d6ce Modules/socketmodule.c --- a/Modules/socketmodule.cFri Sep 24 20:03:12 2010 +0200 +++ b/Modules/socketmodule.cSat Sep 25 21:09:58 2010 +0200 @@ -2581,8

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, the patch is enough to suppress the crash, but sendall() behaviour is buggy in another way: EINTR may be received as part of the select() call (on sockets with a timeout), in which case the loop will be exited early instead of

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Oh, and an additional bug is that send() can return a successful partial write when it was actually interrupted by a signal. -- ___ Python tracker rep...@bugs.python.org

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch fixing the aforementioned issues, and with tests. -- keywords: +patch nosy: +exarkun Added file: http://bugs.python.org/file19015/sendallinterrupt.patch ___ Python tracker

[issue7110] Output test failures on stderr in regrtest.py

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, the attached patch seems to do the trick, at least on what I can verify here on my machine. I'd appreciate a bit more of test from more experienced developers, just to catch corner cases I didn't see. Regards, Sandro --

[issue9628] runtests.sh -x doesn't work with more than two args (sed error)

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, the patch applies cleanly against up-to-date py3k branch: is there anything else to do before committing it? Regards, Sandro -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Closing, as suggested by neologix -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch compiles fine under Linux, but please don't use tabs for indentation of C files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9910

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-25 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com added the comment: I'm also creating a test for mailcap (Issue 6484), which is how I found this bug. I'll have an update to that test submitted soon once I implement r.david.murray's helpful suggestions. --

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: The attached patch fixes the issue (I think...) by tagging the result object. It removes the need for _wrapped_result altogether. The test fails without the change to TestSuite and passes with the change. This could be applied to

[issue9951] introduce bytes.hex method

2010-09-25 Thread Arnon Yaari
New submission from Arnon Yaari wiggi...@gmail.com: Following up on these discussions: http://psf.upfronthosting.co.za/roundup/tracker/issue3532 http://www.gossamer-threads.com/lists/python/dev/863892 I'm submitting a patch to add bytes.hex method in accordance to PEP 358. The code was taken

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Sorry, my mistake, I work in a mixed environment. If there are no objections, I´ll submit this (with fixed whitespace) -- ___ Python tracker rep...@bugs.python.org

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Hi there, I believe I've fixed most of these errors. But I couldn't replicate the last error on the first message, so I guessed what could be the problem. Could you try the patch and see how it works for you ? (Thanks for the nosy addition,

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu added the comment: Why do you read it into a cStringIO? A cStringIO has the same interface as a file, so you could simply operate on the file directly. In that particular case, because it isn't actually a file. That workflow was my attempt at simplification

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Note that the original issue (test_tarfile failures on the Windows buildbots) now seems fixed thanks to the various tarfile and test_tarfile improvements. Yes, thanks. :-) -- ___

[issue9289] Skip test_long_key(test_winreg) on win2k + py2.x

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I found workaround for this. (Probably self.deletetree is more handful, though) -- versions: -Python 2.6 Added file: http://bugs.python.org/file19020/py27_fix_test_winreg_long_key.patch

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry, my patch didn't pass test_dynamic_key(test_winreg). (Apologize for not testing on unit test) RegEnumValueA and RegQueryInfoKeyA always returned 0 for required data size if target is HKEY_PERFORMANCE_DATA. The possible

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I shall create unit test later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9937 ___