prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  BUG: File pseudo-backends failing for missing pandas option
  The next code is failing in master since #2833:
  
  ```python
  >>> import ibis
  >>> con = ibis.csv.connect('/home/mgarcia/src/ibis/ci/ibis-testing-data/')
  >>> expr = con.table('functional_alltypes')['double_col'] * 2
  >>> print(expr.execute())
  OptionError: "No such keys(s): 'pandas.enable_trace'"
  ```
  
  The problem is when the `csv` backend  (or other file backends) are loaded, but the pandas backend is not. This is because `ibis.pandas` loads the pandas options, which looks like they are needed by the file pseudo-backends.
  
  The CI is not failing, I guess because we test pandas and the file backends are tested together, and pandas is loaded when the file backends are tested.
  
  </issue>
  <code>
  [start of ibis/backends/base/file/__init__.py]
  1 from pathlib import Path
  2 
  3 import ibis.expr.types as ir
  4 from ibis.backends.base import BaseBackend, Client, Database
  5 from ibis.backends.pandas.core import execute_and_reset
  6 
  7 
  8 class FileClient(Client):
  9     def __init__(self, backend, root):
  10         self.backend = backend
  11         self.extension = backend.extension
  12         self.table_class = backend.table_class
  13         self.root = Path(str(root))
  14         self.dictionary = {}
  15 
  16     def insert(self, path, expr, **kwargs):
  17         raise NotImplementedError
  18 
  19     def table(self, name, path):
  20         raise NotImplementedError
  21 
  22     def database(self, name=None, path=None):
  23         if name is None:
  24             return FileDatabase('root', self, path=path)
  25 
  26         if name not in self.list_databases(path):
  27             raise AttributeError(name)
  28         if path is None:
  29             path = self.root
  30 
  31         new_name = "{}.{}".format(name, self.extension)
  32         if (self.root / name).is_dir():
  33             path /= name
  34         elif not str(path).endswith(new_name):
  35             path /= new_name
  36 
  37         return FileDatabase(name, self, path=path)
  38 
  39     def execute(self, expr, params=None, **kwargs):  # noqa
  40         assert isinstance(expr, ir.Expr)
  41         return execute_and_reset(expr, params=params, **kwargs)
  42 
  43     def list_tables(self, path=None):
  44         raise NotImplementedError
  45 
  46     def _list_tables_files(self, path=None):
  47         # tables are files in a dir
  48         if path is None:
  49             path = self.root
  50 
  51         tables = []
  52         if path.is_dir():
  53             for d in path.iterdir():
  54                 if d.is_file():
  55                     if str(d).endswith(self.extension):
  56                         tables.append(d.stem)
  57         elif path.is_file():
  58             if str(path).endswith(self.extension):
  59                 tables.append(path.stem)
  60         return tables
  61 
  62     def list_databases(self, path=None):
  63         raise NotImplementedError
  64 
  65     def _list_databases_dirs(self, path=None):
  66         # databases are dir
  67         if path is None:
  68             path = self.root
  69 
  70         tables = []
  71         if path.is_dir():
  72             for d in path.iterdir():
  73                 if d.is_dir():
  74                     tables.append(d.name)
  75         return tables
  76 
  77     def _list_databases_dirs_or_files(self, path=None):
  78         # databases are dir & file
  79         if path is None:
  80             path = self.root
  81 
  82         tables = []
  83         if path.is_dir():
  84             for d in path.iterdir():
  85                 if d.is_dir():
  86                     tables.append(d.name)
  87                 elif d.is_file():
  88                     if str(d).endswith(self.extension):
  89                         tables.append(d.stem)
  90         elif path.is_file():
  91             # by definition we are at the db level at this point
  92             pass
  93 
  94         return tables
  95 
  96 
  97 class FileDatabase(Database):
  98     def __init__(self, name, client, path=None):
  99         super().__init__(name, client)
  100         self.path = path
  101 
  102     def __str__(self):
  103         return '{0.__class__.__name__}({0.name})'.format(self)
  104 
  105     def __dir__(self):
  106         dbs = self.list_databases(path=self.path)
  107         tables = self.list_tables(path=self.path)
  108         return sorted(set(dbs).union(set(tables)))
  109 
  110     def __getattr__(self, name):
  111         try:
  112             return self.table(name, path=self.path)
  113         except AttributeError:
  114             return self.database(name, path=self.path)
  115 
  116     def table(self, name, path):
  117         return self.client.table(name, path=path)
  118 
  119     def database(self, name=None, path=None):
  120         return self.client.database(name=name, path=path)
  121 
  122     def list_databases(self, path=None):
  123         if path is None:
  124             path = self.path
  125         return sorted(self.client.list_databases(path=path))
  126 
  127     def list_tables(self, path=None):
  128         if path is None:
  129             path = self.path
  130         return sorted(self.client.list_tables(path=path))
  131 
  132 
  133 class BaseFileBackend(BaseBackend):
  134     """
  135     Base backend class for pandas pseudo-backends for file formats.
  136     """
  137 
  138     def connect(self, path):
  139         """Create a Client for use with Ibis
  140 
  141         Parameters
  142         ----------
  143         path : str or pathlib.Path
  144 
  145         Returns
  146         -------
  147         Client
  148         """
  149         return self.client_class(backend=self, root=path)
  150
  [end of ibis/backends/base/file/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/ibis/backends/base/file/__init__.py b/ibis/backends/base/file/__init__.py
  --- a/ibis/backends/base/file/__init__.py
  +++ b/ibis/backends/base/file/__init__.py
  @@ -1,9 +1,13 @@
   from pathlib import Path
   
  +import ibis
   import ibis.expr.types as ir
   from ibis.backends.base import BaseBackend, Client, Database
   from ibis.backends.pandas.core import execute_and_reset
   
  +# Load options of pandas backend
  +ibis.pandas
  +
   
   class FileClient(Client):
       def __init__(self, backend, root):
  
verification_info: {"golden_diff": "diff --git a/ibis/backends/base/file/__init__.py b/ibis/backends/base/file/__init__.py\n--- a/ibis/backends/base/file/__init__.py\n+++ b/ibis/backends/base/file/__init__.py\n@@ -1,9 +1,13 @@\n from pathlib import Path\n \n+import ibis\n import ibis.expr.types as ir\n from ibis.backends.base import BaseBackend, Client, Database\n from ibis.backends.pandas.core import execute_and_reset\n \n+# Load options of pandas backend\n+ibis.pandas\n+\n \n class FileClient(Client):\n     def __init__(self, backend, root):\n", "issue": "BUG: File pseudo-backends failing for missing pandas option\nThe next code is failing in master since #2833:\r\n\r\n```python\r\n>>> import ibis\r\n>>> con = ibis.csv.connect('/home/mgarcia/src/ibis/ci/ibis-testing-data/')\r\n>>> expr = con.table('functional_alltypes')['double_col'] * 2\r\n>>> print(expr.execute())\r\nOptionError: \"No such keys(s): 'pandas.enable_trace'\"\r\n```\r\n\r\nThe problem is when the `csv` backend  (or other file backends) are loaded, but the pandas backend is not. This is because `ibis.pandas` loads the pandas options, which looks like they are needed by the file pseudo-backends.\r\n\r\nThe CI is not failing, I guess because we test pandas and the file backends are tested together, and pandas is loaded when the file backends are tested.\n", "before_files": [{"content": "from pathlib import Path\n\nimport ibis.expr.types as ir\nfrom ibis.backends.base import BaseBackend, Client, Database\nfrom ibis.backends.pandas.core import execute_and_reset\n\n\nclass FileClient(Client):\n    def __init__(self, backend, root):\n        self.backend = backend\n        self.extension = backend.extension\n        self.table_class = backend.table_class\n        self.root = Path(str(root))\n        self.dictionary = {}\n\n    def insert(self, path, expr, **kwargs):\n        raise NotImplementedError\n\n    def table(self, name, path):\n        raise NotImplementedError\n\n    def database(self, name=None, path=None):\n        if name is None:\n            return FileDatabase('root', self, path=path)\n\n        if name not in self.list_databases(path):\n            raise AttributeError(name)\n        if path is None:\n            path = self.root\n\n        new_name = \"{}.{}\".format(name, self.extension)\n        if (self.root / name).is_dir():\n            path /= name\n        elif not str(path).endswith(new_name):\n            path /= new_name\n\n        return FileDatabase(name, self, path=path)\n\n    def execute(self, expr, params=None, **kwargs):  # noqa\n        assert isinstance(expr, ir.Expr)\n        return execute_and_reset(expr, params=params, **kwargs)\n\n    def list_tables(self, path=None):\n        raise NotImplementedError\n\n    def _list_tables_files(self, path=None):\n        # tables are files in a dir\n        if path is None:\n            path = self.root\n\n        tables = []\n        if path.is_dir():\n            for d in path.iterdir():\n                if d.is_file():\n                    if str(d).endswith(self.extension):\n                        tables.append(d.stem)\n        elif path.is_file():\n            if str(path).endswith(self.extension):\n                tables.append(path.stem)\n        return tables\n\n    def list_databases(self, path=None):\n        raise NotImplementedError\n\n    def _list_databases_dirs(self, path=None):\n        # databases are dir\n        if path is None:\n            path = self.root\n\n        tables = []\n        if path.is_dir():\n            for d in path.iterdir():\n                if d.is_dir():\n                    tables.append(d.name)\n        return tables\n\n    def _list_databases_dirs_or_files(self, path=None):\n        # databases are dir & file\n        if path is None:\n            path = self.root\n\n        tables = []\n        if path.is_dir():\n            for d in path.iterdir():\n                if d.is_dir():\n                    tables.append(d.name)\n                elif d.is_file():\n                    if str(d).endswith(self.extension):\n                        tables.append(d.stem)\n        elif path.is_file():\n            # by definition we are at the db level at this point\n            pass\n\n        return tables\n\n\nclass FileDatabase(Database):\n    def __init__(self, name, client, path=None):\n        super().__init__(name, client)\n        self.path = path\n\n    def __str__(self):\n        return '{0.__class__.__name__}({0.name})'.format(self)\n\n    def __dir__(self):\n        dbs = self.list_databases(path=self.path)\n        tables = self.list_tables(path=self.path)\n        return sorted(set(dbs).union(set(tables)))\n\n    def __getattr__(self, name):\n        try:\n            return self.table(name, path=self.path)\n        except AttributeError:\n            return self.database(name, path=self.path)\n\n    def table(self, name, path):\n        return self.client.table(name, path=path)\n\n    def database(self, name=None, path=None):\n        return self.client.database(name=name, path=path)\n\n    def list_databases(self, path=None):\n        if path is None:\n            path = self.path\n        return sorted(self.client.list_databases(path=path))\n\n    def list_tables(self, path=None):\n        if path is None:\n            path = self.path\n        return sorted(self.client.list_tables(path=path))\n\n\nclass BaseFileBackend(BaseBackend):\n    \"\"\"\n    Base backend class for pandas pseudo-backends for file formats.\n    \"\"\"\n\n    def connect(self, path):\n        \"\"\"Create a Client for use with Ibis\n\n        Parameters\n        ----------\n        path : str or pathlib.Path\n\n        Returns\n        -------\n        Client\n        \"\"\"\n        return self.client_class(backend=self, root=path)\n", "path": "ibis/backends/base/file/__init__.py"}]}