|
17 | 17 | from astropy.io import ascii
|
18 | 18 | from astropy.io.votable import parse_single_table
|
19 | 19 | from astropy.table import QTable
|
20 |
| -from astropy.utils import deprecated, deprecated_renamed_argument |
21 | 20 | from astropy.utils.exceptions import AstropyWarning
|
22 | 21 |
|
23 | 22 | # Import astroquery utilities
|
@@ -629,25 +628,6 @@ def _parse_result(self, response, verbose=False):
|
629 | 628 |
|
630 | 629 | return data
|
631 | 630 |
|
632 |
| - def _handle_all_columns_argument(self, **kwargs): |
633 |
| - """ |
634 |
| - Deal with the ``all_columns`` argument that was exposed by earlier versions |
635 |
| -
|
636 |
| - This method will warn users about this deprecated argument and update the query syntax |
637 |
| - to use ``select='*'``. |
638 |
| - """ |
639 |
| - # We also have to manually pop these arguments from the dict because |
640 |
| - # `deprecated_renamed_argument` doesn't do that for some reason for all supported astropy |
641 |
| - # versions (v3.1 was beheaving as expected) |
642 |
| - kwargs.pop("show_progress", None) |
643 |
| - kwargs.pop("table_path", None) |
644 |
| - |
645 |
| - # Deal with `all_columns` properly |
646 |
| - if kwargs.pop("all_columns", None): |
647 |
| - kwargs["select"] = kwargs.get("select", "*") |
648 |
| - |
649 |
| - return kwargs |
650 |
| - |
651 | 631 | @class_or_instance
|
652 | 632 | def _request_to_sql(self, request_payload):
|
653 | 633 | """Convert request_payload dict to SQL query string to be parsed by TAP."""
|
@@ -677,51 +657,5 @@ def _request_to_sql(self, request_payload):
|
677 | 657 |
|
678 | 658 | return tap_query
|
679 | 659 |
|
680 |
| - @deprecated(since="v0.4.1", alternative="query_object") |
681 |
| - @deprecated_renamed_argument(["show_progress", "table_path"], |
682 |
| - [None, None], "v0.4.1", arg_in_kwargs=True) |
683 |
| - def query_planet(self, planet_name, cache=None, **criteria): |
684 |
| - """ |
685 |
| - Search the ``exoplanets`` table for a confirmed planet |
686 |
| -
|
687 |
| - Parameters |
688 |
| - ---------- |
689 |
| - planet_name : str |
690 |
| - The name of a confirmed planet. If ``regularize`` is ``True``, an attempt will be made |
691 |
| - to regularize this name using the ``aliastable`` table. |
692 |
| - cache : bool, optional |
693 |
| - Should the request result be cached? This can be useful for large repeated queries, |
694 |
| - but since the data in the archive is updated regularly, this defaults to ``False``. |
695 |
| - **criteria |
696 |
| - Any other filtering criteria to apply. Values provided using the ``where`` keyword will |
697 |
| - be ignored. |
698 |
| - """ |
699 |
| - criteria = self._handle_all_columns_argument(**criteria) |
700 |
| - criteria["where"] = "pl_name='{0}'".format(planet_name.strip()) |
701 |
| - return self.query_criteria("exoplanets", cache=cache, **criteria) |
702 |
| - |
703 |
| - @deprecated(since="v0.4.1", alternative="query_object") |
704 |
| - @deprecated_renamed_argument(["show_progress", "table_path"], |
705 |
| - [None, None], "v0.4.1", arg_in_kwargs=True) |
706 |
| - def query_star(self, host_name, cache=None, **criteria): |
707 |
| - """ |
708 |
| - Search the ``exoplanets`` table for a confirmed planet host |
709 |
| -
|
710 |
| - Parameters |
711 |
| - ---------- |
712 |
| - host_name : str |
713 |
| - The name of a confirmed planet host. If ``regularize`` is ``True``, an attempt will be |
714 |
| - made to regularize this name using the ``aliastable`` table. |
715 |
| - cache : bool, optional |
716 |
| - Should the request result be cached? This can be useful for large repeated queries, |
717 |
| - but since the data in the archive is updated regularly, this defaults to ``False``. |
718 |
| - **criteria |
719 |
| - Any other filtering criteria to apply. Values provided using the ``where`` keyword will |
720 |
| - be ignored. |
721 |
| - """ |
722 |
| - criteria = self._handle_all_columns_argument(**criteria) |
723 |
| - criteria["where"] = "pl_hostname='{0}'".format(host_name.strip()) |
724 |
| - return self.query_criteria("exoplanets", cache=cache, **criteria) |
725 |
| - |
726 | 660 |
|
727 | 661 | NasaExoplanetArchive = NasaExoplanetArchiveClass()
|
0 commit comments