Skip to content

orjson accidentally required? #142

@branchv

Description

@branchv

Describe the bug

#127 added an optional dependency on orjson:

orjson = {version = "^3.6.1", optional = true}

However, unless I'm missing something, this doesn't become truly optional for an end-user without adding an extra like:

[tool.poetry.extras]
orjson = ["orjson"]

To Reproduce

$ python3 -m venv venv
$ . .venv/bin/activate
$ pip install pywhat==3.4.0
$ pip freeze
click==7.1.2
colorama==0.4.4
commonmark==0.9.1
orjson==3.6.3
Pygments==2.10.0
pywhat==3.4.0
rich==10.7.0
$ curl -s https://pypi.org/pypi/pywhat/3.4.0/json | jq .info.requires_dist
[
  "click (>=7.1.2,<8.0.0)",
  "rich (>=9.9,<11.0)",
  "orjson (>=3.6.1,<4.0.0)"
]

Expected behavior

orjson to be an optional dep, only installed on request like pip install pywhat[orjson]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions