-
Notifications
You must be signed in to change notification settings - Fork 78
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
Warnings related to esmpy
package __author__
, __homepage__
, and __obsoletes__
#140
Comments
esmpy
package __author__
, __homepage__
, and __obsoletes__
`esmpy
package __author__
, __homepage__
, and __obsoletes__
@tomvothecoder thank you for reporting this. I am having trouble reproducing this, probably due to my lack of experience enabling deprecation warnings in python. Things I have tried (from https://docs.python.org/3/library/warnings.html and elsewhere), using python 3.11:
None of these led to the deprecation warnings you noted above. Would you be able to describe how to reproduce these warnings? |
Hi @billsacks, thanks for getting back about this. I'll try to provide a minimum reproducible example along with the version of |
I tried your commands and also can't reproduce the issue. I only notice it in my repo's test suite. Here is extra info that might be helpful. Conda environment:esmf 8.4.2 mpi_mpich_h742b71d_100 conda-forge
esmpy 8.4.2 pyhc1e730c_1 conda-forge
...
python 3.11.4 hab00c5b_0_cpython conda-forge
...
xesmf 0.7.1 pyhd8ed1ab_0 conda-forge Warnings../../miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:106
/home/vo13/miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:106: DeprecationWarning: Implicit None on return values is deprecated and will raise KeyErrors.
__author__ = msg["Author"]
../../miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:107
/home/vo13/miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:107: DeprecationWarning: Implicit None on return values is deprecated and will raise KeyErrors.
__homepage__ = msg["Home-page"]
../../miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:108
/home/vo13/miniconda3/envs/xcdat_dev/lib/python3.11/site-packages/esmpy/__init__.py:108: DeprecationWarning: Implicit None on return values is deprecated and will raise KeyErrors.
__obsoletes__ = msg["obsoletes"] Related code lines:esmf/src/addon/esmpy/src/esmpy/__init__.py Lines 105 to 108 in 7babfad
What I think is causing the issue"Author", "Home-page" and "obsoletes" aren't set in esmf/src/addon/esmpy/pyproject.toml Lines 5 to 23 in 7babfad
Minimum example:import importlib.metadata as ilm
msg = ilm.metadata("esmpy")
print(msg.__dict__)
# {'policy': Compat32(), '_headers': [('Metadata-Version', '2.1'), ('Name', 'esmpy'), ('Version', '8.4.2'), ('Summary', 'ESMF Python interface'), ('Maintainer-email', 'ESMF Core Team <esmf_support@ucar.edu>'), ('License', 'University of Illinois-NCSA'), ('Requires-Python', '>=3.7'), ('License-File', 'LICENSE'), ('Requires-Dist', 'numpy'), ('Requires-Dist', 'importlib-metadata ; python_version < "3.8"'), ('Provides-Extra', 'testing'), ('Requires-Dist', "pytest ; extra == 'testing'"), ('Requires-Dist', "pytest-json-report ; extra == 'testing'")], '_unixfrom': None, '_payload': '', '_charset': None, 'preamble': None, 'epilogue': None, 'defects': [], '_default_type': 'text/plain'}
msg["Author"] # Returns None
msg["Home-page"] # Returns None
msg["obsoletes"] # Returns None Related issues from other repos |
Thank you for your very detailed information, @tomvothecoder ! As far as I can tell, these three attributes aren't needed for anything, so I have simply removed them. Please let me know if you run into any additional, related issues. We're about to have our 8.5.0 release freeze; I'm not sure if the fix will make it into the 8.5.0 release or will need to wait for 8.6.0. |
@billsacks cheers very much! Has the fix made it to 8.5.0 or 8.6.0? Many thanks 🍺 |
This fix is in 8.5.0 and all following versions. |
brilliant, many thanks @billsacks 🍺 |
Hello, I am receiving
esmpy
warnings (viaxesmf
) in my package's test suite. Just wanted to make sure the dev team is aware of this.The text was updated successfully, but these errors were encountered: