python-poetry / python-poetry/poetry

[macos] poetry add fails when file or path is in /tmp or /var

Open
#6,862 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • Poetry version: 1.2.2

  • Python version: 3.9.13

  • OS version and name: macOS 12.1

  • pyproject.toml: pyproject.toml

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

When the file or path is is /tmp or /var on macos, poetry add /path/to/file.whl fails silently. When rerun with -vvv we get an AssertionError in mixology/partial_solution.py:_register (full stacktrace here). This is the same symptom as https://github.com/python-poetry/poetry/issues/6054, which is marked solved. This also has different repro steps.

Repro:

  • mkdir /tmp/bar
  • pip download -d /tmp/bar requests
  • poetry add /tmp/bar/requests-2.28.1-py3-none-any.whl`

Note that pip install works here as does poetry add /private/tmp/bar/requests-2.28.1-py3-none-any.whl

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AssertionError in mixology/partial_solution.py:_register and reproduce it using the listed /tmp and /private/tmp wheel paths. Compare the failing poetry add command with the working pip install and private-path invocation; done means poetry add succeeds for the /tmp path without silently failing or raising the assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.