Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Relax version specification for dependencies following semver #683

Closed
@nejch

Description

@nejch

Description

Currently quite a few prod dependencies are defined in very strict ranges, even though commitizen is likely to be installed more as a library along with other dependencies rather than a single application. See:

questionary = "^1.4.0"
decli = "^0.5.2"
colorama = "^0.4.1"
termcolor = [
{ "version" = "^1.1", python = "< 3.7" },
{ "version" = ">= 1.1, < 3", python = ">= 3.7" },
]
packaging = ">=19"
tomlkit = ">=0.5.3,<1.0.0"
jinja2 = ">=2.10.3"
pyyaml = ">=3.08"
argcomplete = ">=1.12.1,<2.2"
typing-extensions = "^4.0.1"
charset-normalizer = ">=2.1.0,<3.1"

Partially I would blame poetry's default behavior for adding dependencies, which is more restrictive than you'd really want for libraries IMO. So I'd personally use PEP-440 specifiers here rather than poetry's custom caret versioning.

For dependencies that reliably follow semver, I think it's not an issue to at least allow the current major version, or even open it up completely and restrict versions only when there are issues, which is more common in python IMO (this is not npm so we cannot have multiple versions of transitive dependencies at the same time.. so we kind of have to be a bit more broad with ranges to make life easier).

/cc @jakob-keller

Possible Solution

Check the current production dependencies and see if they follow semantic versioning. If they do, assume good intentions and lock only major versions for those ;)

Additional context

No response

Additional context

#680

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions