Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #1154

process_isolation 0.13 -- per-module process isolation in pure python

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <alex.flint@gmail.com>
X-Original-To python-announce-list@python.org
Delivered-To python-announce-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subject: -- ': 0.07; 'sys': 0.07; 'ex:': 0.09; 'subject:module': 0.09; 'subject:process': 0.09; 'try:': 0.09; 'url:github': 0.09; 'runs': 0.10; 'python': 0.11; 'creates': 0.14; 'imports': 0.16; 'interacting': 0.16; 'modules.': 0.16; 'reload': 0.16; 'to:addr :python-announce-list': 0.16; 'subject:python': 0.16; 'library': 0.18; 'all,': 0.19; 'alex': 0.19; 'code,': 0.22; 'import': 0.22; 'print': 0.22; 'looks': 0.24; 'extension': 0.26; 'testing': 0.29; 'appreciated.': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'ordinary': 0.31; 'safely': 0.31; 'skip:= 20': 0.31; 'subject:per': 0.31; 'run': 0.32; 'running': 0.33; 'announce': 0.33; 'implemented': 0.33; 'skip:b 30': 0.33; 'problem': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'useful': 0.36; 'operating': 0.37; 'feedback': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'release': 0.40; 'solve': 0.60; 'system-level': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EEo6GLFFs/2FG+EH3BbCmRQLtFSbVynXrvf9oA22aWk=; b=NreX6VK+s1NAKcKSblqS9UZEdhY1iWQ8edZXkRySYTiwodZlspIvCGUpwK7uI73hYt wKlID3V/p6SAalvMsiD1XzIcHaXM/tYU61P0MJF2WmwwbWMRuIIkMq7NavxroZPG84xw zK8wZesTrqQdYhzXU5N5l7LWNlkG939/r3u2XNN5/kTPeFXVSkBSDxLfD3YjKSpOQETC H3Y94bFFiyV2d83zQa+LbLs3dArPs34huQcw+TroreS8YvyglThPsAQdQYiZUQo6zE1s FDcorBwZYljpCa+8f4YnOy/oPiijRdCDvkGORPfqPTFEfwwNYWklGIJFSWBXrof9ytN+ WAuA==
MIME-Version 1.0
X-Received by 10.58.146.71 with SMTP id ta7mr1043256veb.23.1385959113226; Sun, 01 Dec 2013 20:38:33 -0800 (PST)
Date Sun, 1 Dec 2013 23:38:33 -0500
Subject process_isolation 0.13 -- per-module process isolation in pure python
From Alex Flint <alex.flint@gmail.com>
To python-announce-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-Mailman-Approved-At Tue, 03 Dec 2013 09:42:01 +0100
X-BeenThere python-announce-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-announce-list/>
List-Post <mailto:python-announce-list@python.org>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=subscribe>
Approved python-announce-list@python.org
Newsgroups comp.lang.python.announce
Message-ID <mailman.3504.1386060123.18130.python-announce-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386060123 news.xs4all.nl 15949 [2001:888:2000:d::a6]:58497
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python.announce:1154

Show key headers only | View raw


Hi all,

I'm happy to announce the release of process_isolation, a library for
running python modules in sub-processes while iteracting with them
like normal modules.

    https://github.com/alexflint/process-isolation

What is process_isolation?
==========================

Process isolation creates sub-processes and imports python modules
into them, then provides proxies so that interacting with those
modules looks like interacting with ordinary modules:

    from process_isolation import import_isolated
    sys = import_isolated('sys')
    sys.stdout.write('Hello world\n')  # runs in a sub-process

This is particularly useful for testing extension modules because
segfaults and other operating system-level signals can be caught as
ordinary exceptions:

    buggy_ext_module = import_isolated('buggy_ext_module')
    try:
        buggy_ext_module.this_might_segfault()
    except ProcessTerminationError as ex:
        print 'There be dragons!'

It can also be used to safely run untrusted code, and to solve the
reload problem for extension modules. Process isolation is implemented
in pure python.

All feedback appreciated.

Alex

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

process_isolation 0.13 -- per-module process isolation in pure python Alex Flint <alex.flint@gmail.com> - 2013-12-01 23:38 -0500

csiph-web