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

Only emit a metadata warning once #11436

Open
uranusjr opened this issue Sep 6, 2022 · 8 comments
Open

Only emit a metadata warning once #11436

uranusjr opened this issue Sep 6, 2022 · 8 comments
Labels
C: error messages Improving error messages state: awaiting PR Feature discussed, PR is needed

Comments

@uranusjr
Copy link
Member

uranusjr commented Sep 6, 2022

From #11352 (comment)

BTW, the warning is quite noisy:

[root@9a62f3789682 /]# mkdir -p /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info
[root@9a62f3789682 /]# pip list
WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
Package    Version
---------- --------
gpg        1.17.0
libcomps   0.1.18
pip        22.2.2
rpm        4.18.0b1
setuptools 62.6.0
WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'

Can this be improved with better caching? Or switching to use ResourceWarning?

@yaoyhu
Copy link

yaoyhu commented Mar 29, 2023

same here, any solution?

@yaoyhu
Copy link

yaoyhu commented Mar 29, 2023

same here, any solution?

rm -rf $NOISY_DIR_NAME

@uranusjr
Copy link
Member Author

Feel free to contribute. I imagine this can be improved by caching the metadata-parsing function (that emits this message), or by maybe using warnings instead.

@yaoyhu
Copy link

yaoyhu commented Mar 30, 2023

Feel free to contribute. I imagine this can be improved by caching the metadata-parsing function (that emits this message), or by maybe using warnings instead.

I "fixed" this by finding the package and uninstalling it using pip. But it still gives warnings. So I rm -rf that dir and reinstall the package by pip. It works and has no harmful impact for now.

@huyz
Copy link

huyz commented Sep 28, 2023

Why am I starting to get these warnings all the time over the past few months? Anyone know what changed? Often I get these warnings for Python packages installed by MacPorts

@yaoyhu
Copy link

yaoyhu commented Sep 28, 2023

Why am I starting to get these warnings all the time over the past few months? Anyone know what changed? Often I get these warnings for Python packages installed by MacPorts

The same issue can occur with Python packages installed via Homebrew. You can attempt to uninstall them using Macports/Homebrew and then reinstall them using pip. However, certain packages are necessary dependencies for software such as vim. Therefore, you will have to tolerate this situation for now.

@jwhendy
Copy link

jwhendy commented Jan 11, 2024

For what it's worth as others stumble on this, I just pip uninstall [name] then pip install [name] and the errors went away. I did not have to rm -rf the directory.

I'd also like to understand why this just started out of the blue?

@itd
Copy link

itd commented Apr 13, 2024

In my recent homebrew build of python, it appeared to be specific to python3.12
I installed python3.11 and built the virtual environment with that (python3.11 -m venv venv)
Doing a pip install in this 3.11-based environment worked for me.

@ichard26 ichard26 added C: error messages Improving error messages state: awaiting PR Feature discussed, PR is needed labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: error messages Improving error messages state: awaiting PR Feature discussed, PR is needed
Projects
None yet
Development

No branches or pull requests

6 participants