Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Activity (RSS)

Wednesday, July 08 2009
24 debug output for unknown segfault was updated
  • Paul J. Davis
    Paul J. Davis commented at 9:26 AM

    marc,

    That test case reproduces the bug here. I just ran it quickly this morning before work and its not pointing at anything blatantly in spidermonkey code whi...

  • marc
    marc commented at 8:57 AM

    hi paul,

    thank you for your reply.

    running js code with no extra added globals works perfectly, even under high concurrency. but using external objects from pyt...

Tuesday, July 07 2009
23 support for file I/O (JS_EvaluateScript) was updated
  • Paul J. Davis
    Paul J. Davis commented at 3:20 PM

    AnC,

    Hey, these two cases do seem quite similar, but they're quite different.

    import spidermonkey
    
    rt = spidermonkey.Runtime()
    cx = rt.new_context()
    
    # myVar i...
26 Python Datetime to Javascript Datetime was updated
  • Paul J. Davis
    • Tag set to conversion, date
    by Paul J. Davis at 2:55 PM

    jspy,

    There's no automatic conversion and I'm not certain on the best way to write one. I've heard of other people trying to do date conversions with limited su...

  • jspy
    jspy created the ticket at 3:28 AM

    Hi,

    python-spidermonkey looks very promising. One question: how can I convert a Python datetime Object to a Javascript Date Object? Is this done automatically o...

24 debug output for unknown segfault was updated
  • Paul J. Davis
    • Tag set to execute, javascript, segfault, threading
    • State changed from new to open
    by Paul J. Davis at 2:37 PM

    Marc,

    The easiest way to get a traceback will be to start up your webserver, and then use gdb to attach to the process id before starting your tests. Should be ...

  • marc
    marc created the ticket at 3:33 AM

    hi,

    python-spidermonkey used as serverside JS in cherrypy with mongodb segfaults when i'm doing more than one simultaneous request. when running normal JS code ...

Monday, July 06 2009
23 support for file I/O (JS_EvaluateScript) was updated
  • AnC
    AnC commented at 2:52 PM

    Thanks again for your considerate response, Paul!

    I had actually tried using return values early on, but objects are returned as "[object Object]":

    import spid...
  • Paul J. Davis
    Paul J. Davis commented at 1:44 PM

    AnC,

    If you're wanting to create a variable in JS and return it to Python, the proper method is to make that variable the result of the last expression, like su...

  • AnC
    AnC commented at 1:23 PM

    I tried to make the library interaction as transparent as possible so you should be able to do most anything that comes to mind in terms of passing objects bac...

25 Keyword arguments to Context.execute as globals was created
  • Paul J. Davis
    Paul J. Davis created the ticket at 1:47 PM

    The current Context.execute(script) is a bit limited in terms of user friendliness of passing Python values to the JS interpreter. The current approach is to de...

Sunday, July 05 2009
Pushing fix for [#21] to PyPI http://... was committed by Paul J. Davis at 1:18 AM
21 segfault/bus error in loop was updated
Wednesday, July 01 2009
23 support for file I/O (JS_EvaluateScript) was updated
  • Paul J. Davis
    • State changed from new to resolved
    by Paul J. Davis at 11:39 AM

    AnC

    No prob. I tried to make the library interaction as transparent as possible so you should be able to do most anything that comes to mind in terms of passing...

  • AnC
    AnC commented at 9:05 AM

    Thanks for the quick response!

    You're absolutely correct - I don't actually need JS_EvaluateScript.
    I had no idea you could provide access to Python functions f...

Tuesday, June 30 2009
23 support for file I/O (JS_EvaluateScript) was updated
  • Paul J. Davis
    • Tag set to execfile
    by Paul J. Davis at 1:28 PM

    AnC,

    I sure don't provide access to functions like that, but do you really need id? Implementing someting like this should be relatively simple:

    >>> import spi...
  • AnC
    AnC commented at 12:45 PM

    A grep on the repository reveals occurrences of JS_EvaluateScript in spidermonkey/libjs/jsapi.c - however, there's no hint in the documentation ($ pydoc spiderm...

  • AnC
    AnC created the ticket at 12:26 PM

    It appears python-spidermonkey does not yet support Spidermonkey's filename argument:
    http://stackoverflow.com/questions/1055850/file-i-o-in-spidermonkey...

    Ap...

Sunday, June 28 2009
21 segfault/bus error in loop was updated
  • Paul J. Davis
    Paul J. Davis commented at 7:24 PM

    marc,

    Cool. I'll version bump and push to PyPI

    Paul

  • marc
    marc commented at 6:47 PM

    hi paul,

    okay i've tested it with the git version and it works like a charm. thank you for solving the problem so fast.

    cheers marc

Saturday, June 27 2009
20 Install and Build Problem on Mac OS X 10.5 and Python 2..6 was updated
  • Calum Moore
    Calum Moore commented at 8:48 AM

    Paul

    Sorry for the delay in the response. My computer went in for repairs so I won't know till next week. I will let you know as soon as I get it from repairs.

    ...

Friday, June 26 2009
20 Install and Build Problem on Mac OS X 10.5 and Python 2..6 was updated
  • Paul J. Davis
    Paul J. Davis commented at 7:56 PM

    Calum,

    Did you manage to get this fixed?

    Paul

22 JS_NewRuntime failures was created
  • Paul J. Davis
    Paul J. Davis created the ticket at 7:50 PM

    Investigating [#21] I found that creating Runtimes ends up causing JS_NewRuntime() to start returning NULL. I'm not sure on the reasoning for this, but I don't ...

21 segfault/bus error in loop was updated
  • Paul J. Davis
    Paul J. Davis commented at 7:47 PM

    marc,

    Can you pull github and double check that the error is fixed for you?

    Paul

  • Paul J. Davis
    • State changed from new to resolved
    by Paul J. Davis at 7:46 PM

    (from [6d5e357f9cd4ae3cfaaf25aafbf6c121cf519ac2]) Fix segfaults when large numbers of contexts.

    Turns out that I had an error in my logic about how to reference...

  • marc
    marc commented at 4:39 AM

    ouch...sorry, i've forgotten to close the code-block :)

  • marc
    marc commented at 4:38 AM

    hi paul,

    thank for your effort to get into it and for investigating this strange behaviour.
    another funny thing is, that moving the

    rt = spidermonkey.Runtime()...
Fix segfaults when large numbers of c... was committed by Paul J. Davis at 7:46 PM
Thursday, June 25 2009
21 segfault/bus error in loop was updated
  • Paul J. Davis
    • Tag changed from segfault, session-creation to segfault, session-creation, wtf
    by Paul J. Davis at 11:32 PM

    Looking into this suggests a fairly non-trivial bug somewhere. It appears to be deterministic though, so at least there's that.

    Initial inspection shows things ...

  • Paul J. Davis
    • Tag set to segfault, session-creation
    by Paul J. Davis at 7:11 PM

    Marc,

    Interesting. I'll take a look tonight or tomorrowish when I get a chance. Off the top of my head there's no real good way to clean a context completely af...

  • marc
    marc created the ticket at 6:11 PM

    hi,

    i have the following problem. i want to build a serverside JS framework ontop of cherrypy. here is the code that freezes when executing:

    #!/bin/env python
    ...
20 Install and Build Problem on Mac OS X 10.5 and Python 2..6 was updated
  • Paul J. Davis
    Paul J. Davis commented at 4:29 PM

    Calum,

    Oh, forgot one, you need pkgconfig installed too.

    $ sudo port install pkgconfig
    

    In the end, you need the following command to work:

    $ pkg-config --cfl...
  • Calum Moore
    Calum Moore commented at 6:09 AM

    Just to clarify the parts in header format are commented out, but i'm guessing the hash is seen as formatting and therefore removed.

  • Calum Moore
    Calum Moore commented at 6:07 AM

    Thanks for the quick reply!

    I seem to have nspr installed because when using:

    $ sudo port install nspr

    I get the following already installed message (well i thi...

Wednesday, June 24 2009
20 Install and Build Problem on Mac OS X 10.5 and Python 2..6 was updated
  • Paul J. Davis
    • Tag changed from 10.5, 2..6, build, install, mac, os, python, x to 10.5, 2.6, build, install, mac, os, python, x
    by Paul J. Davis at 10:29 PM
  • Paul J. Davis
    • State changed from new to open
    by Paul J. Davis at 10:29 PM

    Calum,

    You need to make sure that libnspr is installed from ports. You can install it like:

    $ sudo port install nspr
    

    Though it should've been installed for sp...

  • Calum Moore
    Calum Moore created the ticket at 10:16 PM

    Hi

    I have used macport to install spidermonkey. It says this is installed.

    When i attempt to build spidermonkey it fails with the error message below.

    Macintosh...

Monday, June 15 2009
19 Restrict methods accessible from javascript on python objects was updated
  • Paul J. Davis
    Paul J. Davis commented at 8:22 AM

    No problem. If you have time, try and think of more tests. I get the feeling I'm missing edge cases but I'm lacking the creativity to figure out what they might...

  • Richard Boulton
    Richard Boulton commented at 2:57 AM

    Excellent - your updated patch all looks good here. Thanks for tidying up (lots!) and applying so quickly. :)

Sunday, June 14 2009
19 Restrict methods accessible from javascript on python objects was updated
  • Paul J. Davis
    • State changed from open to resolved
    by Paul J. Davis at 7:43 PM

    Forgot to do the state update in the commit. Filtering access should now work:

    http://github.com/davisp/python-spidermonkey/commit/e8e69e9f5644907...

    I uploade...

  • Richard Boulton
    Richard Boulton commented at 9:42 AM

    I assume you're referring to adding a check somewhere in context.c:get_prop() - around line 95, just before PyObject_GetItem. That's probably a good idea, yes.

    ...

  • Paul J. Davis
    Paul J. Davis commented at 1:00 AM

    That looks right in line with what I was thinking. I've just read through the diff so I might be missing bits, but it looks like a call to check_key_access is m...

Bumping the version before pushing to... was committed by Paul J. Davis at 7:39 PM
Filter Python access with a function.... was committed by Paul J. Davis at 7:38 PM
Saturday, June 13 2009
19 Restrict methods accessible from javascript on python objects was updated
  • Richard Boulton
    Richard Boulton commented at 11:14 PM

    I've put together an initial implementation of this, thanks to your hints, and it just about works, I think!

    It needs more testing, and a bit of an audit to che...

Friday, June 12 2009
19 Restrict methods accessible from javascript on python objects was updated
  • Paul J. Davis
    • State changed from new to open
    • Tag set to python, wrapping
    • Milestone set to Version 0.1.0
    by Paul J. Davis at 11:10 AM

    Richard,

    Sorry it took me so long to respond to this. I had it on the todo list and then lost the list. :/

    The parts of the code that you'd need to look at are ...

Thursday, June 11 2009
19 Restrict methods accessible from javascript on python objects was created
  • Richard Boulton
    Richard Boulton created the ticket at 7:47 AM

    Currently, if I expose a python object to javascript, all methods and properties of that object can be called from javascript. This will often allow the javascr...

Thursday, June 04 2009
Make the lighthouseapp.com link more ... was committed by Paul J. Davis at 12:37 AM
Sunday, May 31 2009
12 Memory / CPU script limits was updated
  • Paul J. Davis
    • Milestone set to Version 0.1.0
    • Tag set to resourcelimits
    • State changed from resolved to open
    by Paul J. Davis at 6:31 AM

    When 1.8.1 comes out the memory limit code will be even more ineffective than it already is. I just had the thought that instead of relying on spidermonkey's AP...

Thursday, May 28 2009
18 Windows Support was created
  • Paul J. Davis
    Paul J. Davis created the ticket at 7:46 PM

    Got a ping about adding support for windows. I don't have either a Windows machine or the requisite knowledge for adding windows support. I'll leave this open i...