-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Introduce uv
for Project Management
#547
Conversation
The test failures are caused by changes introduced in Pydantic 2.10 and are unrelated to the changes in this PR. However, it was found that in Python 3.9 or earlier combined with Pydantic 2.10, pydantic-settings/pydantic_settings/sources.py Lines 2001 to 2005 in 4b6fd3d
As a workaround, applying the following change allows the tests to pass, but I am unsure if this is the appropriate solution. elif isinstance(obj, WithArgsTypes) and sys.version_info >= (3, 9): I believe it would be best to handle the test failures separately from this PR. What do you think? |
Thanks @KanchiShimono for this PR. Yes, it is better to handle the test failure in separate PR. I think @kschwab can fix the problem because he wrote most of the code there and he is the CLI expert |
@hramezani @kschwab
|
@KanchiShimono you need to rebase. we removed support for Python 3.8 and fixed the bug |
I have rebased the branch to incorporate the latest changes from main. |
.github/workflows/ci.yml
Outdated
- name: set up python | ||
uses: actions/setup-python@v5 | ||
- name: set up uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: install | ||
run: pip install -U build | ||
|
||
- name: check GITHUB_REF matches package version | ||
uses: samuelcolvin/check-python-version@v3.1 | ||
uses: samuelcolvin/check-python-version@v4.1 | ||
with: | ||
version_file_path: pydantic_settings/version.py | ||
|
||
- name: build | ||
run: python -m build | ||
run: uv build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not change the release
part. as we are using the same thing in pydantic.
@KanchiShimono I requested a small change, other than that LGTM. |
@hramezani I have borrowed the release part from the latest version of Pydantic. Additionally, I have upgraded the default Python version used in GitHub Actions to 3.12. |
Thanks @KanchiShimono |
This Pull Request introduces
uv
to improve project management. The key reasons for adoptinguv
are as follows:Unified Environment Management
uv
allows managing Python versions, virtual environments, and dependencies with a single tool, reducing the overhead of environment setup.Strict Dependency Management
uv
precisely manages dependencies based on OS, CPU architecture, and Python versions. In contrast, the current approach usingpip-compile
generates lock files tied to the developer's Python version, which can lead to unexpected issues (e.g., failing to resolve dependencies for libraries that have dropped support for older Python versions).High Performance
With optimized dependency resolution and caching mechanisms,
uv
provides a fast and efficient package management experience.Consistency Across the Organization
Since Pydantic has already adopted
uv
, standardizing project management tools within the same organization reduces cognitive load for developers.