Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional dependencies for preconf libraries #337

Merged
merged 5 commits into from
Mar 21, 2023
Merged

Add optional dependencies for preconf libraries #337

merged 5 commits into from
Mar 21, 2023

Conversation

alexomics
Copy link
Contributor

This commit adds optional dependencies for the preconf libraries, allowing easier install for downstream users. E.G.:

pip install cattrs[tomlkit]

and (I hope) pyproject.toml:

[project]
name = "some-package"
version = "1"
dependencies = [
    "cattrs[ujson,tomlkit]"
]

It's a small change that moves the preconf dependencies out of the dev group and marks them as optional/extra. It adds an optional dependency on each library and a preconf option that installs all extras.

The change to the tox.ini is needed as I couldn't work out how, with poetry, to add the preconf dependencies back in so that they weren't duplicated.

I'm sure that I will need to update some docs for this, but I'm not sure where would be best!

This commit adds optional dependencies for the preconf factories,
allowing easier install for downstream users. E.G.:

```console
pip install cattrs[tomlkit]
```
@Tinche
Copy link
Member

Tinche commented Mar 13, 2023

Very cool, I'm in favor. Although I think the preconf extra is overkill and will be an attractive nuisance, bloating up people's dep lists.

Let's add a change log entry for sure, and to the preconf docs page.

@alexomics
Copy link
Contributor Author

Thanks for the quick reply! I've added some explanation to the preconf docs and a changelog entry. Let me know if you think it needs more detail

@Tinche
Copy link
Member

Tinche commented Mar 20, 2023

Looks like we have test failures, let's get that fixed and merge this in! Good job!

@Tinche
Copy link
Member

Tinche commented Mar 21, 2023

Sweet, thanks!

@Tinche Tinche merged commit a57feff into python-attrs:main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants