At 11:22 AM 8/21/2007 -0700, Brett Cannon wrote: >This also means pkgutil is possibly non-compliant as it's get_code >implementation does the above suggestion (tries for source to avoid >timestamp check, and uses bytecode as backup).
That's not actually true, it just *looks* that way. IIRC, mod_type will only be PY_SOURCE if there's no compiled version available. There's a different bug, though, which is that if you call get_code() on an ImpLoader when the module hasn't been loaded, you could get out-of-date code, because it's currently relying on imp to do the timestamp check and recompile. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com