3.4rc2 and pip on windows

Zachary Ware zachary.ware+pylist at gmail.com
Mon Mar 3 21:24:27 EST 2014


On Mon, Mar 3, 2014 at 3:48 PM, Zachary Ware
<zachary.ware+pylist at gmail.com> wrote:
> It could be argued that Pip could compile any .py files that it
> installs and just start screaming if it gets any SyntaxError, but what
> if your package (for some weird reason) relies on .py file with bad
> syntax?

Somehow, I missed that this is exactly what seems to be happening,
sans screaming.  So yes, Pip is doing this slightly wrong, but it's
still on the package author to fix it properly.  But it's still not a
Python issue, since Pip is still a separate project.

-- 
Zach

On Mon, Mar 3, 2014 at 3:48 PM, Zachary Ware
<zachary.ware+pylist at gmail.com> wrote:
> On Mon, Mar 3, 2014 at 1:47 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
>> FTR I raised this as http://bugs.python.org/issue20846 and it was closed 11
>> minutes after I raised it.  I won't say anything else as I'm extremely tired
>> and irritable and might well regret it later.
>
> Best I can tell, the issue was closed correctly.  It doesn't look like
> a Python or Pip bug, it looks like a bug in pyttsx's packaging.  Based
> on empirical data [1], Pip does properly take care of running 2to3,
> but *only when told to do so*.  Pip can't decide whether it should run
> 2to3 when it hasn't been told either way, because it's not safe.  It
> can't try compiling .py files and running 2to3 if it gets
> SyntaxErrors, because what if the SyntaxError is just a SyntaxError,
> and not a ThisHasntBeenPortedToPython3Error?  Then 2to3 might blow up,
> possibly leaving things in a state that makes the underlying issue
> very hard to find.  It can't try importing the installed package,
> because what if importing without specific external state in place has
> ugly side-effects?  Pip can't safely do anything it's not told to do
> with the packages it installs because then responsibility for the fire
> in your hard drive could be laid at Pip's feet, not the evil evil
> package author who wrote the code that started the fire.
>
> It could be argued that Pip could compile any .py files that it
> installs and just start screaming if it gets any SyntaxError, but what
> if your package (for some weird reason) relies on .py file with bad
> syntax?
>
> I don't think Python itself is involved at all here, and I think Pip
> is doing the right thing.  Everything installed successfully into the
> right place (since `import pyttsx` did find the package); the fact
> that it SyntaxError'd out is on the package author.
>
> My 0.02USD, anyway.
>
> --
> Zach
>
> [1] `pip install sphinx` from a 3.4 venv



-- 
Zach



More information about the Python-list mailing list