speedups.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. """Speedups for Shapely geometry operations.
  2. .. deprecated:: 2.0
  3. Deprecated in Shapely 2.0, and will be removed in a future version.
  4. """
  5. import warnings
  6. __all__ = ["available", "disable", "enable", "enabled"]
  7. available = True
  8. enabled = True
  9. _MSG = (
  10. "This function has no longer any effect, and will be removed in a "
  11. "future release. Starting with Shapely 2.0, equivalent speedups are "
  12. "always available"
  13. )
  14. def enable():
  15. """Will be removed in a future release and has no longer any effect.
  16. Previously, this function enabled cython-based speedups. Starting with
  17. Shapely 2.0, equivalent speedups are available in every installation.
  18. """
  19. warnings.warn(_MSG, FutureWarning, stacklevel=2)
  20. def disable():
  21. """Will be removed in a future release and has no longer any effect.
  22. Previously, this function enabled cython-based speedups. Starting with
  23. Shapely 2.0, equivalent speedups are available in every installation.
  24. """
  25. warnings.warn(_MSG, FutureWarning, stacklevel=2)