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

FutureWarning: The 'unary_union' attribute is deprecated – ignore for now? #453

Closed
jGaboardi opened this issue Apr 28, 2024 · 2 comments
Closed
Assignees
Labels

Comments

@jGaboardi
Copy link
Member

As a follow up & confirmation of #437, this is still being thrown in the DEV environment. Was I correct in thinking that this was fixed in #437 or did I misunderstand something?

spopt/tests/test_clscp-so.py: 5 warnings
spopt/tests/test_locate_util.py: 18 warnings
spopt/tests/test_c_p_median.py: 3 warnings
spopt/tests/test_lscp.py: 8 warnings
spopt/tests/test_lscpb.py: 8 warnings
spopt/tests/test_mclp.py: 8 warnings
spopt/tests/test_p_center.py: 7 warnings
spopt/tests/test_p_dispersion.py: 4 warnings
spopt/tests/test_p_median.py: 8 warnings
  /home/runner/work/spopt/spopt/spopt/tests/conftest.py:87: FutureWarning: The 'unary_union' attribute is deprecated, use the 'union_all()' method instead.
    net_space = net_buffer.union_all() if GPD_GE_10 else net_buffer.unary_union

spopt/tests/test_clscp-so.py: 10 warnings
spopt/tests/test_c_p_median.py: 6 warnings
spopt/tests/test_lscp.py: 16 warnings
spopt/tests/test_locate_util.py: 2 warnings
spopt/tests/test_lscpb.py: 16 warnings
spopt/tests/test_mclp.py: 16 warnings
spopt/tests/test_p_center.py: 14 warnings
spopt/tests/test_p_dispersion.py: 4 warnings
spopt/tests/test_p_median.py: 16 warnings
  /home/runner/work/spopt/spopt/spopt/locate/util.py:70: FutureWarning: The 'unary_union' attribute is deprecated, use the 'union_all()' method instead.
    geom = in_data.geometry.unary_union

xref #449

@martinfleis
Copy link
Member

We have the check as

Version(geopandas.__version__) >= Version("1.0")

which means that the dev version returns False here. You can do Version("1.0dev") to include the alpha in the checks but in any case, the warning will not show up with the stable GeoPandas 1.0.

@jGaboardi
Copy link
Member Author

Got it. We'll keep as is then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants