Skip to content

Conversation

@bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Mar 20, 2025

Summary

  • introduce uv as the dependency managment tool for Proposal: Package manager migration from poetry to uv #16305
  • changes
    • replace poetry to uv 0.6.x as the dependency manager
    • duplicated all the Python related CI tests based onto uv
    • changes in pyproject.toml
      • remove [tool.poetry.dependencies] section
        • due to uv uses [dependencies] for main dependencies declaration
        • use [dependencies]` for main dependencies declaration
        • project.dependencies cannot be placed with project.dynamic at the same time , so the dependencies has to be removed from project.dynamic
configuration error: You cannot provide a value for `project.dependencies` and list it under `project.dynamic` at the same time
      DESCRIPTION:
          According to PEP 621:  Build back-ends MUST raise an error if the metadata
          specifies a field statically as well as being listed in dynamic.

Tip

Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Mar 21, 2025

This PR is intended to demonstrate the possible impacts and necessary changes for introducing uv tool as a 'sidecar' dependency manager. It'll be rebased on to the master branch often , before it's finally considered to be merged.

It does show the feasibility to use, test, lint and build the Dify api services in all CI tests.

@bowenliang123 bowenliang123 force-pushed the uv branch 3 times, most recently from dec0b22 to 714eb95 Compare March 24, 2025 15:46
@bowenliang123 bowenliang123 changed the title [WIP] initial uv support initial uv support Mar 24, 2025
@bowenliang123 bowenliang123 changed the title initial uv support build: Initial uv support Mar 24, 2025
@bowenliang123 bowenliang123 force-pushed the uv branch 11 times, most recently from 1d0b651 to 789ccba Compare March 28, 2025 13:51
@bowenliang123 bowenliang123 force-pushed the uv branch 6 times, most recently from 8720550 to d932de5 Compare April 7, 2025 09:58
@bowenliang123 bowenliang123 marked this pull request as ready for review April 7, 2025 09:59
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Apr 7, 2025
@QuantumGhost
Copy link
Collaborator

@bowenliang123 Hello, I’ve almost finished the process of migrating the package manager from Poetry to uv, including updates to the scripts and pipelines. Since we’re overlapping in this effort, would you mind holding off on further changes for now? I’ll push my updates shortly, and we can collaborate on any remaining adjustments afterward.

Thank you for your understanding!

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Apr 14, 2025

Sure. Feel free to force push your changes if you would.

@bowenliang123 bowenliang123 changed the title build: introduce uv as dependency management tool build: introduce uv as Python package manager Apr 15, 2025
@bowenliang123
Copy link
Contributor Author

LGTM.

  • check list done
    • add uv for package manager
    • remove poetry from docker file, code, doc, CI test
    • update api service README docs for perperation

@QuantumGhost
Copy link
Collaborator

This looks great to me!

Once all CI pipelines successfully pass, we’ll proceed with merging the PR. Thank you for your contribution!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 15, 2025
@QuantumGhost QuantumGhost merged commit 12de1d1 into langgenius:main Apr 15, 2025
14 checks passed
@bowenliang123 bowenliang123 deleted the uv branch April 15, 2025 08:17
@bowenliang123
Copy link
Contributor Author

Cheers~ 🍻 A step forward to embrace the morden Python world.

jsincorporated pushed a commit to jsincorporated/asaAi that referenced this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file 📚 documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants