# Pip 19.1 and installing in editable mode with pyproject.toml

**URL:** <https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553>\
**Category:** Packaging\
**Created:** [April 26, 2019, 1:15pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553 "2019-04-26T13:15:18Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [April 29, 2019, 9:10pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/41 "2019-04-29T21:10:57Z")

</div>

I’m sorry if my words seemed harsh, let me rephrase: it would be very nice and much appreciated if we would not need to wait for an entire week to fix a bug that affects a wide range of projects and workflows.

I know it’s not easy to please everyone, and it’s bound you’ll break someone, sometimes. I maintain both tox and virtualenv nowadays, and those are also crucial projects. When I schedule a release I always try to be available the next two days to release any major breakage the release might cause.

I just wanted to say, I appreciate very much all the work people put in into making pip a better tool and my honest gratitude for it. I would recommend for breaking changes a different approach, revert first, deploy fix and then discuss how to go ahead. Instead of how now things stand, keep breakage, come up with a solution all agree, deploy fix. I’m saying this to improve confidence of people in our tools, I’ve encountered many people who were often smashing tools because new version always break and they have to pin CI all the time to not stop development on crucial projects. Again just my humble opinion and feel free to disagree.

---

<div class="post-metadata">

**Author:** ![ncoghlan](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ncoghlan/32/14266_2.png) [@ncoghlan](https://discuss.python.org/u/ncoghlan)\
**Post date:** [April 30, 2019, 6:36am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/42 "2019-04-30T06:36:37Z")

</div>

+1 for just reverting to the 19.0.3 behavior in 19.1.1.

The PEP 517 migration plan for editable installs can then be revisited in a future release.

---

<div class="post-metadata">

**Author:** ![cjerdonek](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cjerdonek/32/63_2.png) [@cjerdonek](https://discuss.python.org/u/cjerdonek)\
**Post date:** [April 30, 2019, 7:30am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/43 "2019-04-30T07:30:43Z")

</div>

> [@pganssle](#):
>
> I think a simple reversion to the 19.0.3 behavior is good enough for the short term,

The PR doing this was merged earlier today: [Restore pyproject.toml handling to its version 19.0.3 state by cjerdonek · Pull Request #6449 · pypa/pip · GitHub](https://github.com/pypa/pip/pull/6449)

> [@pganssle](#):
>
> I just checked and it looks like `pip install -e .` _does_ install the `build-system.requires` requirements on 19.0.3, so I think the “fall back to PEP 518” logic is there already.

With the reversion, I believe there are certain things that won’t work right. Like, in 19.0.3 I believe passing `--no-use-pep517` caused `build-system.requires` to be ignored when it shouldn’t be when no build-backend was specified. This is one thing 19.1 should have fixed. I wonder if this will now cause problems since people have been instructed to start passing `--no-use-pep517`.

There is also this issue, which will need to be reopened, but I’m not sure if it’s an issue with pip or not: ["conflict with the backend dependencies" error running pip install in editable mode with pyproject.toml / PEP-517 enabled project · Issue #6314 · pypa/pip · GitHub](https://github.com/pypa/pip/issues/6314)

> [@pradyunsg](#):
>
> I’m not sure how that would affect the code changes/test improvements made by Chris for that bit of code

Those have been removed by the reversion.

---

<div class="post-metadata">

**Author:** ![techalchemy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/techalchemy/32/238_2.png) [@techalchemy](https://discuss.python.org/u/techalchemy)\
**Post date:** [April 30, 2019, 11:27pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/44 "2019-04-30T23:27:59Z")

</div>

> [@cjerdonek](#):
>
> With the reversion, I believe there are certain things that won’t work right. Like, in 19.0.3 I believe passing `--no-use-pep517` caused `build-system.requires` to be ignored when it shouldn’t be when no build-backend was specified. This is one thing 19.1 should have fixed. I wonder if this will now cause problems since people have been instructed to start passing `--no-use-pep517` .

This does hit pipenv quite hard as we use `--no-use-pep517` in combination with `--no-build-isolation` as a fallback during installation failures for cases where environments might use versions of pip + setuptools that took `.` off of the path.

Given the current pip release this puts is in a kind of weird predicament because a lot of people (self included) have `pyproject.toml` files which don’t specify a backend but do specify requirements. The mere presence of that metadata forces pip to treat this as a pep517 project now, so anyone using `-e` as an installation mode will automatically experience the failure. For us, if that user then adds the `build-backend` key, they won’t be able to use editable installs & existing pipfiles and lockfiles will be broken.

For remote URLs anything pointing at a project with a `pyproject.toml` that is also editable is now broken. It seems like there may not be any way around this besides telling everyone to go modify their dependencies and remove the `editable` flag or to set the environment variable that prevents virtualenv from installing the latest version of pip when creating environments.

I accept that there are a lot of issues with editable installs but I _think_ this may merit a deprecation cycle or 20. I know I’ve chatted with a bunch of folks about this in the past, would love to chat with you too @cjerdonek / @pradyunsg / @pf_moore because we are doing some substantial jumping through hoops for dependency resolution on editable / VCS / URL packages that could be simplified with some consideration. Changes to this cause serious breakages for us even if it is ultimately thought to be an improvement.

---

<div class="post-metadata">

**Author:** ![pganssle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pganssle/32/245_2.png) [@pganssle](https://discuss.python.org/u/pganssle)\
**Post date:** [May 1, 2019, 1:59am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/45 "2019-05-01T01:59:38Z")

</div>

> [@techalchemy](#):
>
> I accept that there are a lot of issues with editable installs but I _think_ this may merit a deprecation cycle or 20.

It’s not clear, what are you suggesting should be deprecated? I think we’re all just talking about “what do we do while we work on the standard?” We can’t and shouldn’t go through deprecation cycles to transition people from one temporary behavior to another temporary behavior. Best to stick with a behavior that doesn’t break anything that _currently exists_ (e.g. reverting), and try and fix bugs that come up with band-aids that don’t create any _new_ reliance on weird hacked-together behavior.

---

<div class="post-metadata">

**Author:** ![cjerdonek](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cjerdonek/32/63_2.png) [@cjerdonek](https://discuss.python.org/u/cjerdonek)\
**Post date:** [May 1, 2019, 6:27am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/46 "2019-05-01T06:27:26Z")

</div>

> [@techalchemy](#):
>
> > [@cjerdonek](#):
> >
> > With the reversion, I believe there are certain things that won’t work right. Like, in 19.0.3 I believe passing `--no-use-pep517` caused `build-system.requires` to be ignored when it shouldn’t be when no build-backend was specified. This is one thing 19.1 should have fixed. I wonder if this will now cause problems since people have been instructed to start passing `--no-use-pep517` .
> 
> This does hit pipenv quite hard as we use `--no-use-pep517` in combination with `--no-build-isolation` as a fallback during installation failures for cases where environments might use versions of pip + setuptools that took `.` off of the path.

To clarify, are you saying the 19.0.3 behavior hit pipenv quite hard, or that the reversion will hit pipenv quite hard given that 19.1 has already gone out?

I ask because there is still the possibility of restoring just the part of 19.1 that causes `build-system.requires` to no longer be ignored if `--no-use-pep517` is passed. But given the urgency, that should only be done IMO if we know or expect that a simple reversion could cause additional problems.

> [@techalchemy](#):
>
> I know I’ve chatted with a bunch of folks about this in the past, would love to chat with you too @cjerdonek / @pradyunsg / @pf_moore because we are doing some substantial jumping through hoops for dependency resolution on editable / VCS / URL packages that could be simplified with some consideration.

Happy to talk! VCS / editable installs are of special interest to me (independent of anything related to PEP 517), and I am / have been actively working on improving the code base and functionality in that area.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [May 1, 2019, 7:15pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/47 "2019-05-01T19:15:45Z")

</div>

> [@cjerdonek](#):
>
> To clarify, are you saying the 19.0.3 behavior hit pipenv quite hard, or that the reversion will hit pipenv quite hard given that 19.1 has already gone out?

From what I understand he’s saying exactly the opposite. Passing `--no-use-pep517` in combination with `--no-build-isolation` should make editable installs work under all cases, both when pyproject.toml is present or when the requires+build-backend is specified. I would advise to go ahead with the release of the reverts.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [May 1, 2019, 8:38pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/48 "2019-05-01T20:38:15Z")

</div>

The question of how to address the issue that originally prompted these changes is still outstanding, as well as the other possible issue @cjerdonek mentioned:

> [@cjerdonek](#):
>
> With the reversion, I believe there are certain things that won’t work right. Like, in 19.0.3 I believe passing `--no-use-pep517` caused `build-system.requires` to be ignored when it shouldn’t be when no build-backend was specified.

I get that this is a major problem, but IMO there’s still a lot of pressure being exerted to get the reversion rushed in. There are genuine questions that have been raised in good faith, and the key parties here have very little spare time - for better or worse. It’s increasingly difficult to focus what time we do have available on ensuring we don’t make things worse with a second problematic release.

Given that the reversion has been available in master since yesterday, can any of the people pushing for a quick reversion confirm if they’ve tested the current master against (a copy of) their live workflows and that it’s solid? That would be very helpful in reassuring the pip developers that things are looking OK to go ahead with the reversion as it stands, and worry about further fixes in a more considered fashion.

---

<div class="post-metadata">

**Author:** ![meejah](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/meejah/32/927_2.png) [@meejah](https://discuss.python.org/u/meejah)\
**Post date:** [May 2, 2019, 9:01pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/49 "2019-05-02T21:01:27Z")

</div>

pip master works once more for my use-case (which was broken in 19.1). The use-case is “pip install -e” works again for [https://github.com/crossbario/crossbar](https://github.com/crossbario/crossbar) which uses `pyproject.toml` just for configuring the `towncrier` tool.

---

<div class="post-metadata">

**Author:** ![btskinn](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/btskinn/32/835_2.png) [@btskinn](https://discuss.python.org/u/btskinn)\
**Post date:** [May 2, 2019, 10:09pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/50 "2019-05-02T22:09:40Z")

</div>

pip@master gives [passing CI](https://travis-ci.org/bskinn/sphobjinv/builds/527520252) for a project [with both ‘requires’ and ‘build-backend’ in pyproject.toml](https://github.com/bskinn/sphobjinv/blob/6e2eea12c04114574107b7b7f6bb0131c4fc094e/pyproject.toml), after [revising](https://github.com/bskinn/sphobjinv/commit/9fc62b82b4865f4c033f6121c5407f23f12b1f7e) my requirements file to include ‘-e .’ and remove ‘setup.py develop’ from the CI install step.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [May 3, 2019, 2:08pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/51 "2019-05-03T14:08:58Z")

</div>

Thanks @btskinn and @meejah for your efforts to confirm the fix.

---

<div class="post-metadata">

**Author:** ![jriddy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jriddy/32/902_2.png) [@jriddy](https://discuss.python.org/u/jriddy)\
**Post date:** [May 3, 2019, 3:09pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/52 "2019-05-03T15:09:49Z")

</div>

> [@btskinn](#):
>
> pip@master gives [passing CI](https://travis-ci.org/bskinn/sphobjinv/builds/527520252) for a project [with both ‘requires’ and ‘build-backend’ in pyproject.toml](https://github.com/bskinn/sphobjinv/blob/6e2eea12c04114574107b7b7f6bb0131c4fc094e/pyproject.toml), after [revising](https://github.com/bskinn/sphobjinv/commit/9fc62b82b4865f4c033f6121c5407f23f12b1f7e) my requirements file to include ‘-e .’ and remove ‘setup.py develop’ from the CI install step.

This is odd, I’m not able to get this to work with the latest pip master. I have a build-backend set as setuptools.build\_meta, and I get `ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta in pyproject.toml`. Is this what is intended?

---

<div class="post-metadata">

**Author:** ![btskinn](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/btskinn/32/835_2.png) [@btskinn](https://discuss.python.org/u/btskinn)\
**Post date:** [May 3, 2019, 3:29pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/53 "2019-05-03T15:29:54Z")

</div>

If it’s relevant, if you’re using `--no-use-pep517` in your requirements spec, I think you need to take it out for now.

Yeah, IIUC it’s likely not how it will work down the line, once the details are ironed out.

---

<div class="post-metadata">

**Author:** ![jriddy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jriddy/32/902_2.png) [@jriddy](https://discuss.python.org/u/jriddy)\
**Post date:** [May 3, 2019, 3:43pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/54 "2019-05-03T15:43:49Z")

</div>

@btskinn I’m not using that, so I’m not sure what’s wrong, but I think I’ve read enough of what @cjerdonek says to understand his concerns about future-proofing. So the best way forward for now may be to just remove `build-backend` until [the spec process](https://discuss.python.org/t/specification-of-editable-installation/1564/14) gets worked out. I’ll figure out a way to use direct setuptools to build my distribution packages in CI.

I’ve found you can include `toml` in `build-system.requires` and then use that in `setup.py` to re-extract the build requirements and add them as an extra, such that `pip install .[build]` creates an environment where `python setup.py` is valid. It seems like a hack to recursively bootstrap the build systems like this, but I guess it’s better than relying on coincidentally useful undefined behavior.

---

<div class="post-metadata">

**Author:** ![jriddy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jriddy/32/902_2.png) [@jriddy](https://discuss.python.org/u/jriddy)\
**Post date:** [May 3, 2019, 5:28pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/55 "2019-05-03T17:28:06Z")

</div>

Never mind, I’m dumb, I had `use-pep517 = false` set set in pip.conf

I too confirm that pip@master works like 19.0.3 did regarding editable installs

---

<div class="post-metadata">

**Author:** ![uranusjr](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/uranusjr/32/103_2.png) [@uranusjr](https://discuss.python.org/u/uranusjr)\
**Post date:** [May 3, 2019, 5:57pm UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/56 "2019-05-03T17:57:42Z")

</div>

> [@jriddy](#):
>
> Never mind, I’m dumb, I had `use-pep517 = false` set set in pip.conf

I have a feeling this predicts what’s going to happen if the revert is released as-is. We’ll need to make `use-pep517` somehow not break things (maybe add a hack to drop it when `editable` is set?)

---

<div class="post-metadata">

**Author:** ![cjerdonek](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cjerdonek/32/63_2.png) [@cjerdonek](https://discuss.python.org/u/cjerdonek)\
**Post date:** [May 4, 2019, 3:00am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/57 "2019-05-04T03:00:03Z")

</div>

> [@uranusjr](#):
>
> > [@jriddy](#):
> >
> > Never mind, I’m dumb, I had `use-pep517 = false` set set in pip.conf
> 
> I have a feeling this predicts what’s going to happen if the revert is released as-is. We’ll need to make `use-pep517` somehow not break things (maybe add a hack to drop it when `editable` is set?)

This is precisely the kind of thing I was warning about in a couple of my comments above (included again at bottom), though the case above is slightly different from what I mentioned. Basically, 19.1 broke things for certain people, and the advice for them to unbreak was to add `--no-use-pep517`. But reverting as-is could re-break things for those same people, with the “fix” being to remove the `--no-use-pep517` which they just added. The question was whether that’s an acceptable user experience to folks given the urgency.

> [@cjerdonek](#):
>
> Like, in 19.0.3 I believe passing `--no-use-pep517` caused `build-system.requires` to be ignored when it shouldn’t be when no build-backend was specified. This is one thing 19.1 should have fixed. I wonder if this will now cause problems since people have been instructed to start passing `--no-use-pep517` .

> [@cjerdonek](#):
>
> I ask because there is still the possibility of restoring just the part of 19.1 that causes `build-system.requires` to no longer be ignored if `--no-use-pep517` is passed. But given the urgency, that should only be done IMO if we know or expect that a simple reversion could cause additional problems.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [May 4, 2019, 3:22am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/58 "2019-05-04T03:22:32Z")

</div>

I believe was added recently enough to back out from it, the longer we hold on to it, the more discomfort it might cause.

---

<div class="post-metadata">

**Author:** ![uranusjr](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/uranusjr/32/103_2.png) [@uranusjr](https://discuss.python.org/u/uranusjr)\
**Post date:** [May 4, 2019, 3:26am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/59 "2019-05-04T03:26:43Z")

</div>

I agree it’s recently enough if you consider the whole community, but not for those who already adapted. We’ve broken things for them and tell them to fix their own things, and now we break their things _again_ and tell them “yeah sry, you need to fix _your_ thing _again_”? That would have left a very bad taste in my mouth if I were in their position.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [May 4, 2019, 3:42am UTC](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553/60 "2019-05-04T03:42:42Z")

</div>

So what are you proposing? We already are still breaking all people who do pep-517… this would only break people doing PEP-518 only.

[Previous page](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553.md?page=2)

[Next page](https://discuss.python.org/t/pip-19-1-and-installing-in-editable-mode-with-pyproject-toml/1553.md?page=4)
