jparise / python-reloader

Dependency-based Python Module Reloader
http://www.indelible.org/ink/python-reloading/
MIT License
135 stars 27 forks source link

issue with reloader._import #18

Closed thehesiod closed 10 years ago

thehesiod commented 10 years ago

Per: http://docs.python.org/3/library/functions.html#__import__ the default level should be "0", instead its currently -1 which means it will fail for scenarios like:

drone_reloader.py:

import reloader
reloader.enable()
import drone

drone.py:

import ssl, urllib, argparse, sys, json, os, shutil, datetime, traceback, socket, pprint, glob

please verify all parameters...I'm guessing you need different defaults for different versions of python

thehesiod commented 10 years ago

I've verified that a monkeypatch with the above fix does seem to work.

jparise commented 10 years ago

This was fixed in da90709690132db02f6c42867babcbeb1c0c548a, but I haven't done a PyPI release in quite some time so you probably don't have that commit if that's how you've been getting the code.

If that's not the case, please reopen this issue, and I'll investigate further.