AllenNeuralDynamics / AllenNeuralDynamics/biodata-schema

Relax pydantic upper bound to <3.0

Đang mở
#3 1 bình luận 0 reaction 1 người được giao Được @dbirman nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

> [!Note]
> I'm opening this issue here because issues are disabled on the aind-data-schema repo, and [aind-data-schema#1870](https://github.com/AllenNeuralDynamics/aind-data-schema/issues/1870) directs all new requests to this repo.

## Problem

**aind-data-schema** restricts pydantic to `>=2.7, <2.12`. The upper bound was added
because of a regression in pydantic 2.12 around `model_validators`, but https://github.com/AllenNeuralDynamics/aind-data-schema/pull/1583 fixed that.
So the constraint seems to have outlived the bug.

## Proposal

Relax the bound to `pydantic>=2.7, <3.0`.

To catch this kind of breakage before downstream users do, you can test both ends of the declared range in CI using uv's [`--resolution` strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy):

```yaml
strategy:
matrix:
resolution: ["lowest-direct", "highest"]

steps:
- uses: astral-sh/setup-uv@v5
- run: uv pip install -e .[dev] --resolution ${{ matrix.resolution }} --system
- run: coverage run -m unittest discover && coverage report
```

`highest` catches new releases (like pydantic 2.12) the day they ship. You can run it on a schedule and it fails here first, instead of in downstream projects. `lowest-direct` verifies the `>=2.7` floor still actually works. `uv pip install` is a drop-in replacement for the current `pip install -e .[dev]` step, so existing test/lint commands run unchanged.

Happy to open a PR for either piece.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.