Replies: 2 comments 2 replies
-
Hey @astafan8 — thanks for asking! I'd be curious what the "very convoluted" discovery was 😆 You're right that the way these dependencies are set up is less than ideal. The reason they aren't dev dependencies is because then when you install I'm not aware of any major downsides to having these at runtime, but you're right it could/would speed up the deployment installation process at the very least. And obviously if you're having a conflict, that's a problem too! Can you say more about which versions are conflicting? My initial thought would be to just "loosen" the ranges Forge asks for (so maybe Beyond that, I think properly using dev dependencies would involve changing up the structure so the end user doesn't just install For today though I think we could definitely loosen up the constraints on some of these: |
Beta Was this translation helpful? Give feedback.
-
Sorry I sort of repeated what you said there — the reason we include pytest and black (for example) in Forge and want downstream users to get them is because of the commands |
Beta Was this translation helpful? Give feedback.
-
Hi! In a very convoluted way I've discovered this very interesting and amazing package, and I faced the following issue: the test/dev dependencies are part of the runtime dependencies of the forge package, here:
https://github.com/forgepackages/forge/blob/e2692d1be7a07c698dfbcbb2c42009cad2bbdf80/pyproject.toml#L47-L56
as a result, when i install the forge package, as a dependency of my package, the versions of black/pytest/etc start clashing with the versions of black/pytest that are used in my package. In other words, if I first install black/pytest/etc that I'd like to have for my package, and then install the forge package, i'll get the versions of black/pytest/etc that are pinned runtime dependencies of the forge. This effectively prevents me from using black/pytest/etc that I'd like to have in my package (well, it does not prevent, but i have to be mindful of the order of installations, etc).
Could you explain why that is? Perhaps it is part of being "opinionated way of implementing Django apps"? :) I am also veeeeery new to the forge package, so I might be missing a context of how it is used, so I apologize in advance if that's the case.
The recommendation that I found constructive and wide-spread is to separate dev/test dependencies like black/pytest/mypy/etc from the runtime dependencies of the package. Not only it enables the dependent packages define their own dev/test dependencies as they'd like, but also removes the amount of runtime dependencies of a package which speeds up its installation and simplifies maintenance.
Beta Was this translation helpful? Give feedback.
All reactions