refactor(setup): modernize string formatting and ensure explicit file encoding - #65439
refactor(setup): modernize string formatting and ensure explicit file encoding#65439ardozcnn wants to merge 9 commits into
Conversation
Signed-off-by: Arda ÖZCAN <76063457+ardozcnn@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request refactors python/setup.py by converting string concatenations to f-strings and removing numerous comments and docstrings. The review feedback focuses on restoring these removed comments and docstrings, as they provide critical context regarding platform-specific workarounds (such as Windows symlink/junction behavior and WSL exclusion), design decisions (like excluding the LLM extra from the main bundle), and developer synchronization instructions. Additionally, one comment was flagged for containing git history details rather than code-specific documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Arda ÖZCAN <76063457+ardozcnn@users.noreply.github.com>
Signed-off-by: Arda ÖZCAN <76063457+ardozcnn@users.noreply.github.com>
|
Thanks for the review! I have restored all the removed docstrings and architectural/platform comments across setup.py while keeping the f-string refactoring and encoding="utf-8" fix intact. |
|
Can you review please. |
Description
This PR modernizes the
setup.pybuild configuration script by refactoring legacy.format()string formatting to modern Python f-strings. Additionally, it explicitly enforcesencoding="utf-8"infind_version()to ensure cross-platform consistency and prevent encoding errors on non-UTF-8 default environments (e.g., Windows).Related issues
Related to code cleanup and build script maintenance.
Additional information
.format()calls to f-strings acrosssetup.py.encoding="utf-8"when reading version files.[-3:] == ".py") with.endswith(".py").