GeoAlchemy2 0.17.0__py3-none-any.whl → 0.18.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
geoalchemy2/__init__.py CHANGED
@@ -20,32 +20,12 @@ from geoalchemy2.types import Raster # noqa
20
20
 
21
21
  admin.setup_ddl_event_listeners()
22
22
 
23
-
24
- # Get version number
25
- __version__ = "UNKNOWN VERSION"
26
-
27
- # Attempt to use importlib.metadata first because it's much faster
28
- # though it's only available in Python 3.8+ so we'll need to fall
29
- # back to pkg_resources for Python 3.7 support
30
23
  try:
31
- import importlib.metadata
32
- except ImportError:
33
- try:
34
- from pkg_resources import DistributionNotFound
35
- from pkg_resources import get_distribution
36
- except ImportError: # pragma: no cover
37
- pass
38
- else:
39
- try:
40
- __version__ = get_distribution("GeoAlchemy2").version
41
- except DistributionNotFound: # pragma: no cover
42
- pass
43
- else:
44
- try:
45
- __version__ = importlib.metadata.version("GeoAlchemy2")
46
- except importlib.metadata.PackageNotFoundError: # pragma: no cover
47
- pass
24
+ from importlib.metadata import version
48
25
 
26
+ __version__ = version("geoalchemy2")
27
+ except ImportError:
28
+ __version__ = "0.0.0"
49
29
 
50
30
  __all__ = [
51
31
  "__version__",