Repository: networkx/networkx
Pull request: Unpin pygeos
Fixes #4562 

Un-pin pygeos and set lower bound for geopandas to a version that supports pygeos 0.9.

Problem statement:
PyGEOS 0.9 breaks gallery examples
@brendan-ward @ljwolf PyGEOS 0.9 was released today and it appears to have broken all our geospatial examples.  We are now getting errors like:
```
Unexpected failing examples:
/home/circleci/repo/examples/geospatial/plot_polygons.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/circleci/repo/examples/geospatial/plot_polygons.py", line 12, in <module>
    from libpysal import weights
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/__init__.py", line 28, in <module>
    from . import io
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/io/__init__.py", line 3, in <module>
    from .iohandlers import *
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/io/iohandlers/__init__.py", line 6, in <module>
    from . import dat
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/io/iohandlers/dat.py", line 2, in <module>
    from ...weights import W
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/weights/__init__.py", line 2, in <module>
    from .distance import *
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/weights/distance.py", line 7, in <module>
    from .util import (
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/libpysal/weights/util.py", line 19, in <module>
    import geopandas as gpd
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/__init__.py", line 3, in <module>
    from geopandas.geoseries import GeoSeries  # noqa
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/geoseries.py", line 12, in <module>
    from geopandas.base import GeoPandasBase, _delegate_property
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/base.py", line 13, in <module>
    from .array import GeometryArray, GeometryDtype
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/array.py", line 25, in <module>
    from . import _vectorized as vectorized
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/_vectorized.py", line 39, in <module>
    type_mapping = {p.value: _names[p.name] for p in pygeos.GeometryType}
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/geopandas/_vectorized.py", line 39, in <dictcomp>
    type_mapping = {p.value: _names[p.name] for p in pygeos.GeometryType}
KeyError: 'MISSING'
```

Is this an easy fix or should I pin PyGEOS to 0.8?

Hints from issue discussion:
For now, I've pinned pygeos to version 0.8 #4563.
This was fixed in geopandas [#1644](https://github.com/geopandas/geopandas/pull/1644), but has not yet made it into a new geopandas release (coming soon).

For now, pinning the combination of geopandas at 0.8.x and pygeos at 0.8 (like you've already done) should fix it; pinning geopandas may not be necessary depending on how the version.
We made a 0.8.2 geopandas release that should be compatible with pygeos 0.9

Commit message: Bump geopandas for gallery requirements.

Patch to review:
diff --git a/requirements/example.txt b/requirements/example.txt
index 5bddd70897c..87ff6d2ccb0 100644
--- a/requirements/example.txt
+++ b/requirements/example.txt
@@ -4,7 +4,7 @@ Cartopy>=0.18
 shapely
 # Required for Cartopy
 osmnx>=0.16
-pygeos==0.8
+geopandas>=0.8.2
 momepy>=0.4
 contextily>=1.0
 mayavi>=4.7


Code review comments:
diff_hunk: @@ -4,7 +4,7 @@ Cartopy>=0.18
 shapely
 # Required for Cartopy
 osmnx>=0.16
-pygeos==0.8
+geopandas>=0.8.2
path: requirements/example.txt
text: @user1:
Now that's geopandas 0.82 has been released, it will be installed by ``momepy>=0.4``.  So let's remove ``geopandas>=0.8.2``.