Skip to content

Conversation

sokumon
Copy link
Contributor

@sokumon sokumon commented May 11, 2025

Click released a new version 8.2.0
It doesnt have the _check_multicommand function as it has been renamed
Ref https://github.com/pallets/click/blob/8.2.0/src/click/core.py

pip install frappe-bench fails because of this

Caution

This PR drops support for python3.9.

@sokumon sokumon marked this pull request as ready for review May 11, 2025 09:14
@sokumon sokumon requested a review from akhilnarang May 11, 2025 09:15
@akhilnarang
Copy link
Member

We should also pin the click version.

@sokumon
Copy link
Contributor Author

sokumon commented May 11, 2025

Should we pin it to 8.2.0 or the 8.1.8

@barredterra
Copy link
Collaborator

I guess ~=8.2.0 would be correct because that's where the renamed function exists.

@barredterra barredterra linked an issue May 11, 2025 that may be closed by this pull request
@barredterra
Copy link
Collaborator

barredterra commented May 11, 2025

Shall we follow click in dropping support for python3.9? I'd say yes.

@barredterra barredterra changed the title fix: use check_nested_command fix!: use check_nested_command May 11, 2025

This comment was marked as resolved.

@barredterra barredterra changed the title fix!: use check_nested_command fix!: use check_nested_command, drop python 3.9 May 11, 2025
@barredterra
Copy link
Collaborator

barredterra commented May 11, 2025

I think the easy install check fails because the error that this PR tries to fix is part of the latest docker image that is used in the test case. So the failure should be safe to ignore.

@barredterra barredterra requested a review from revant May 11, 2025 17:44
@akhilnarang
Copy link
Member

Shall we follow click in dropping support for python3.9? I'd say yes.

v14+ requires py310+, so seems fine

@akhilnarang akhilnarang merged commit 6a6f16e into frappe:develop May 11, 2025
12 of 13 checks passed
Copy link

🎉 This PR is included in version 5.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

asaura08 added a commit to asaura08/press that referenced this pull request May 12, 2025
Summary:
This pull request addresses an issue where the bench CLI fails to initialize a new bench due to an incompatibility with the click package. The _check_multicommand import used in bench is no longer available in newer versions of click.

Changes Introduced:

    Pins click to version 8.1.3 to ensure compatibility with bench.

    Updates Dockerfile/environment setup to include the fixed click version before installing bench.

Reason for Change:
Without this fix, running bench init throws an ImportError, breaking the build and preventing Frappe environments from being initialized properly.
frappe/bench#1632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strict Click Versions
4 participants