File: speedups.py

package info (click to toggle)
python-shapely 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,528 kB
  • sloc: python: 18,648; ansic: 6,615; makefile: 88; sh: 62
file content (39 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Speedups for Shapely geometry operations.

.. deprecated:: 2.0
        Deprecated in Shapely 2.0, and will be removed in a future version.

"""

import warnings

__all__ = ["available", "disable", "enable", "enabled"]


available = True
enabled = True


_MSG = (
    "This function has no longer any effect, and will be removed in a "
    "future release. Starting with Shapely 2.0, equivalent speedups are "
    "always available"
)


def enable():
    """Will be removed in a future release and has no longer any effect.

    Previously, this function enabled cython-based speedups. Starting with
    Shapely 2.0, equivalent speedups are available in every installation.
    """
    warnings.warn(_MSG, FutureWarning, stacklevel=2)


def disable():
    """Will be removed in a future release and has no longer any effect.

    Previously, this function enabled cython-based speedups. Starting with
    Shapely 2.0, equivalent speedups are available in every installation.
    """
    warnings.warn(_MSG, FutureWarning, stacklevel=2)