Skip to content

Trouble with Poetry Operations for a Project Dependent on FastAPI-Cache (commit # 8f0920d , dependency redis) #417

Open
@SudeshnaBora

Description

@SudeshnaBora

I'm working on a project and have specified a dependency in the pyproject.toml file as follows:

[tool.poetry.dependencies]
fastapi-cache2 = {extras = ["redis"], git = "https://github.com/long2ice/fastapi-cache.git", rev = "8f0920d"}

When I run poetry install, it completes successfully. However, attempting to run poetry lock, poetry add "fastapi-cache2[redis]@git+https://github.com/long2ice/fastapi-cache.git#8f0920d", or poetry update <any-other-dependency> results in failures. The error message indicates a CalledProcessError, mentioning that a subprocess command returned a non-zero exit status:

CalledProcessError
  Command '['/path/to/.venv/bin/python', '-']' returned non-zero exit status 1.
  at /path/to/python3.11/subprocess.py:569 in run

Further details from the error suggest an EnvCommandError, indicating an issue with executing a command in the environment:

EnvCommandError
  Command ['/path/to/.venv/bin/python', '-'] errored with the following return code 1
  Output:
  Traceback (most recent call last):
    ...
    raise BuildException(f'Source {srcdir} does not appear to be a Python project: no pyproject.toml or setup.py')
  build.BuildException: Source /path/to/cache/pypoetry/virtualenvs/project-py3.11/src/fastapi-cache does not appear to be a Python project: no pyproject.toml or setup.py

I attempted to replicate this in a fresh poetry project using the poetry add "fastapi-cache2[redis]@git+https://github.com/long2ice/fastapi-cache.git#8f0920d" command, but encountered a different issue:

Failed to clone https://github.com/long2ice/fastapi-cache.git at '8f0920d', verify ref exists on remote.

I've confirmed that the specific commit 8f0920d indeed contains a pyproject.toml file.

Cloning the project and checking out this commit works fine outside of Poetry, which suggests there may be a bug within Poetry or the way it interacts with this specific git dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions