This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rhamphoryncus
Recipients Rhamphoryncus, amiseler, ita, mwh, nascheme
Date 2007-12-16.05:04:05
SpamBayes Score 0.004274757
Marked as misclassified No
Message-id <1197781446.95.0.23666297597.issue1225584@psf.upfronthosting.co.za>
In-reply-to
Content
mwh, my threading patch is extensive enough and has enough overlap that
I'm not intimidating by fixing this.  It's low on my list of priorities
though.

So far my tendency is to rip out multiple interpreters, as I haven't
seen what it wants to accomplish.  It's certainly *NOT* completely
isolated interpreters.

As for Py_Finalize, I see 4 purposes to calling it:
1) Finish any lingering bits of the program, such as __del__ methods or
weakref callbacks
2) Delete lingering references so refcount errors or memory leaks may be
more easily discovered
3) Prepare for Py_Initialize to be called again
4) Return the interpreter to a quiescent state such that python.so can
be safely unloaded, then reloaded and Py_Initialize called again

Of these, 3 and 4 are not done.  3 would be easy if Py_Finalize was a
no-op, but that'd undermine 1 and 2.  Given the optimistic
documentation, it's surprising how limited Py_Finalize's scope is.

I've seen some fleeting discussion of allowing extension modules to be
unloaded, which IMO requires returning them to a quiescent state.  Doing
that may lay the foundation for doing it to the entire interpreter.

Anyway, real use cases are critical here.  Although you may think you
want your plugins to unload python, the costs mean you should only do so
very rarely, enough that there's really no advantage to unloading it
(except at program shutdown, for purposes 1 and 2.)
History
Date User Action Args
2007-12-16 05:04:07Rhamphoryncussetspambayes_score: 0.00427476 -> 0.004274757
recipients: + Rhamphoryncus, mwh, nascheme, amiseler, ita
2007-12-16 05:04:06Rhamphoryncussetspambayes_score: 0.00427476 -> 0.00427476
messageid: <1197781446.95.0.23666297597.issue1225584@psf.upfronthosting.co.za>
2007-12-16 05:04:06Rhamphoryncuslinkissue1225584 messages
2007-12-16 05:04:05Rhamphoryncuscreate