Repository: intake/intake

Issue:
Unify catalog read
At the moment there is a `intake.Catalog` alias for `intake.open_catalog` and there is also `intake.load_catalog`. It'd be nice to at least consolidate around one approach in the docs. Additionally, it'd be nice to get rid of the top level `Catalog` since it is confusing that it is not a class.

Discussion:

Patch:
diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst
index 857b617..cb73968 100644
--- a/docs/source/glossary.rst
+++ b/docs/source/glossary.rst
@@ -14,8 +14,8 @@ Glossary
         format of the files is unchanged in this case, but may be decompressed.
 
     Catalog
-        A collection of entries, each of which corresponds to a specific :term:`Data-set`. Within Intake, a catalog is
-        most commonly defined in a :term:`YAML` file, but there are other possibilities, such as connecting to an Intake
+        A collection of entries, each of which corresponds to a specific :term:`Data-set`. Within these docs, a catalog is
+        most commonly defined in a :term:`YAML` file, for simplicity, but there are other possibilities, such as connecting to an Intake
         server or another third-party data service, like a SQL database. Thus, catalogs form a hierarchy: any
         catalog can contain other, nested catalogs.
 
diff --git a/docs/source/persisting.rst b/docs/source/persisting.rst
index 47b092f..0d2ce3c 100644
--- a/docs/source/persisting.rst
+++ b/docs/source/persisting.rst
@@ -30,7 +30,7 @@ optional packages to be installed.
 
 Example::
 
-    cat = intake.load_catalog('mycat.yaml')  # load a remote cat
+    cat = intake.open_catalog('mycat.yaml')  # load a remote cat
     source = cat.csvsource()  # source pointing to remote data
     source.persist()
 
@@ -40,7 +40,7 @@ To control whether a catalog will automatically give you the persisted version o
 source in this way using the argument ``persist_mode``, e.g., to ignore locally
 persisted versions, you could have done::
 
-    cat = intake.load_catalog('mycat.yaml', persist_mode='never')
+    cat = intake.open_catalog('mycat.yaml', persist_mode='never')
     or
     source = cat.csvsource(persist_mode='never')
 
diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst
index 57068cf..4aa4538 100644
--- a/docs/source/quickstart.rst
+++ b/docs/source/quickstart.rst
@@ -110,12 +110,15 @@ working with Dask collections (Bag, Array or Data-frames).
 Opening a Catalog
 -----------------
 
-It is often useful to move the descriptions of data sources out of your code and into a specification
-file that can be
-reused and shared with other projects and people.  Intake calls this a
-":term:`Catalog file`", which contains
-a list of named
-entries describing how to load data sources.  The ``intake example`` command, above, created a catalog file
+A :term:`Catalog` is a collection of data sources, with the type and arguments prescribed for each, and
+arbitrary metadata about each source.
+In the simplest case, a catalog can be described by a file in YAML format, a
+":term:`Catalog file`". In real usage, catalogues can be defined in a number of ways, such as remote
+ files, by
+connecting to a third-party data service (e.g., SQL server) or through an Intake :term:`Server` protocol, which
+can implement any number of ways to search and deliver data sources.
+
+The ``intake example`` command, above, created a catalog file
 with the following :term:`YAML`-syntax content:
 
 .. code-block:: yaml
@@ -209,6 +212,7 @@ called ``intake.cat``.
 Using the GUI
 -------------
 
-A graphical data browser is available in the Jupyter notebook environment. It will show the
+A graphical data browser is available in the Jupyter notebook environment or standalone web-server.
+It will show the
 contents of any installed catalogs, plus allows for selecting local and remote catalogs,
 to browse and select entries from these. See :doc:`gui`.
diff --git a/intake/__init__.py b/intake/__init__.py
index eaf777e..27850eb 100644
--- a/intake/__init__.py
+++ b/intake/__init__.py
@@ -8,13 +8,14 @@
 import re
 import logging
 import warnings
+import sys
 
 from ._version import get_versions
 __version__ = get_versions()['version']
 del get_versions
 from . import source
 from .source.base import Schema, DataSource
-from .catalog.base import Catalog, RemoteCatalog
+from .catalog.base import RemoteCatalog
 from .catalog import local
 from .catalog.default import load_combo_catalog
 from .catalog.local import MergedCatalog, EntrypointsCatalog
@@ -30,6 +31,13 @@ for name, driver in autodiscover().items():
     register_driver(name, driver)
 
 logger = logging.getLogger('intake')
+if sys.version_info >= (3, 7):
+    def __getattr__(attr):
+        if attr == 'Catalog':
+            from .catalog.base import Catalog
+            warnings.warn('deprecation: intake.Catalog now references the base class intake.catalog.base.Catalog\n '
+                          'If you want to open a generic URL, you should use intake.open_catalog')
+            return Catalog
 
 
 def make_open_functions():
@@ -153,5 +161,4 @@ def open_catalog(uri=None, **kwargs):
     return registry[driver](uri, **kwargs)
 
 
-Catalog = open_catalog
 gui = InstanceMaker()
diff --git a/intake/cli/client/subcommands/describe.py b/intake/cli/client/subcommands/describe.py
index ce2b342..0b279ff 100644
--- a/intake/cli/client/subcommands/describe.py
+++ b/intake/cli/client/subcommands/describe.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import print_entry_info, Subcommand
 
 #-----------------------------------------------------------------------------
@@ -39,5 +39,5 @@ class Describe(Subcommand):
         self.parser.add_argument('name', metavar='NAME', type=str, help='Catalog name')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         print_entry_info(catalog, args.name)
diff --git a/intake/cli/client/subcommands/discover.py b/intake/cli/client/subcommands/discover.py
index df06bfa..7625dd4 100644
--- a/intake/cli/client/subcommands/discover.py
+++ b/intake/cli/client/subcommands/discover.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import Subcommand
 
 #-----------------------------------------------------------------------------
@@ -39,6 +39,6 @@ class Discover(Subcommand):
         self.parser.add_argument('name', metavar='NAME', type=str, help='Catalog name')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         with catalog[args.name].get() as f:
             print(f.discover())
diff --git a/intake/cli/client/subcommands/exists.py b/intake/cli/client/subcommands/exists.py
index 632f32b..b6279fb 100644
--- a/intake/cli/client/subcommands/exists.py
+++ b/intake/cli/client/subcommands/exists.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import Subcommand
 
 #-----------------------------------------------------------------------------
@@ -39,5 +39,5 @@ class Exists(Subcommand):
         self.parser.add_argument('name', metavar='NAME', type=str, help='Catalog name')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         print(args.name in catalog)
diff --git a/intake/cli/client/subcommands/get.py b/intake/cli/client/subcommands/get.py
index 42f6a09..5b8dc19 100644
--- a/intake/cli/client/subcommands/get.py
+++ b/intake/cli/client/subcommands/get.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import Subcommand
 
 #-----------------------------------------------------------------------------
@@ -39,6 +39,6 @@ class Get(Subcommand):
         self.parser.add_argument('name', metavar='NAME', type=str, help='Catalog name')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         with catalog[args.name].get() as f:
             print(f.read())
diff --git a/intake/cli/client/subcommands/list.py b/intake/cli/client/subcommands/list.py
index 420d211..387eb8b 100644
--- a/intake/cli/client/subcommands/list.py
+++ b/intake/cli/client/subcommands/list.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import print_entry_info, Subcommand
 
 #-----------------------------------------------------------------------------
@@ -39,7 +39,7 @@ class List(Subcommand):
         self.parser.add_argument('uri', metavar='URI', type=str, help='Catalog URI')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         for entry in list(catalog):
             if args.full:
                 print_entry_info(catalog, entry)
diff --git a/intake/cli/client/subcommands/precache.py b/intake/cli/client/subcommands/precache.py
index 2078e0f..6d53df2 100644
--- a/intake/cli/client/subcommands/precache.py
+++ b/intake/cli/client/subcommands/precache.py
@@ -20,7 +20,7 @@ log = logging.getLogger(__name__)
 # External imports
 
 # Intake imports
-from intake import Catalog
+from intake import open_catalog
 from intake.cli.util import Subcommand
 
 #-----------------------------------------------------------------------------
@@ -38,7 +38,7 @@ class Precache(Subcommand):
         self.parser.add_argument('uri', metavar='URI', type=str, help='Catalog URI')
 
     def invoke(self, args):
-        catalog = Catalog(args.uri)
+        catalog = open_catalog(args.uri)
         for entry in list(catalog):
             s = catalog[entry]()
             if s.cache:


Test patch:
diff --git a/intake/catalog/tests/conftest.py b/intake/catalog/tests/conftest.py
index 3a65762..6739bd8 100644
--- a/intake/catalog/tests/conftest.py
+++ b/intake/catalog/tests/conftest.py
@@ -1,9 +1,9 @@
 import os.path
 import pytest
-from intake import Catalog
+from intake import open_catalog
 
 
 @pytest.fixture
 def catalog1():
     path = os.path.dirname(__file__)
-    return Catalog(os.path.join(path, 'catalog1.yml'))
+    return open_catalog(os.path.join(path, 'catalog1.yml'))
diff --git a/intake/catalog/tests/test_auth_integration.py b/intake/catalog/tests/test_auth_integration.py
index 8ff9e43..4ba8ec5 100644
--- a/intake/catalog/tests/test_auth_integration.py
+++ b/intake/catalog/tests/test_auth_integration.py
@@ -13,7 +13,7 @@ import time
 
 import pytest
 
-from intake import Catalog
+from intake import open_catalog
 
 from intake.auth.secret import SecretClientAuth
 from intake.auth.base import AuthenticationFailure
@@ -71,7 +71,7 @@ sources:
 
 def test_secret_auth(intake_server_with_auth):
     auth = SecretClientAuth(secret='test_secret')
-    catalog = Catalog(intake_server_with_auth, auth=auth)
+    catalog = open_catalog(intake_server_with_auth, auth=auth)
 
     entries = list(catalog)
     assert entries == ['example']
@@ -82,4 +82,4 @@ def test_secret_auth(intake_server_with_auth):
 def test_secret_auth_fail(intake_server_with_auth):
     auth = SecretClientAuth(secret='test_wrong_secret')
     with pytest.raises(AuthenticationFailure):
-        Catalog(intake_server_with_auth, auth=auth)
+        open_catalog(intake_server_with_auth, auth=auth)
diff --git a/intake/catalog/tests/test_local.py b/intake/catalog/tests/test_local.py
index 18dce1a..b5dc04e 100644
--- a/intake/catalog/tests/test_local.py
+++ b/intake/catalog/tests/test_local.py
@@ -16,7 +16,7 @@ import pytest
 import pandas
 
 from .util import assert_items_equal
-from intake import Catalog, open_catalog
+from intake import open_catalog
 from intake.catalog import exceptions, local
 from intake.catalog.local import get_dir, UserParameter, LocalCatalogEntry
 from intake.utils import make_path_posix
@@ -266,7 +266,7 @@ def test_user_parameter_validation_allowed():
 ])
 def test_parser_validation_error(filename):
     with pytest.raises(exceptions.ValidationError):
-        Catalog(abspath(filename + ".yml"))
+        open_catalog(abspath(filename + ".yml"))
 
 
 @pytest.mark.parametrize("filename", [
@@ -275,7 +275,7 @@ def test_parser_validation_error(filename):
 ])
 def test_parser_obsolete_error(filename):
     with pytest.raises(exceptions.ObsoleteError):
-        Catalog(abspath(filename + ".yml"))
+        open_catalog(abspath(filename + ".yml"))
 
 
 def test_union_catalog():
@@ -283,7 +283,7 @@ def test_union_catalog():
     uri1 = os.path.join(path, 'catalog_union_1.yml')
     uri2 = os.path.join(path, 'catalog_union_2.yml')
 
-    union_cat = Catalog([uri1, uri2])
+    union_cat = open_catalog([uri1, uri2])
 
     assert_items_equal(list(union_cat), ['entry1', 'entry1_part', 'use_example1'])
 
@@ -323,14 +323,14 @@ def test_persist_local_cat(temp_cache):
     uri1 = os.path.join(path, 'catalog_union_1.yml')
     uri2 = os.path.join(path, 'catalog_union_2.yml')
 
-    s = Catalog([uri1, uri2])
+    s = open_catalog([uri1, uri2])
     s2 = s.persist()
     assert isinstance(s2, YAMLFileCatalog)
     assert set(s) == set(s2)
 
 
 def test_empty_catalog():
-    cat = Catalog()
+    cat = open_catalog()
     assert list(cat) == []
 
 
@@ -344,7 +344,7 @@ def test_duplicate_data_sources():
     uri = os.path.join(path, 'catalog_dup_sources.yml')
 
     with pytest.raises(exceptions.DuplicateKeyError):
-        Catalog(uri)
+        open_catalog(uri)
 
 
 def test_duplicate_parameters():
@@ -352,7 +352,7 @@ def test_duplicate_parameters():
     uri = os.path.join(path, 'catalog_dup_parameters.yml')
 
     with pytest.raises(exceptions.DuplicateKeyError):
-        Catalog(uri)
+        open_catalog(uri)
 
 
 @pytest.fixture
@@ -379,7 +379,7 @@ sources:
 
 def test_catalog_file_removal(temp_catalog_file):
     cat_dir = os.path.dirname(temp_catalog_file)
-    cat = Catalog(cat_dir + '/*')
+    cat = open_catalog(cat_dir + '/*')
     assert set(cat) == {'a', 'b'}
 
     os.remove(temp_catalog_file)
@@ -490,7 +490,7 @@ def test_default_expansions():
 
 def test_remote_cat(http_server):
     url = http_server + 'catalog1.yml'
-    cat = Catalog(url)
+    cat = open_catalog(url)
     assert 'entry1' in cat
     assert cat.entry1.describe()
 
diff --git a/intake/catalog/tests/test_reload_integration.py b/intake/catalog/tests/test_reload_integration.py
index 46ab823..6fc75de 100644
--- a/intake/catalog/tests/test_reload_integration.py
+++ b/intake/catalog/tests/test_reload_integration.py
@@ -14,7 +14,7 @@ import time
 import pytest
 
 from .util import assert_items_equal
-from intake import Catalog
+from intake import open_catalog
 
 TMP_DIR = tempfile.mkdtemp()
 TEST_CATALOG_PATH = [TMP_DIR]
@@ -54,7 +54,7 @@ sources:
 
 
 def test_reload_updated_config(intake_server_with_config):
-    catalog = Catalog(intake_server_with_config)
+    catalog = open_catalog(intake_server_with_config)
 
     entries = list(catalog)
     assert entries == ['use_example1']
@@ -82,7 +82,7 @@ sources:
 
 
 def test_reload_updated_directory(intake_server_with_config):
-    catalog = Catalog(intake_server_with_config)
+    catalog = open_catalog(intake_server_with_config)
 
     orig_entries = list(catalog)
     assert 'example2' not in orig_entries
@@ -110,7 +110,7 @@ def test_reload_missing_remote_directory(intake_server):
         pass
 
     time.sleep(1)
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     assert_items_equal(list(catalog), [])
 
     os.mkdir(TMP_DIR)
@@ -136,7 +136,7 @@ sources:
 
 
 def test_reload_missing_local_directory(tempdir):
-    catalog = Catalog(tempdir + '/*')
+    catalog = open_catalog(tempdir + '/*')
     assert_items_equal(list(catalog), [])
 
     with open(os.path.join(tempdir, YAML_FILENAME), 'w') as f:
diff --git a/intake/catalog/tests/test_remote_integration.py b/intake/catalog/tests/test_remote_integration.py
index eacfd14..2ca2514 100644
--- a/intake/catalog/tests/test_remote_integration.py
+++ b/intake/catalog/tests/test_remote_integration.py
@@ -13,14 +13,14 @@ import pandas as pd
 
 from intake.source.tests.util import verify_datasource_interface
 from .util import assert_items_equal
-from intake import Catalog, RemoteCatalog
+from intake import open_catalog, RemoteCatalog
 from intake.catalog.remote import RemoteCatalogEntry
 
 TEST_CATALOG_PATH = os.path.join(os.path.dirname(__file__), 'catalog1.yml')
 
 
 def test_info_describe(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     assert_items_equal(list(catalog), ['use_example1', 'nested', 'entry1',
                                        'entry1_part', 'remote_env',
@@ -47,11 +47,11 @@ def test_bad_url(intake_server):
     bad_url = intake_server + '/nonsense_prefix'
 
     with pytest.raises(Exception):
-        Catalog(bad_url)
+        open_catalog(bad_url)
 
 
 def test_metadata(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     assert hasattr(catalog, 'metadata')
     assert catalog.metadata['test'] is True
     assert catalog.version == 1
@@ -59,7 +59,7 @@ def test_metadata(intake_server):
 
 def test_nested_remote(intake_server):
     from intake.catalog.local import LocalCatalogEntry
-    catalog = Catalog()
+    catalog = open_catalog()
     catalog._entries = {
         'server': LocalCatalogEntry('server', 'remote test', 'intake_remote',
                                     True, {'url': intake_server}, [],
@@ -70,7 +70,7 @@ def test_nested_remote(intake_server):
 
 def test_remote_direct(intake_server):
     from intake.container.dataframe import RemoteDataFrame
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     s0 = catalog.entry1()
     s0.discover()
     s = RemoteDataFrame(intake_server.replace('intake', 'http'), {},
@@ -83,20 +83,20 @@ def test_remote_direct(intake_server):
 
 
 def test_entry_metadata(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     entry = catalog['arr']
     assert entry.metadata == entry().metadata
 
 
 def test_unknown_source(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     with pytest.raises(Exception):
         catalog['does_not_exist'].describe()
 
 
 def test_remote_datasource_interface(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog['entry1'].get()
 
@@ -104,14 +104,14 @@ def test_remote_datasource_interface(intake_server):
 
 
 def test_environment_evaluation(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     import os
     os.environ['INTAKE_TEST'] = 'client'
     catalog['remote_env']
 
 
 def test_read(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog['entry1'].get()
 
@@ -138,7 +138,7 @@ def test_read(intake_server):
 
 
 def test_read_direct(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog['entry1_part'].get(part='2')
     test_dir = os.path.dirname(__file__)
@@ -167,7 +167,7 @@ def test_read_direct(intake_server):
 
 
 def test_read_chunks(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog.entry1.get()
 
@@ -183,7 +183,7 @@ def test_read_chunks(intake_server):
 
 
 def test_read_partition(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog.entry1.get()
 
@@ -198,21 +198,21 @@ def test_read_partition(intake_server):
 
 
 def test_close(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog.entry1.get()
     d.close()
 
 
 def test_with(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     with catalog.entry1.get() as f:
         assert f.discover()
 
 
 def test_pickle(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
 
     d = catalog.entry1.get()
 
@@ -229,7 +229,7 @@ def test_pickle(intake_server):
 
 
 def test_to_dask(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     d = catalog.entry1.get()
     df = d.to_dask()
 
@@ -239,7 +239,7 @@ def test_to_dask(intake_server):
 def test_remote_env(intake_server):
     import os
     os.environ['INTAKE_TEST'] = 'client'
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     with pytest.raises(Exception) as e:
         catalog.remote_env.get()
     assert 'path-server' in str(e.value)
@@ -249,7 +249,7 @@ def test_remote_env(intake_server):
     assert 'path-client' in str(e.value)
 
     # prevents *client* from getting env
-    catalog = Catalog(intake_server, getenv=False)
+    catalog = open_catalog(intake_server, getenv=False)
     with pytest.raises(Exception) as e:
         catalog.local_env.get()
     assert 'INTAKE_TEST' in str(e.value)
@@ -258,7 +258,7 @@ def test_remote_env(intake_server):
 def test_remote_sequence(intake_server):
     import glob
     d = os.path.dirname(TEST_CATALOG_PATH)
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     assert 'text' in catalog
     s = catalog.text()
     s.discover()
@@ -268,7 +268,7 @@ def test_remote_sequence(intake_server):
 
 
 def test_remote_arr(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     assert 'arr' in catalog
     s = catalog.arr()
     s.discover()
@@ -280,7 +280,7 @@ def test_remote_arr(intake_server):
 
 def test_pagination(intake_server):
     PAGE_SIZE = 2
-    catalog = Catalog(intake_server, page_size=PAGE_SIZE)
+    catalog = open_catalog(intake_server, page_size=PAGE_SIZE)
     assert len(catalog._entries._page_cache) == 0
     assert len(catalog._entries._direct_lookup_cache) == 0
     # Trigger fetching one specific name.
@@ -305,7 +305,7 @@ def test_pagination(intake_server):
 
 def test_dir(intake_server):
     PAGE_SIZE = 2
-    catalog = Catalog(intake_server, page_size=PAGE_SIZE)
+    catalog = open_catalog(intake_server, page_size=PAGE_SIZE)
     assert len(catalog._entries._page_cache) == 0
     assert len(catalog._entries._direct_lookup_cache) == 0
     assert not catalog._entries.complete
@@ -342,7 +342,7 @@ def test_dir(intake_server):
     assert len(record) == 0
 
     # Load without pagination (with also loads everything).
-    catalog = Catalog(intake_server, page_size=None)
+    catalog = open_catalog(intake_server, page_size=None)
     assert catalog._entries.complete
     with pytest.warns(None) as record:
         assert set(catalog) == set(catalog._ipython_key_completions_())
@@ -351,7 +351,7 @@ def test_dir(intake_server):
 
 
 def test_getitem_and_getattr(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     catalog['arr']
     with pytest.raises(KeyError):
         catalog['doesnotexist']
@@ -372,8 +372,8 @@ def test_getitem_and_getattr(intake_server):
 
 
 def test_search(intake_server):
-    remote_catalog = Catalog(intake_server)
-    local_catalog = Catalog(TEST_CATALOG_PATH)
+    remote_catalog = open_catalog(intake_server)
+    local_catalog = open_catalog(TEST_CATALOG_PATH)
 
     # Basic example
     remote_results = remote_catalog.search('entry1')
@@ -418,18 +418,18 @@ def test_search(intake_server):
 
 
 def test_access_subcatalog(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     catalog['nested']
 
 
 def test_len(intake_server):
-    remote_catalog = Catalog(intake_server)
-    local_catalog = Catalog(TEST_CATALOG_PATH)
+    remote_catalog = open_catalog(intake_server)
+    local_catalog = open_catalog(TEST_CATALOG_PATH)
     assert sum(1 for entry in local_catalog) == len(remote_catalog)
 
 
 def test_datetime(intake_server):
-    catalog = Catalog(intake_server)
+    catalog = open_catalog(intake_server)
     info = catalog["datetime"].describe()
     print(info)
     expected = {
diff --git a/intake/cli/server/tests/test_server.py b/intake/cli/server/tests/test_server.py
index ead28ca..6129c00 100644
--- a/intake/cli/server/tests/test_server.py
+++ b/intake/cli/server/tests/test_server.py
@@ -18,7 +18,7 @@ from tornado.ioloop import IOLoop
 from tornado.testing import AsyncHTTPTestCase
 import msgpack
 
-from intake import Catalog, open_catalog
+from intake import open_catalog
 from intake.container.serializer import MsgPackSerializer, GzipCompressor
 from intake.cli.server.server import IntakeServer
 from intake.compat import unpack_kwargs, pack_kwargs
@@ -30,7 +30,7 @@ catalog_file = make_path_posix(
 
 class TestServerV1Base(AsyncHTTPTestCase):
     def get_app(self):
-        local_catalog = Catalog(catalog_file)
+        local_catalog = open_catalog(catalog_file)
         self.server = IntakeServer(local_catalog)
         return self.server.make_app()
 
diff --git a/intake/tests/test_config.py b/intake/tests/test_config.py
index 4d00355..27ef3fd 100644
--- a/intake/tests/test_config.py
+++ b/intake/tests/test_config.py
@@ -89,11 +89,11 @@ def test_conf_auth():
 
             # with cat
             with pytest.raises(Exception):
-                intake.Catalog('intake://localhost:5556')
+                intake.open_catalog('intake://localhost:5556')
 
-            cat = intake.Catalog('intake://localhost:5556',
-                                 storage_options={'headers':
-                                                  {'intake-secret': 'test'}})
+            cat = intake.open_catalog('intake://localhost:5556',
+                                      storage_options={'headers':
+                                                       {'intake-secret': 'test'}})
             assert 'entry1' in cat
 
 
diff --git a/intake/tests/test_top_level.py b/intake/tests/test_top_level.py
index 90849ef..dea2180 100644
--- a/intake/tests/test_top_level.py
+++ b/intake/tests/test_top_level.py
@@ -15,6 +15,7 @@ import intake
 import appdirs
 import pytest
 from intake.utils import make_path_posix
+import intake.catalog.local
 
 
 def copy_test_file(filename, target_dir):
@@ -40,6 +41,7 @@ def user_catalog():
     # files already there)
     os.remove(target_catalog)
 
+
 @pytest.fixture
 def tmp_path_catalog():
     tmp_path = posixpath.join(tempfile.gettempdir(), 'intake')
@@ -70,7 +72,7 @@ def test_user_catalog(user_catalog):
 
 
 def test_open_styles(tmp_path_catalog):
-    cat = intake.Catalog(tmp_path_catalog)
+    cat = intake.catalog.local.YAMLFileCatalog(tmp_path_catalog)
     cat2 = intake.open_catalog(tmp_path_catalog)
     assert list(cat) == list(cat2)
     cat2 = intake.open_catalog([tmp_path_catalog])
@@ -107,3 +109,8 @@ def test_bad_open():
 def test_output_notebook():
     pytest.importorskip('hvplot')
     intake.output_notebook()
+
+
+def test_old_usage():
+    with pytest.warns(UserWarning):
+        intake.Catalog()