use exocet instead of the builtin Python module loader #1443

Open
opened 2011-07-25 17:11:29 +00:00 by zooko · 0 comments

exocet is a replacement for the builtin Python module loader. It makes the module system no longer be a global (mutable) namespace, but instead each module has a separate namespace for the modules that it loads. This facilitates dependency injection e.g. for unit testing. It may be useful for various things. In general, the notion of eliminating a single global mutable namespace in favor of separate, narrowly-scoped namespaces sounds great!

Over on ticket , I pointed out in comment:82294 that exocet could facilitate blacklisting a module to test our dependencies, and davidsarah pointed out in comment:16:/tahoe-lafs/trac-2024-07-25/issues/6396 that exocet itself requires pywin32 (oops).

[exocet](https://launchpad.net/exocet) is a replacement for the builtin Python module loader. It makes the module system no longer be a global (mutable) namespace, but instead each module has a separate namespace for the modules that it loads. This facilitates dependency injection e.g. for unit testing. It may be useful for various things. In general, the notion of eliminating a single global mutable namespace in favor of separate, narrowly-scoped namespaces sounds great! * [Modules in Python: the Good, the Bad, and the Ugly](http://washort.twistedmatrix.com/2011/01/modules-in-python-good-bad-and-ugly.html) * [Introducing Exocet](http://washort.twistedmatrix.com/2011/01/introducing-exocet.html) * [Exocet: A Second Look](http://washort.twistedmatrix.com/2011/03/exocet-second-look.html) * exocet's [README](http://bazaar.launchpad.net/~washort/exocet/katamari/view/head:/README) Over on ticket #1334, I pointed out in [comment:82294](/tahoe-lafs/trac-2024-07-25/issues/1334#issuecomment-82294) that exocet could facilitate blacklisting a module to test our dependencies, and davidsarah pointed out in comment:16:[/tahoe-lafs/trac-2024-07-25/issues/6396](/tahoe-lafs/trac-2024-07-25/issues/6396) that exocet itself requires pywin32 (oops).
zooko added the
packaging
minor
enhancement
1.8.2
labels 2011-07-25 17:11:29 +00:00
zooko added this to the undecided milestone 2011-07-25 17:11:29 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1443
No description provided.