[issue13992] Segfault in PyTrash_destroy_chain
Manu Cupcic added the comment: Hi, Antoine, thank you for the patch you proposed. It indeed fixed the bug I was seeing (I ran a job that usually crashes in one to two hours over the week end and it is still running). I am not sure what we should do now. Can this patch be integrated as is ? What can I do to help ? Thanks Manu -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Manu Cupcic added the comment: I am testing this patch right now. Will report back. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Manu Cupcic added the comment: I am also hitting this issue. I have been able to reproduce it in python 2.5 and 2.7, on debian 6 (64 bits) Exactly like the reporter, I am making extensive use of threads. I am also using SQLalchemy. All my threads but one are waiting (probably for the GIL) : (gdb) info threads 15 Thread 0x7fffe3ff7700 (LWP 419) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 14 Thread 0x7fffe47f8700 (LWP 418) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 13 Thread 0x7fffe4ff9700 (LWP 417) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 12 Thread 0x7fffe57fa700 (LWP 416) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 11 Thread 0x7fffe5ffb700 (LWP 415) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 * 10 Thread 0x7fffe67fc700 (LWP 414) 0x0046479f in _Py_ForgetReference (op=0x4dc7bc0) at Objects/object.c: 9 Thread 0x7fffe6ffd700 (LWP 413) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 8 Thread 0x7fffe77fe700 (LWP 412) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 7 Thread 0x7fffe7fff700 (LWP 411) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 6 Thread 0x7fffec81c700 (LWP 410) 0x772a11a3 in select () from /lib/libc.so.6 5 Thread 0x7fffed01d700 (LWP 409) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 4 Thread 0x7fffed81e700 (LWP 408) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 3 Thread 0x7fffee01f700 (LWP 407) 0x77bd03c0 in sem_wait () from /lib/libpthread.so.0 2 Thread 0x7fffee820700 (LWP 406) 0x7729c9d3 in poll () from /lib/libc.so.6 1 Thread 0x77fec700 (LWP 393) 0x772a11a3 in select () from /lib/libc.so.6 And the segfault happens in _Py_ForgetReference : (gdb) bt #0 0x0046479f in _Py_ForgetReference (op=0x4dc7bc0) at Objects/object.c: #1 0x00464810 in _Py_Dealloc (op=0x4dc7bc0) at Objects/object.c:2242 #2 0x00559a68 in frame_dealloc (f=0x4997ab0) at Objects/frameobject.c:458 #3 0x0046481d in _Py_Dealloc (op=0x4997ab0) at Objects/object.c:2243 ... probably because something else zeroed out the op object : (gdb) select-frame 0 (gdb) print *op $6 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x2364020} Is there something else I can do to help resolve this bug ? I can help debugging this, but I am not sure how to proceed. I have a --with-pydebug interpreter stopped at the segfault in gdb. -- nosy: +cupcicm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Manu Cupcic added the comment: (gdb) p op $12 = (PyObject *) 0x4dc7bc0 thread all apply bt is going to be very long no ? Could you tell me what you want to know that is not in info threads maybe ? I can definitely post it here, but it's going to be a lot of output. I can be available on IRC if you want to debug it live. Thanks ! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Installing a binary package on virtualenv on windows
Hi I have been using virtualenv on my windows desktop for quite a while now and would really recommend everyone to use it. Something I come across is how can I install a binary dependency in my virtual environment . I need to install lxml and gevent. Both packages are delivered as windows installer (and not always the latest version !!!) and it seems that pip install will not make the job( as it will go through the build process...) Thanks for your help. M -- http://mail.python.org/mailman/listinfo/python-list
ResponseNotReady in httplib
Hi I try to access a web site and it returns me this exception ResponseNotReady . I don't know what is the root of the problem and how to sort it out. I am using the excellent python requests library to access the web site but it relies on httplib utlimately. Could someone one explains me the problem and how to sort it out . Thx Dave -- http://mail.python.org/mailman/listinfo/python-list
Re: max(), sum(), next()
On Sat, Sep 6, 2008 at 12:57 AM, castironpi [EMAIL PROTECTED] wrote: On Sep 5, 9:20 pm, Manu Hack [EMAIL PROTECTED] wrote: On Fri, Sep 5, 2008 at 1:04 PM, castironpi [EMAIL PROTECTED] wrote: On Sep 5, 3:28 am, Manu Hack [EMAIL PROTECTED] wrote: On Thu, Sep 4, 2008 at 4:25 PM, castironpi [EMAIL PROTECTED] wrote: On Sep 4, 2:42 pm, [EMAIL PROTECTED] wrote: David C. Ullrich: At least in mathematics, the sum of the elements of the empty set _is_ 0, while the maximum element of the empty set is undefined. What do you think about my idea of adding that 'default' argument to the max()/min() functions? Bye, bearophile For max and min, why can't you just add your argument to the set itself? The reason max([]) is undefined is that max( S ) is in S. It makes sense. The reason sum([]) is 0 is that sum( [ x ] ) - x = 0. It doesn't make sense to me. What do you set x to? For all x. But then how can you conclude sum([]) = 0 from there? It's way far from obvious. You can define sum([a1,a2,...,aN]) recursively as sum([a1,a2,...a(N-1)])+aN. Call the sum sum([a1,a2,...,aN]) X, then subtract aN. sum([a1,a2,...a(N-1)])+aN=X sum([a1,a2,...a(N-1)])+aN-aN=X-aN For N=2, we have: sum([a1,a2])=X sum([a1,a2])-a2=X-a2 sum([a1,a2])-a2-a1=X-a2-a1 Since X= a1+ a2, replace X. sum([a1,a2])-a2-a1=(a1+a2)-a2-a1 Or, sum([a1,a2])-a2-a1=0 Apply the recursive definition: sum([a1])+a2-a2-a1=0 And again: sum([])+a1+a2-a2-a1=0 And we have: sum([])=0. It makes more sense now, I just wanted to point out that only with sum([x]) = x, you can't get sum([]) = 0. -- http://mail.python.org/mailman/listinfo/python-list
Re: max(), sum(), next()
On Thu, Sep 4, 2008 at 4:25 PM, castironpi [EMAIL PROTECTED] wrote: On Sep 4, 2:42 pm, [EMAIL PROTECTED] wrote: David C. Ullrich: At least in mathematics, the sum of the elements of the empty set _is_ 0, while the maximum element of the empty set is undefined. What do you think about my idea of adding that 'default' argument to the max()/min() functions? Bye, bearophile For max and min, why can't you just add your argument to the set itself? The reason max([]) is undefined is that max( S ) is in S. It makes sense. The reason sum([]) is 0 is that sum( [ x ] ) - x = 0. It doesn't make sense to me. What do you set x to? -- http://mail.python.org/mailman/listinfo/python-list
Re: max(), sum(), next()
On Fri, Sep 5, 2008 at 1:04 PM, castironpi [EMAIL PROTECTED] wrote: On Sep 5, 3:28 am, Manu Hack [EMAIL PROTECTED] wrote: On Thu, Sep 4, 2008 at 4:25 PM, castironpi [EMAIL PROTECTED] wrote: On Sep 4, 2:42 pm, [EMAIL PROTECTED] wrote: David C. Ullrich: At least in mathematics, the sum of the elements of the empty set _is_ 0, while the maximum element of the empty set is undefined. What do you think about my idea of adding that 'default' argument to the max()/min() functions? Bye, bearophile For max and min, why can't you just add your argument to the set itself? The reason max([]) is undefined is that max( S ) is in S. It makes sense. The reason sum([]) is 0 is that sum( [ x ] ) - x = 0. It doesn't make sense to me. What do you set x to? For all x. But then how can you conclude sum([]) = 0 from there? It's way far from obvious. -- http://mail.python.org/mailman/listinfo/python-list
Re: max(), sum(), next()
On Fri, Sep 5, 2008 at 11:45 PM, Steven D'Aprano [EMAIL PROTECTED] wrote: On Fri, 05 Sep 2008 22:20:06 -0400, Manu Hack wrote: On Fri, Sep 5, 2008 at 1:04 PM, castironpi [EMAIL PROTECTED] wrote: ... The reason sum([]) is 0 is that sum( [ x ] ) - x = 0. It doesn't make sense to me. What do you set x to? For all x. But then how can you conclude sum([]) = 0 from there? It's way far from obvious. I think Castironpi's reasoning is to imagine taking sum([x])-x for *any* possible x (where subtraction and addition is defined). Naturally you always get 0. Now replace x by *nothing at all* and you get: sum([]) subtract nothing at all = 0 I think that this is a reasonable way to *informally* think about the question, but it's not mathematically sound, because if you replace x with nothing at all you either get: sum([]) - = 0 which is invalid (only one operand to the subtraction operator), or you get: sum([0]) - 0 = 0 which doesn't involve an empty list. What castironpi seems to be doing is replacing nothing at all with, er, nothing at all in one place, and zero in the other. And that's what makes it unsound and only suitable as an informal argument. Actually it's even more natural to state sum([x]) = x, and this way you can never conclude that sum([]) = 0 from there. -- http://mail.python.org/mailman/listinfo/python-list
Re: fromfile error on windows, not mac
On Wed, Jul 23, 2008 at 3:37 PM, jadamwil [EMAIL PROTECTED] wrote: I found the problem: I thought it was opening in binary mode on BOTH windows and the mac, but on windows I passed rb with double quotes, not 'rb' with single quotes to the open file function. Changing it to 'rb' fixed it. by the way, anyone could explain why changing to single quote makes a difference? rb == 'rb' True -- http://mail.python.org/mailman/listinfo/python-list
Re: trying to use sax for a very basic first xml parser
May I suggest you ask in the blender list? Will do that and report back. Thank you! Manuel -- http://mail.python.org/mailman/listinfo/python-list
trying to use sax for a very basic first xml parser
Hi, I need to parse xml files for the Blender Game Engine. ATM I am trying to get this script running in the BGE. This is my first script and I dont have much experience programming... import xml.sax class PnmlHandler(xml.sax.ContentHandler): def __init__(self): self.inPlace=0 def startElement(self, name, attrs): if name != place: return if attrs.getLength()==0: return print 'Starting element:', name print attrs:, attrs.keys() id = attrs.get(id, None) print id:, id if name == place: self.inPlace=1 def endElement(self, name): if name == place: self.inPlace=0 parser = xml.sax.make_parser() parser.setContentHandler(PnmlHandler()) parser.parse(open(bpm.pnml,r)) this works in the IDLE ide. Output: Starting element: place attrs: [u'id'] id: p9723441 Starting element: place attrs: [u'id'] id: p26811937 Starting element: place attrs: [u'id'] id: p24278422[/code] but when I copy the script into blender and run it I get: [code]Compiled with Python version 2.5. Checking for installed Python... got it! Traceback (most recent call last): File Text, line 27, in module File H:\Python25\lib\xml\sax\__init__.py, line 93, in make_parser raise SAXReaderNotAvailable(No parsers found, None) xml.sax._exceptions.SAXReaderNotAvailable: No parsers found[/code] Its probably a stupid question but thanks anyway! -- http://mail.python.org/mailman/listinfo/python-list
Re: trying to use sax for a very basic first xml parser
On Jul 14, 8:14 pm, Miki [EMAIL PROTECTED] wrote: Python is using an external library for SAX (expat IIRC). I *guess* the Python that comes with Blender don't have this library. I don't know... I didnt install any external libraries for sax. I think python comes with a standard sax library. And before I had python installed Blender said at startup: Compiled with Python version 2.5. Checking for installed Python... No installed Python found. Some scripts will not run. Continuing happily After installing Python 2.5.2 it now says: Compiled with Python version 2.5. Checking for installed Python... got it! So I think it is using the installed Python. Could it be that I have to install the same python version Blender was compiled with? -- http://mail.python.org/mailman/listinfo/python-list
Re: Rpy Module
On Fri, May 16, 2008 at 6:14 PM, Mike P [EMAIL PROTECTED] wrote: Hi experts, I've just seen there is an R module, what i can't see easily is if you can / how to import other modules for R into the Rpy module Can anyone advise on this? Say if you want to use Hmisc within rpy, import rpy rpy.r.library('Hmisc') Manu -- http://mail.python.org/mailman/listinfo/python-list
mx Base module
Hi there, I am trying to install mx Base module( http://www.egenix.com/products/python/mxBase/ ) on my Redhat server. But om executing command python setup.py install I get following messages: running install running build running mx_autoconf gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include -c _configtest.c -o _configtest.o _configtest.c: In function 'main': _configtest.c:4: warning: statement with no effect gcc -pthread _configtest.o -L/usr/local/lib -L/usr/local/lib64 -o _configtest success! removing: _configtest.c _configtest.o _configtest gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include/python2.5 -I/usr/ local/include -c _configtest.c -o _configtest.o success! removing: _configtest.c _configtest.o macros to define: [('HAVE_STRPTIME', '1')] macros to undefine: [] running build_ext building extension mx.DateTime.mxDateTime.mxDateTime (required) building 'mx.DateTime.mxDateTime.mxDateTime' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -DUSE_FAST_GETCURRENTTIME -DHAVE_STRPTIME=1 -Imx/ DateTime/mxDateTime -I/usr/local/include/python2.5 -I/usr/local/ include -c mx/DateTime/mxDateTime/mxDateTime.c -o build/temp.linux- x86_64-2.5_ucs2/mx-DateTime-mxDateTime-mxDateTime/mx/DateTime/ mxDateTime/mxDateTime.o gcc: mx/DateTime/mxDateTime/mxDateTime.c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1 I am able to import mx but not mx.TextTools or mx.DateTime. Please help to install this module. Thanks in advance M -- http://mail.python.org/mailman/listinfo/python-list
Re: mx Base module
Many thanx for your help python setup.py build --skip install command is working Thanks Once again M On Feb 25, 5:08 pm, M.-A. Lemburg [EMAIL PROTECTED] wrote: On 2008-02-25 17:27, Manu wrote: Hi there, I am trying to install mx Base module(http://www.egenix.com/products/python/mxBase/ ) on my Redhat server. But om executing command python setup.py install The file you downloaded is a prebuilt binary. For those, you have to use: python setup.py build --skip install Prebuilt binaries are similar to Python eggs in that they do not require a compiler. Unlike eggs, they give you full advantage of the distutils install command and all its options. http://www.egenix.com/products/python/mxBase/#Installation I get following messages: running install running build running mx_autoconf gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include -c _configtest.c -o _configtest.o _configtest.c: In function 'main': _configtest.c:4: warning: statement with no effect gcc -pthread _configtest.o -L/usr/local/lib -L/usr/local/lib64 -o _configtest success! removing: _configtest.c _configtest.o _configtest gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include/python2.5 -I/usr/ local/include -c _configtest.c -o _configtest.o success! removing: _configtest.c _configtest.o macros to define: [('HAVE_STRPTIME', '1')] macros to undefine: [] running build_ext building extension mx.DateTime.mxDateTime.mxDateTime (required) building 'mx.DateTime.mxDateTime.mxDateTime' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict- prototypes -fPIC -DUSE_FAST_GETCURRENTTIME -DHAVE_STRPTIME=1 -Imx/ DateTime/mxDateTime -I/usr/local/include/python2.5 -I/usr/local/ include -c mx/DateTime/mxDateTime/mxDateTime.c -o build/temp.linux- x86_64-2.5_ucs2/mx-DateTime-mxDateTime-mxDateTime/mx/DateTime/ mxDateTime/mxDateTime.o gcc: mx/DateTime/mxDateTime/mxDateTime.c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1 I am able to import mx but not mx.TextTools or mx.DateTime. Please help to install this module. Thanks in advance M -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 25 2008) Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ...http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 -- http://mail.python.org/mailman/listinfo/python-list
Re: Official IRC channel for Python?
On Sun, Feb 24, 2008 at 12:16 AM, js [EMAIL PROTECTED] wrote: Really? maybe I'm been blocked from it... thanks. Maybe you need your nick name to be recognized. You need to register your nickname somewhere. Manu -- http://mail.python.org/mailman/listinfo/python-list
Re: Official IRC channel for Python?
On 23 Feb 2008 22:21:59 -0800, Paul Rubin http://phr.cx@nospam.invalid wrote: Manu Hack [EMAIL PROTECTED] writes: Really? maybe I'm been blocked from it... thanks. Maybe you need your nick name to be recognized. You need to register your nickname somewhere. On freenode, you need to register your nick in order to send private messages, but you can join a channel with an unregistered nick. If the nick is registered to someone else, you get a message saying to identify (which in this situation actually means change nicks, since you presumably don't have the password to identify as the other person). Manu, what happens when you try to join? What happens if you change nicks? Can you connect to freenode at all? Can you join other channels? -- For most of the channels there is not problem joining. Only the python channel I need to use message nickserv to identify in order to join. I'm not very into the irc thing so after the first time I register the nickname and then I don't seem to remember where I registered. LIke if I run /join python in irssi it gives #python You need to be identified to join that channel so I need to run /msg nickserv identify my_password and then I can join #python by running /join python. Manu http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Announcement: Python module for pacparser (parses proxy auto-config files)
Fellas, I am mighty pleased to announce the release of python module for pacparser. pacparser is a library to parse proxy auto-config (PAC) files. Proxy auto-config files are already a vastly used web proxy configuration method these days (either directly or via web proxy autodiscovery protocol) and almost all popular web browsers support them. pacparser python module brings in PAC file parsing capability to python programs. Using it, python web software can now work with proxy auto-config files. I am hoping, web software programmers will appreciate it. At least I've been looking for such a thing for a while :). For documentation and available packages, please visit project homepage at http://code.google.com/p/pacparser Direct download links: Source archive: http://pacparser.googlecode.com/files/pacparser-1.0.3.tar.gz Compiled module for python 2.5 and win32: http://pacparser.googlecode.com/files/pacparser-python25-1.0.3-win32.zip I have tested the module to work on Python 2.2 - 2.5 on Linux and Win32. Cheers :-), Manu -- Manu Garg http://www.manugarg.com Journey is the destination of life. -- http://mail.python.org/mailman/listinfo/python-list
Announcement: pacparser - a c library to parse proxy auto-config (pac) files
Hi Folks, I am very pleased to announce the release of pacparser - a C library to parse proxy auto-config (PAC) scripts. Needless to say, PAC files are now a widely accepted method for proxy configuration management and almost all popular browsers support them. The idea behind pacparser is to make it easy to add this PAC file parsing capability to other programs. It comes as a shared C library with a clear API. You can use it to make any C or python (using ctypes) program PAC scripts intelligent. For documentation and available packages, please visit project home page at: http://code.google.com/p/pacparser For the ones who like to start with source code, here is the link to direct download for source code: http://pacparser.googlecode.com/files/pacparser-1.0.0.tar.gz. Cheers :-), Manu -- Manu Garg http://www.manugarg.com Journey is the destination of the life. -- http://mail.python.org/mailman/listinfo/python-list
property question
hi all, If I have a class A with A.x, A.y, A.z. A.y and A.z are property and in order to compute the value of them, A.y depends on A.x while A.z depends on A.y and A.x. If I call A.y, and A.z, the value A.y would be computed twice. Is there a smart way to avoid that as to A.y will be recomputed only if A.x has been changed? Now I can define more variables to keep track of what is changed but when there are more variables and the dependency becomes more involved it could be very complicated. Thanks a lot. Manu -- http://mail.python.org/mailman/listinfo/python-list
Re: RegEx question
On 10/4/07, Robert Dailey [EMAIL PROTECTED] wrote: On 10/4/07, Adam Lanier [EMAIL PROTECTED] wrote: try @param\[(in|out)\] \w+ This didn't work either :( The tool using this regular expression (Comment Reflower for VS2005) May be broken... -- http://mail.python.org/mailman/listinfo/python-list How about @param\[[i|o][n|u]t*\]\w+ ? -- http://mail.python.org/mailman/listinfo/python-list
IDisatch and pythoncom
Hi, I have a COM component server that just exposes the IDispatch interface but when you use it in a VB app you can access other method. I think the way to access the other methods( as does it VBA for ex) is to use Invoke but don't know how to do it in python. Say for ex i want to convert this very simple example with only IDispatch interface . import win32com.client o = win32com.client.Dispactch('Excel.Application') o.WorkBooks.Add() Thx for your help -- http://mail.python.org/mailman/listinfo/python-list
Re: ftplib fails when directory name contains spaces
Oops..It was my mistake :(. Directory name with spaces work by default. -- http://mail.python.org/mailman/listinfo/python-list