Skip to content

orjson dependency fails to install in Python 3.13 #548

@alyssadai

Description

@alyssadai

Is there an existing issue for this?

  • I have searched the existing issues

Expected behavior

No response

Current behavior

orjson is a required dependency because we use ORJSONResponse inside the app:

However, the version of orjson locked in #529 doesn't have binaries for Python 3.13, and so the dependency installation fails with the error below.

Notes:

  • ORJSONResponse is actually now deprecated by FastAPI, so we should switch to just using JSONResponse to avoid needing orjson at all
  • based on this PR comment from when the dependency was introduced, it seems like ORJSONResponse is not necessary for the current code either

Error message

Using CPython 3.13.7 interpreter at: /home/adai/.pyenv/versions/3.13.7/bin/python3
Creating virtual environment at: .venv
Resolved 55 packages in 1ms
  × Failed to download and build `orjson==3.9.15`
  ├─:arrow_forward: Failed to parse: `/home/adai/.cache/uv/sdists-v9/pypi/orjson/3.9.15/Sa12-jHdMxVzL1JKecEPw/src/pyproject.toml`
  ╰─:arrow_forward: TOML parse error at line 1, column 1
        |
      1 | [project]
        | ^^^^^^^^^
      `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor
      present in the `project.dynamic` list

  help: `orjson` (v3.9.15) was included because `neurobagel-api` depends on `orjson`

Environment

  • OS: Ubuntu
  • Python/Node version: 3.13.7
  • Docker version:
  • Docker Compose version:

How to reproduce

  1. Clone the repo
  2. Run uv sync --group dev from the repo root

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesDependency updates and their version upgrades.

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions