trac #15432: use a callback class object holding a weak reference for sage.misc.weak_dict.WeakValueDictionary
trac #15432: also equip iteration context with a weak reference
trac #15432: Code context manager in iterator via try/finally. This saves an entire class and some reference management.Z
Trac 15432: Review patch (doc formatting)
Trac #15432: Use a callback with a weak reference to WeakValueDictionary

Following http://bugs.python.org/issue417795, we should probably only
reference the dict weakly from the callback object to avoid unnecessary
circular references.

As we found in http://trac.sagemath.org/ticket/15367#comment:39, if an
object C involved in a reference cycle becomes unreachable as a side
effect of circular GC (e.g., a callback somewhere), the object C will
only be collected by GC in the next round. A non-circularly referenced
object C would have its reference count hit 0 and would be collected
immediately. That is already a good reason to try and avoid circular
references, even now that Python does clean them up eventually.

See also http://trac.sagemath.org/ticket/13394#comment:19 (reasoning the
validity of using a strongly referencing closure should be fine in
theory -- this didn't take into account the practical consideration
above).

URL: http://trac.sagemath.org/15432
Reported by: nbruin
Ticket author(s): Nils Bruin
Reviewer(s): Simon King
re-add the commandline jmol launch script
Trac #15579: Commandline jmol (3-d plots) broken, black window

The following opens jmol with a black window:
{{{
sage: polytopes.n_cube(3).plot()
}}}
This is a regression caused by #14358, which removed the script file to
launch jmol.

URL: http://trac.sagemath.org/15579
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s): Nathann Cohen