[Distutils] Module Installation Issues
steve.dower at python.org
Tue Sep 13 19:06:55 EDT 2016
On 13Sep2016 1555, Donald Stufft wrote:
>> On Sep 13, 2016, at 6:41 PM, Steve Dower <steve.dower at python.org> wrote:
>> I think it's one of these things where we should suck it up and let the 90% case work fine, then display a big fat warning if anything weird may have happened and let users sort it out themselves.
> I am unsure. One of the really egregious and hard to debug weirdness is going to be something like:
>>>> import foo.bar # foo, and foo.bar are in sys.modules
>>>> pip.install(“thing”) # This implicitly upgrades foo
>>>> import foo.widget # the old foo is in sys.modules, but the new foo.widget.
Except my version of this goes more like:
>>> import foo.bar # foo, and foo.bar are in sys.modules
>>> pip.install("thing") # This implicitly upgrades foo
WARNING: Packages were updated. You need to restart Python now.
>>> import foo.widget # because I happily ignore messages starting
Doesn't matter to me whether it's "safe" to keep going or not - if any
files are overwritten at all then show the warning. (This is exactly the
argument I was expecting when I said "those who want it to be perfect in
every scenario" ;) )
More information about the Distutils-SIG