GoogleCloudPlatform / GoogleCloudPlatform/alloydb-python-connector

Add upper/lower bounds to dependencies in pyproject.toml

Open
#450 0 comments 0 reactions 1 assignee Assigned to @rhatgadkar-goog View on GitHub
priority: p2 type: cleanup
Dominant language
Python
Stars
38
Forks
8
Avg merge
21m
Merged PRs (30d)
3

Description

There is no upper/lower bound on dependencies in `pyproject.toml`: https://github.com/GoogleCloudPlatform/alloydb-python-connector/blob/3b5ea2ff8df18e94ec70adc00f17fedae4547d2b/pyproject.toml#L43-L52

We should add lower bounds and test against those to ensure that new changes are compatible with the minimum version of a dependency.

As an example, see https://github.com/googleapis/python-bigquery-storage/blob/main/testing/constraints-3.7.txt where minimum versions of dependencies are tested. The reason is that we want tests to fail if the minimum version that we specify no longer works

For the upper bound, one reason to prevent pulling the latest major version of a dependency is that it's untested and could have a breaking change.

`requirements.txt` and `constraints.txt` have different purposes. For constraints, we want to check that tests pass with the minimum versions of dependencies. `requirements.txt` helps maintainers/CI have a consistent environment when running tests. In the latter case, we may want the latest versions of dependencies. May want to consider renaming the current `requirements.txt` to `requirements-test.txt` to show it is for testing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.