Don't use weak references in `get_local_namespace`
Clear `MagicNetwork.objects` after doing `reinit`, to not keep those objects alive.
Add a new attribute `BrianObject.add_to_magic_network` to only add "major" objects to `MagicNetwork` but also simulate all contained objects
Store dependencies for objects that depend on other objects (monitors, synapses). Not including them in an explicitly constructed `Network` raises an error, not including them in a `MagicNetwork` (e.g. because a reference to a monitor is keeping that object alive) will raise a warning and set the object to inactive. Closes #92
Use a `WeakKeyDictionary` for `Runtime.arrays` so that the memory gets freed for arrays that are no longer used.
Make travis use the run_nose_tests script (so that numpy's KnownFailure extension is used)
Add two more simple tests
Remove the option to only store weak references in the network, this is now handled differently for `MagicNetwork`.
Collect garbage before `magic_network.run`
Refactor the indexing system so that basic indexing is still possible even when the `Group` no longer exists.
Move `set_...` and `get_...` methods from `Group` to `VariableView` so that the indexing can work without the group.
Add tests for the use of subgroups without holding explicit references to them (e.g. `SpikeMonitor(G[3200:])`).
Instead of the tracking mechanism, use all the `BrianObject`s in the namespace surrounding the run call for the magic mechanism.
Use strong references for source/target in monitors and `Synapses` to allow the use of subgroup without holding an explicit reference to the subgroup
Don't use lambda functions for testing the magic run function -- the access to the stack seems to be different in Python3.
Replace a cyclical reference from `SynapticPathway` to `Synapses` with a weak reference
Move `gc.collect()` from `MagicNetwork.run` to `Network.run` -- it is useful for repeated simulation with explicitly constructed `Network` objects as well.
Add some very basic tests of lines previously non-covered by the test suite
Show a better error message when using string expressions in `VariableView` for a no longer existing group
Be a bit more careful about non-default index variables in `calc_indices`, they don't necessarily have the same length as the default `_idx` index.