Skip to content

Commit

Permalink
fix: fix import of lex and yacc depending on astropy version
Browse files Browse the repository at this point in the history
these modules's location changed in astropy version 4.3
  • Loading branch information
ManonMarchand committed Feb 23, 2024
1 parent 535ddfc commit 1fde941
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion astroquery/simbad/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
"""Contains utility functions to support legacy Simbad interface."""

from collections import deque
from packaging import version
import re

from astropy import __version__ as astropy_version

from astropy.coordinates import SkyCoord, Angle
from astropy.utils.parsing import lex, yacc
if version.parse(astropy_version) >= version.parse("4.3"):
from astropy.utils.parsing import lex, yacc
else:
from astropy.extern.ply import lex, yacc
from astropy.utils import classproperty


Expand Down

0 comments on commit 1fde941

Please sign in to comment.