Override stdlib require during import

A few weeks ago I was experimenting with dependency injection and trying to change the binding of require from an import statement. It doesn’t seem to be working.

Have others experimented with this?

Seems to work for me?

If you have a notebook that reproduces the unexpected behavior, I’d be happy to investigate.

(Note that circular import-with is a known bug, and we are working on a fix to ensure that circular import-with fails early. But as long as you aren’t using circular imports, you should be able to use import-with to override a builtin.)

Hmm, perhaps the nested override bug fix addressed the issue I was having? Will retry!