Skip to content

Commit 7369d8d

Browse files
shaneahmedmeasty
andauthored
🗑️ Remove shapely.speedups (#622)
- Remove `shapely.speedups`. - [The shapely.speedups module (the enable and disable functions) is deprecated and will be removed in the future. The module no longer has any affect in Shapely >=2.0.](https://shapely.readthedocs.io/en/stable/release/2.x.html#shapely-2-0-api-changes-deprecated-in-1-8) Co-authored-by: Mark Eastwood <[email protected]>
1 parent 7e05548 commit 7369d8d

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

tiatoolbox/annotation/storage.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
import numpy as np
6060
import pandas as pd
61-
from shapely import speedups, wkb, wkt
61+
from shapely import wkb, wkt
6262
from shapely.affinity import scale, translate
6363
from shapely.geometry import LineString, Point, Polygon
6464
from shapely.geometry import mapping as geometry2feature
@@ -76,9 +76,6 @@
7676

7777
sqlite3.enable_callback_tracebacks(True)
7878

79-
if speedups.available: # pragma: no branch
80-
speedups.enable()
81-
8279
Geometry = Union[Point, Polygon, LineString]
8380
Properties = Dict[str, Union[Dict, List, Number, str]]
8481
BBox = Tuple[Number, Number, Number, Number]

tiatoolbox/utils/visualization.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@
1010
from matplotlib import colormaps
1111
from numpy.typing import ArrayLike
1212
from PIL import Image, ImageFilter, ImageOps
13-
from shapely import speedups
1413
from shapely.geometry import Polygon
1514

1615
from tiatoolbox import logger
1716
from tiatoolbox.annotation.storage import Annotation, AnnotationStore
1817

19-
if speedups.available: # pragma: no branch
20-
speedups.enable()
21-
2218

2319
def random_colors(num_colors, bright=True):
2420
"""Generate a number of random colors.

0 commit comments

Comments
 (0)