diff --git a/replace.sh b/replace.sh index c26c987..d0201b3 100755 --- a/replace.sh +++ b/replace.sh @@ -2,10 +2,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ABSOLUTE_PATH2="$DIR/site-packages/openai/_types.py" +# ABSOLUTE_PATH2="$DIR/site-packages/openai/_types.py" NETWORKX_ATLAS="$DIR/site-packages/networkx/generators/atlas.py" -sed -i '' 's|FileContent = Union\[IO\[bytes\], bytes, PathLike\[str\]\]|FileContent = Union\[IO\[bytes\], bytes, PathLike\]|' "$ABSOLUTE_PATH2" +# sed -i '' 's|FileContent = Union\[IO\[bytes\], bytes, PathLike\[str\]\]|FileContent = Union\[IO\[bytes\], bytes, PathLike\]|' "$ABSOLUTE_PATH2" sed -i '' 's|importlib\.resources|importlib_resources|' "$NETWORKX_ATLAS" diff --git a/site-packages/networkx/generators/atlas.py b/site-packages/networkx/generators/atlas.py index 8e57ec9..100864f 100644 --- a/site-packages/networkx/generators/atlas.py +++ b/site-packages/networkx/generators/atlas.py @@ -2,7 +2,7 @@ Generators for the small graph atlas. """ import gzip -import importlib.resources +import importlib_resources import os import os.path from itertools import islice @@ -51,7 +51,7 @@ NUM_GRAPHS = 1253 #: # Path to the atlas file -ATLAS_FILE = importlib.resources.files("networkx.generators") / "atlas.dat.gz" +ATLAS_FILE = importlib_resources.files("networkx.generators") / "atlas.dat.gz" def _generate_graphs():