Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2018-04-16 Thread Dan Ryan
FWIW we are using quite a bit of the internal api. My plan was to go over this once we cut over to the new warehouse uris. Of note might be the fact that pip-tools is a core dependency we bundle in pipenv and the current maintainer is a pipenv maintainer as well. For our specific case we have

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2018-04-14 Thread Nick Coghlan
On 15 April 2018 at 07:31, Donald Stufft wrote: > > On Apr 14, 2018, at 4:57 PM, Matthew Brett wrote: > > Is the suggestion to use the `_internal` import, or carry a copy of > the pep425tags code myself, that I have to keep up to date with the >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2018-04-14 Thread Donald Stufft
> On Apr 14, 2018, at 4:57 PM, Matthew Brett wrote: > > Is the suggestion to use the `_internal` import, or carry a copy of > the pep425tags code myself, that I have to keep up to date with the > internal pip copy? That would also involve me copying the `glibc` > part

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2018-04-14 Thread Matthew Brett
Hi, On Sun, Oct 22, 2017 at 8:52 AM, Elvis Stansvik wrote: > 2017-10-21 14:34 GMT+02:00 Paul Moore : >> On 21 October 2017 at 12:15, Nick Coghlan wrote: >>> (Note: this is entirely speculative, and I have no idea how hard it

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-22 Thread Elvis Stansvik
2017-10-21 14:34 GMT+02:00 Paul Moore : > On 21 October 2017 at 12:15, Nick Coghlan wrote: >> (Note: this is entirely speculative, and I have no idea how hard it would >> be, so please read it as the question it's intended to be) > > No problem - I don't

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-22 Thread Donald Stufft
> On Oct 21, 2017, at 10:30 PM, Nick Coghlan wrote: > > However, none of that impacts the question of whether `pip.main()` runs code > in the current process or implicitly runs it in a subprocess - `pip` doesn't > import the modules it installs either way, so it will all

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Nick Coghlan
On 22 October 2017 at 04:03, xoviat wrote: > Nick: > > That's generally a good idea, but one significant problem that can occur > is that the Python import system will cache certain libraries, people will > run "pip install," and then they will expect such libraries to be >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Paul Moore
On 21 October 2017 at 19:11, Alex Grönholm wrote: > I need to correct you here: wheel does *NOT* have a public API! Ah, sorry. I hadn't realised that. > It did previously have some documented functions but it was not really well > thought out and we recently decided

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Brett Cannon
On Sat, 21 Oct 2017 at 11:26 Donald Stufft wrote: > > > On Oct 21, 2017, at 2:15 PM, Brett Cannon wrote: > > as long as the module isn't already imported it's fine. > > > Negative imports get cached too don’t they? > Yes, that too. :) (aside: don't reply to

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Donald Stufft
> On Oct 21, 2017, at 2:15 PM, Brett Cannon wrote: > > as long as the module isn't already imported it's fine. Negative imports get cached too don’t they?___ Distutils-SIG maillist - Distutils-SIG@python.org

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Brett Cannon
On Sat, 21 Oct 2017 at 11:03 xoviat wrote: > Nick: > > That's generally a good idea, but one significant problem that can occur > is that the Python import system will cache certain libraries, people will > run "pip install," and then they will expect such libraries to be >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Alex Grönholm
Paul Moore kirjoitti 21.10.2017 klo 13:03: On 20 October 2017 at 23:53, Richard Jones wrote: Hiya Paul, There's a bunch of tooling out there using pip's internals to extending pip's functionality. Could you please provide a some reasoning as to why they're all going to

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread xoviat
Nick: That's generally a good idea, but one significant problem that can occur is that the Python import system will cache certain libraries, people will run "pip install," and then they will expect such libraries to be available. I don't even know exactly how the caching for the import system

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Paul Moore
On 21 October 2017 at 12:15, Nick Coghlan wrote: > (Note: this is entirely speculative, and I have no idea how hard it would > be, so please read it as the question it's intended to be) No problem - I don't know myself how hard some of this would be, either ;-) > Do you know

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Richard Jones
Thanks for writing that detailed explanation, Paul (and all your other hard work!) Richard On 21 October 2017 at 21:03, Paul Moore wrote: > On 20 October 2017 at 23:53, Richard Jones wrote: > > Hiya Paul, > > > > There's a bunch of tooling

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Nick Coghlan
On 21 October 2017 at 20:03, Paul Moore wrote: > Likely the biggest problems will be for people who call into the pip > resolver and build APIs, as I don't know of any alternatives out > there. But they were *definitely* breaking anyway, as we've made major > changes to that

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-21 Thread Paul Moore
On 20 October 2017 at 23:53, Richard Jones wrote: > Hiya Paul, > > There's a bunch of tooling out there using pip's internals to extending > pip's functionality. Could you please provide a some reasoning as to why > they're all going to be broken at pip 10, and possibly

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread xoviat
The short answer is that someone complained about the pip API not doing what they wanted it to do, so we broke the API to make it clear to everyone that the API is not something that should be depended on. 2017-10-20 17:53 GMT-05:00 Richard Jones : > Hiya Paul, > >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Richard Jones
Hiya Paul, There's a bunch of tooling out there using pip's internals to extending pip's functionality. Could you please provide a some reasoning as to why they're all going to be broken at pip 10, and possibly some guidance on how to get that functionality back? Cheers, Richard On 21

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Noah Kantrowitz
While I understand that pip itself has to be very careful about edge cases and all the pathological things you can do in setup.py, as a higher-level tooling author my priorities are on the happy path UX and speed is a big factor there. So yes, using PackageFinder is potentially inaccurate, but

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread xoviat
The "installing collected packages" output is not always correct. The "successfully installed [package list]" is always correct (see pypa/pip/issues/4724 for an example). I understand your requirements, but is the practical implication that pip should offer a command that outputs packages that

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Noah Kantrowitz
Installing to a temp dir is really not an option for automated tooling (if nothing else, it takes way too long). `pip list --outdated` does already get fairly close to this (and doesn't install anything I suspect you can actually get a lot closer than you think) but it calculates for all

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread xoviat
A correct dry-run implementation will do about the same amount of work as installing to a temporary directory right now. In the future, that could be optimized, but any patch to the finder doesn't actually detect the requirements correctly (as they're not necessarily known until after the wheels

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread xoviat
There's no dry-run functionality that I know of so far. However, you could use the following: pip install --prefix=tmpdir This command is actually about the same speed as a proper implementation, because we can't actually know what we're installing until we build the requirements. 2017-10-20

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Donald Stufft
> On Oct 20, 2017, at 9:30 AM, Paul Moore wrote: > > On 20 October 2017 at 14:26, Matthew Brett wrote: >> Thanks for the heads-up. >> >> Will y'all be doing a PyPI pre-release so we can test with `pip >> install --pre -U pip`? > > We've not yet

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Noah Kantrowitz
So as someone on the tooling side, is there any kind of install dry-run yet? I've got https://github.com/poise/poise-python/blob/master/lib/poise_python/resources/python_package.rb#L34-L78 which touches a tn of internals. Basically I need a way to know exactly what versions `pip install`

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Alex Grönholm
Yeah, +1 from me too. Pip is one project where people will highly likely try out the pre-release versions. xoviat kirjoitti 20.10.2017 klo 20:34: +1 on pre-release wheels. I've seen the process in action with SciPy, and it helped to catch at least one significant bug. 2017-10-20 8:30

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread xoviat
+1 on pre-release wheels. I've seen the process in action with SciPy, and it helped to catch at least one significant bug. 2017-10-20 8:30 GMT-05:00 Paul Moore : > On 20 October 2017 at 14:26, Matthew Brett > wrote: > > Thanks for the heads-up. > >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Alex Grönholm
Perhaps pkg_resources.find_distributions()? http://setuptools.readthedocs.io/en/latest/pkg_resources.html#getting-or-creating-distributions Jannis Gebauer kirjoitti 20.10.2017 klo 16:55: Thanks for the heads-up, Paul. I’m currently using `pip.get_installed_distributions` and as far as I can

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Jannis Gebauer
Thanks for the heads-up, Paul. I’m currently using `pip.get_installed_distributions` and as far as I can see that has moved into `_internal`, too: https://github.com/pypa/pip/blob/master/src/pip/_internal/utils/misc.py#L333

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Paul Moore
On 20 October 2017 at 14:55, Jannis Gebauer wrote: > Thanks for the heads-up, Paul. > > I’m currently using `pip.get_installed_distributions` and as far as I can > see that has moved into `_internal`, too: >

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Paul Moore
On 20 October 2017 at 14:26, Matthew Brett wrote: > Thanks for the heads-up. > > Will y'all be doing a PyPI pre-release so we can test with `pip > install --pre -U pip`? We've not yet decided on that. Traditionally I don't think we have done so, but I'm inclined to think

Re: [Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Matthew Brett
Hi, On Fri, Oct 20, 2017 at 2:22 PM, Paul Moore wrote: > We're in the process of starting to plan for a release of pip (the > long-awaited pip 10). We're likely still a month or two away from a > release, but now is the time for people to start ensuring that > everything

[Distutils] Announcement: Pip 10 is coming, and will move all internal APIs

2017-10-20 Thread Paul Moore
We're in the process of starting to plan for a release of pip (the long-awaited pip 10). We're likely still a month or two away from a release, but now is the time for people to start ensuring that everything works for them. One key change in the new version will be that all of the internal APIs