-
Notifications
You must be signed in to change notification settings - Fork 23
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
Importing pvfactors causes ShapelyDeprecationWarnings for shapely >= 1.8 #126
Comments
From the shapely changelog:
|
Thank you for using pvfactors and for posting this issue @hashstat . Ideally I would like to get rid of In the meantime, I would appreciate any help to fix this deprecation warning; it doesn't look like that would be a lot of work. Please feel free to open a PR @hashstat if you have time. |
@anomam would you rather see a "proper" fix that will allow compatibility with |
hello @kanderso-nrel , thanks a lot for following up on this. I am totally fine with a short term band-aid since in the long-term shapely will be removed. |
Ok! Well I think restricting shapely to I suppose another option would be to use Any preferences here? I think I lean towards restricting to |
|
I don't see why the warnings are to be avoided, as they don't seem to break anything. I do think it is important to not (eventually) pull >=v2, because that will break things. |
I suppose the point of avoiding warnings is to not annoy the user with console clutter, which I'll certainly concede is less important than preventing breakage. But it is apparently annoying enough to prompt @hashstat to open the issue, anyway :) I suppose if nothing else, people can find this issue and see that downgrading shapely makes the warnings disappear. |
I do apologize for my late input here. If it weren't explicitly a deprecation warning, then I'd better appreciate the alarm. I have had issues running 1.6.4.post2 on my Mac, and am probably going to move to 1.8.0 soon in other SunPower projects, which is why I'd rather not limit the consumer here. Not sure how soon I can help remove Shapely altogether in |
When using pvfactors with shapely 1.8, ShapelyDeperecationWarnings are issued from shapely when pvfactors assigns custom attributes to shapely geometry objects.
Step to reproduce
pip install pvfactors==1.5.1 shapely==1.8.0
python -c "import pvfactors.geometry"
Observed results
The following warnings are printed to the console:
Expected results
The geometry module imports successfully without warnings.
Environment
Operating system: Arch Linux (up-to-date)
Python: 3.9.7 (system python using pyenv-virtualenv)
Packages: pvfactors 1.5.1, shapely 1.8.0
The text was updated successfully, but these errors were encountered: