question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip_editable_install() got an unexpected keyword argument 'upgrade'

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Manjaro Linux
  • Poetry version: 1.2.0a1 (on master)
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

when installing packages without pyproject.toml in edit mode, it raises following exception


  at ~/.local/pipx/venvs/poetry@master/lib/python3.9/site-packages/poetry/installation/executor.py:129 in pip_install
      125│         if editable:
      126│             func = pip_editable_install
      127│ 
      128│         try:
    → 129│             func(req, self._env, upgrade=upgrade)
      130│         except EnvCommandError as e:
      131│             output = decode(e.e.output)
      132│             if (
      133│                 "KeyboardInterrupt" in output

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
desophoscommented, Sep 15, 2021

I’m on Poetry version 1.2.0a2 and I’ve encountered this issue as well.

It appears to be caused by the mismatched signatures of pip_install and pip_editable_install. The upgrade kwarg is passed to both functions in executor.py, but pip_editable_install doesn’t take such an argument.

Adding an upgrade kwarg to pip_editable_install fixed the problem:

def pip_editable_install(directory: Path, environment: Env, upgrade: bool = True) -> Union[int, str]:
    return pip_install(
        path=directory, environment=environment, editable=True, deps=False, upgrade=upgrade
    )
1reaction
giladbarneacommented, Oct 26, 2021

@python-poetry/triage

Hi! I would like fix this, if not already fixed (would be my first PR).

I’m not sure which implementation style best matches the project’s. I made a chart that lays out the possibilities I could come up with (they’re not mutually exclusive). Can you tell me which one(s) to go with?

poetry-pip-install-editable-fix

Edit: The @python-poetry/triage tag above doesn’t work, does anyone know how to get the team’s attention?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install fails with TypeError: identify() got an unexpected ...
python - pip install fails with TypeError: identify() got an unexpected keyword argument 'requirement_or_candidate' - Stack Overflow. Stack ...
Read more >
Unable to install anything using pip due to TypeError #10750
Expected behavior I'd expect pip to be able to install packages without ... SafeFileCache.set() got an unexpected keyword argument 'expires' ...
Read more >
pipenv Documentation - Read the Docs
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >
pip install - pip documentation v22.3.1
pip install has several stages: Identify the base requirements. The user supplied arguments are processed here. Resolve dependencies. What will be installed is ......
Read more >
Broken Pip / Applications & Desktop Environments / Arch ...
After updating my system, Pip no longer functions. ... self.cache.set( TypeError: set() got an unexpected keyword argument 'expires'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found