3.4rc2 and pip on windows
Ned Deily
nad at acm.org
Mon Mar 3 22:38:24 EST 2014
In article
<CAKJDb-OwrgCiTXZmBuzw534sHhsY5CjMLAfcnO+6rDKrzbEJyw at mail.gmail.com>,
Zachary Ware <zachary.ware+pylist at gmail.com> wrote:
> 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.
FTR, pip is not doing anything wrong: see the updates to Issue20846 and
the discussion on python-dev. The "syntax error" messages displayed are
warnings which originate from Distutils (which is called by pip and
other installers) when it tries to byte-compiles the installed files,
which actually do install successfully. Byte-compiling is merely an
optimization and installs do not (and should not) depend on them. But
just because a package installs without error doesn't mean it executes
without error. The real problem is that the package that was trying to
be installed with Python 3 is not compatible with Python 3 but there is
currently no way for pip or any other installer to know that, other than
perhaps by running a package's test suite if one is provided. The
package author could include metadata hints ("Requires-Python") about
which versions of Python are supported by the package but those optional
hints aren't used today by any installer. Having more usable and
reliable metadata is a focus of packaging PEPs in various stages of
design and development. The goal is that eventually installers would be
able to detect Python version mismatches. Today it is up to the person
installing a package to determine that.
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list