Skip to content
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

installer breaks something. Causes a DeprecationWarning. (IDFGH-10465) #11712

Closed
3 tasks done
nopnop2002 opened this issue Jun 20, 2023 · 10 comments
Closed
3 tasks done
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@nopnop2002
Copy link

nopnop2002 commented Jun 20, 2023

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

esp-idf-v5.2-dev-1128

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

$ idf.py --version
ESP-IDF v5.2-dev-1128-g03d4fa2869

What is the actual behavior?

I updated from esp-idf-v5.2-dev-544 to esp-idf-v5.2-dev-1128.

The following warning will occur:

$ idf.py --version
/home/nop/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
ESP-IDF v5.2-dev-1128-g03d4fa2869

So I changed it back to esp-idf-v5.2-dev-544.

$ idf.py --version
/home/nop/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
ESP-IDF v5.2-dev-544-g54576b7528

esp-idf-v5.2-dev-1128's installer breaks something.

Steps to reproduce.

  1. install esp-idf-v5.2-dev-544.
  2. Execute idf.py --version.
  3. update to esp-idf-v5.2-dev-1128.
  4. Execute idf.py --version.

Build or installation Logs.

No response

More Information.

No response

@nopnop2002 nopnop2002 added the Type: Bug bugs in IDF label Jun 20, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jun 20, 2023
@github-actions github-actions bot changed the title installer breaks something. Causes a DeprecationWarning. installer breaks something. Causes a DeprecationWarning. (IDFGH-10465) Jun 20, 2023
@dobairoland
Copy link
Collaborator

We know about this and will be fixed soon.

I don't think anything is broken. You can ignore that warning. Everything should work.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Jun 28, 2023
@nopnop2002
Copy link
Author

nopnop2002 commented Jul 2, 2023

This problem also occurs when doing a clean install of ESP-IDF release/v5.0 and release/v5.1.

git clone -b release/v5.0 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh
. ./export.sh
idf.py --version

@peterdragun
Copy link
Collaborator

Yes, the pkg_resources was used in all versions and was recently deprecated by the setuptools in version 67.5.0

@nopnop2002
Copy link
Author

So when we using setuptools older than 67.5.0, does the problem not occur?

@peterdragun
Copy link
Collaborator

Yes, but it is not really a problem. It is just a warning message, it hasn't affected any functionallity of ESP-IDF even with newer setuptools.

@peterdragun
Copy link
Collaborator

export.sh seems to force the setuptools to rewrite to the latest.

export.sh is switching to a different Python environment. So changing any package locally does not affect the IDF environment. If you care about the warning you can downgrade setuptools after running the export.sh as a temporary workaround until we implement a proper fix. We are already working on it and this issue will be fixed soon.

@nopnop2002
Copy link
Author

i am waiting for a fix.
Thanks for your comment.

@bbannert
Copy link

bbannert commented Jul 6, 2023

Hi all. I'm getting the same message from ESP-IDF environment when compiling my code. The problem is that I'm getting this like an ERROR, not like a Warning. I'll be waiting for the fix too. Hope to get it soon.
image

@nopnop2002
Copy link
Author

nopnop2002 commented Jul 8, 2023

@bbannert
Temporary measures are as follows.

$ cd esp-idf

$ . ./export.sh

$ idf.py --version
/home/nop/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
ESP-IDF v5.2-dev-1449-gd2471b11e7

$ python3 -m pip uninstall setuptools

$ python3 -m pip install setuptools==45.2.0


$ idf.py --version
ESP-IDF v5.2-dev-1449-gd2471b11e7

@dobairoland
Copy link
Collaborator

@bbannert Which IDE are you using? Vscode or Eclipse?

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable Resolution: Done Issue is done internally and removed Status: Reviewing Issue is being reviewed Resolution: NA Issue resolution is unavailable labels Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants