Skip to content

Commit

Permalink
remove use of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Nov 14, 2023
1 parent f3aa87e commit db314e9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/stdatamodels/fits_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import hashlib
import inspect
import io
from pkg_resources import parse_version
import re
import warnings
import weakref
Expand Down Expand Up @@ -38,9 +37,6 @@
_FITS_SOURCE_PREFIX = "fits:"
_NDARRAY_TAG = "tag:stsci.edu:asdf/core/ndarray-1.0.0"

_ASDF_GE_2_6 = parse_version(asdf.__version__) >= parse_version('2.6')


_builtin_regexes = [
'', 'NAXIS[0-9]{0,3}', 'BITPIX', 'XTENSION', 'PCOUNT', 'GCOUNT',
'EXTEND', 'BSCALE', 'BZERO', 'BLANK', 'DATAMAX', 'DATAMIN',
Expand Down Expand Up @@ -372,10 +368,7 @@ def datetime_callback(node, json_id):

tree = treeutil.walk_and_modify(tree, datetime_callback)

if _ASDF_GE_2_6:
kwargs = {"_visit_repeat_nodes": True}
else:
kwargs = {}
kwargs = {"_visit_repeat_nodes": True}

validators, context = _get_validators(hdulist)
validator = asdf_schema.get_validator(schema, None, validators, **kwargs)
Expand Down

0 comments on commit db314e9

Please sign in to comment.