Warnings issued during 'easy_install'

When I easy_install some python modules, warnings such as:

 <some module>: module references __file__ <some module>: module references __path__ <some module>: module MAY be using inspect.trace <some module>: module MAY be using inspect.getsourcefile 

sometimes emitted.

Where (which package / source file) do these messages appear? Why is a link to __file__ or __path__ considered bad?

+4
source share
2 answers

easy_install does not like to use __file__ and __path__ not so much because they are dangerous, but because packages that use them almost always cannot end with jammed eggs.

easy_install is a warning because it will install “less efficiently” in an unpacked directory instead of a zipped egg.

In practice, I'm usually glad when the zip_safe check fails, because then, if I need to dive into the source of the module, it will be easier for you.

+6
source

I would not worry about that. As durin42 notes, this means that setuptools will not fasten an egg when it places it in site packages. If you do not want to see these messages, I believe that you can simply use the -Z flag for easy_install . This will make him always unfasten the egg.

I recommend using pip . This gives you much less unnecessary result for processing.

+1
source

Source: https://habr.com/ru/post/1301856/


All Articles