Skip to content

Commit ca35668

Browse files
author
Lion Krischer
committed
Temporarily reenable Python 3.7 support.
1 parent 8c14982 commit ca35668

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Landing page for all things **ASDF**: https://seismic-data.org
2424

2525
### Changelog
2626

27+
#### Version 0.8.1 (August 3, 2023)
28+
* Fix a bug with the conda package.
29+
2730
#### Version 0.8.0 (August 3, 2023)
2831
* Drop support for Python <= 3.8.
2932
* Support for the latest versions of all dependencies including Python 3.11.

pyasdf/__init__.py

+16-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:license:
66
BSD 3-Clause ("BSD New" or "BSD Simplified")
77
"""
8-
from importlib.metadata import version, PackageNotFoundError
8+
import sys
99

1010

1111
from .exceptions import ASDFException, ASDFWarning, WaveformNotInFileException
@@ -22,10 +22,21 @@
2222
"get_sys_info",
2323
]
2424

25-
try:
26-
__version__ = version("pyasdf")
27-
except PackageNotFoundError:
28-
pass
25+
26+
if sys.version_info.minor >= 9:
27+
from importlib.metadata import version, PackageNotFoundError
28+
29+
try:
30+
__version__ = version("pyasdf")
31+
except PackageNotFoundError:
32+
pass
33+
else:
34+
import pkg_resources
35+
36+
try:
37+
__version__ = pkg_resources.get_distribution("pyasdf").version
38+
except pkg_resources.DistributionNotFound:
39+
pass
2940

3041

3142
def print_sys_info():

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
description = "Python module for the Adaptable Seismic Data Format (ASDF)."
1111
readme = "README.md"
12-
requires-python = ">=3.9"
12+
requires-python = ">=3.7"
1313
license = {text = "BSD-3-Clause"}
1414
classifiers = [
1515
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)