prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Incompatibility with old versions of SQLAlchemy.
  Connecting to PostgreSQL fails with old versions of SQLAlchemy raising an error: `sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name`. This error is resolved once sqlalchemy version is updated.
  
  For example:
  ```python
  >>> import sqlalchemy
  >>> sqlalchemy.__version__
  '1.0.13'
  >>> from pfnopt.storages import RDBStorage
  >>> RDBStorage(url='postgresql://pfnopt:somepassword@localhost:5432/some_db')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Users/sano/PycharmProjects/pfnopt/pfnopt/storages/rdb.py", line 85, in __init__
      Base.metadata.create_all(self.engine)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 3695, in create_all
      tables=tables)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1856, in _run_visitor
      conn._run_visitor(visitorcallable, element, **kwargs)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1481, in _run_visitor
      **kwargs).traverse_single(element)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py", line 121, in traverse_single
      return meth(obj, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py", line 720, in visit_metadata
      _ddl_runner=self)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
      fn(*args, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 546, in __call__
      return getattr(self.target, self.name)(*arg, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/sqltypes.py", line 1040, in _on_metadata_create
      t._on_metadata_create(target, bind, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py", line 1379, in _on_metadata_create
      self.create(bind=bind, checkfirst=checkfirst)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py", line 1317, in create
      bind.execute(CreateEnumType(self))
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 914, in execute
      return meth(self, multiparams, params)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
      return connection._execute_ddl(self, multiparams, params)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 962, in _execute_ddl
      compiled = ddl.compile(dialect=dialect)
    File "<string>", line 1, in <lambda>
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 494, in compile
      return self._compiler(dialect, bind=bind, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py", line 26, in _compiler
      return dialect.ddl_compiler(dialect, self, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 190, in __init__
      self.string = self.process(self.statement, **compile_kwargs)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 213, in process
      return obj._compiler_dispatch(self, **kwargs)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
      return meth(self, **kw)
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py", line 1613, in visit_create_enum_type
      self.preparer.format_type(type_),
    File "/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py", line 1857, in format_type
      raise exc.CompileError("Postgresql ENUM type requires a name.")
  sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name.
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 import os
  2 from setuptools import find_packages
  3 from setuptools import setup
  4 import sys
  5 
  6 
  7 def get_version():
  8     version_filepath = os.path.join(os.path.dirname(__file__), 'pfnopt', 'version.py')
  9     with open(version_filepath) as f:
  10         for line in f:
  11             if line.startswith('__version__'):
  12                 return line.strip().split()[-1][1:-1]
  13     assert False
  14 
  15 
  16 tests_require = ['pytest', 'hacking', 'mock']
  17 if sys.version_info[0] == 3:
  18     tests_require.append('mypy')
  19 
  20 
  21 setup(
  22     name='pfnopt',
  23     version=get_version(),
  24     description='',
  25     author='Takuya Akiba',
  26     author_email='akiba@preferred.jp',
  27     packages=find_packages(),
  28     install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],
  29     tests_require=tests_require,
  30     extras_require={'testing': tests_require},
  31     entry_points={
  32         'console_scripts': ['pfnopt = pfnopt.cli:main'],
  33         'pfnopt.command': ['mkstudy = pfnopt.cli:MakeStudy']
  34     }
  35 )
  36
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -25,7 +25,7 @@
       author='Takuya Akiba',
       author_email='akiba@preferred.jp',
       packages=find_packages(),
  -    install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],
  +    install_requires=['sqlalchemy>=1.1.0', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],
       tests_require=tests_require,
       extras_require={'testing': tests_require},
       entry_points={
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,7 +25,7 @@\n     author='Takuya Akiba',\n     author_email='akiba@preferred.jp',\n     packages=find_packages(),\n-    install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n+    install_requires=['sqlalchemy>=1.1.0', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n     tests_require=tests_require,\n     extras_require={'testing': tests_require},\n     entry_points={\n", "issue": "Incompatibility with old versions of SQLAlchemy.\nConnecting to PostgreSQL fails with old versions of SQLAlchemy raising an error: `sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name`. This error is resolved once sqlalchemy version is updated.\r\n\r\nFor example:\r\n```python\r\n>>> import sqlalchemy\r\n>>> sqlalchemy.__version__\r\n'1.0.13'\r\n>>> from pfnopt.storages import RDBStorage\r\n>>> RDBStorage(url='postgresql://pfnopt:somepassword@localhost:5432/some_db')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/sano/PycharmProjects/pfnopt/pfnopt/storages/rdb.py\", line 85, in __init__\r\n    Base.metadata.create_all(self.engine)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/schema.py\", line 3695, in create_all\r\n    tables=tables)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py\", line 1856, in _run_visitor\r\n    conn._run_visitor(visitorcallable, element, **kwargs)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py\", line 1481, in _run_visitor\r\n    **kwargs).traverse_single(element)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py\", line 121, in traverse_single\r\n    return meth(obj, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py\", line 720, in visit_metadata\r\n    _ddl_runner=self)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/event/attr.py\", line 256, in __call__\r\n    fn(*args, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py\", line 546, in __call__\r\n    return getattr(self.target, self.name)(*arg, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/sqltypes.py\", line 1040, in _on_metadata_create\r\n    t._on_metadata_create(target, bind, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py\", line 1379, in _on_metadata_create\r\n    self.create(bind=bind, checkfirst=checkfirst)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py\", line 1317, in create\r\n    bind.execute(CreateEnumType(self))\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py\", line 914, in execute\r\n    return meth(self, multiparams, params)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py\", line 68, in _execute_on_connection\r\n    return connection._execute_ddl(self, multiparams, params)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/engine/base.py\", line 962, in _execute_ddl\r\n    compiled = ddl.compile(dialect=dialect)\r\n  File \"<string>\", line 1, in <lambda>\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/elements.py\", line 494, in compile\r\n    return self._compiler(dialect, bind=bind, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py\", line 26, in _compiler\r\n    return dialect.ddl_compiler(dialect, self, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py\", line 190, in __init__\r\n    self.string = self.process(self.statement, **compile_kwargs)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py\", line 213, in process\r\n    return obj._compiler_dispatch(self, **kwargs)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py\", line 81, in _compiler_dispatch\r\n    return meth(self, **kw)\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py\", line 1613, in visit_create_enum_type\r\n    self.preparer.format_type(type_),\r\n  File \"/Users/sano/anaconda3/envs/pfnopt-35/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/base.py\", line 1857, in format_type\r\n    raise exc.CompileError(\"Postgresql ENUM type requires a name.\")\r\nsqlalchemy.exc.CompileError: Postgresql ENUM type requires a name.\r\n```\n", "before_files": [{"content": "import os\nfrom setuptools import find_packages\nfrom setuptools import setup\nimport sys\n\n\ndef get_version():\n    version_filepath = os.path.join(os.path.dirname(__file__), 'pfnopt', 'version.py')\n    with open(version_filepath) as f:\n        for line in f:\n            if line.startswith('__version__'):\n                return line.strip().split()[-1][1:-1]\n    assert False\n\n\ntests_require = ['pytest', 'hacking', 'mock']\nif sys.version_info[0] == 3:\n    tests_require.append('mypy')\n\n\nsetup(\n    name='pfnopt',\n    version=get_version(),\n    description='',\n    author='Takuya Akiba',\n    author_email='akiba@preferred.jp',\n    packages=find_packages(),\n    install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n    tests_require=tests_require,\n    extras_require={'testing': tests_require},\n    entry_points={\n        'console_scripts': ['pfnopt = pfnopt.cli:main'],\n        'pfnopt.command': ['mkstudy = pfnopt.cli:MakeStudy']\n    }\n)\n", "path": "setup.py"}], "after_files": [{"content": "import os\nfrom setuptools import find_packages\nfrom setuptools import setup\nimport sys\n\n\ndef get_version():\n    version_filepath = os.path.join(os.path.dirname(__file__), 'pfnopt', 'version.py')\n    with open(version_filepath) as f:\n        for line in f:\n            if line.startswith('__version__'):\n                return line.strip().split()[-1][1:-1]\n    assert False\n\n\ntests_require = ['pytest', 'hacking', 'mock']\nif sys.version_info[0] == 3:\n    tests_require.append('mypy')\n\n\nsetup(\n    name='pfnopt',\n    version=get_version(),\n    description='',\n    author='Takuya Akiba',\n    author_email='akiba@preferred.jp',\n    packages=find_packages(),\n    install_requires=['sqlalchemy>=1.1.0', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n    tests_require=tests_require,\n    extras_require={'testing': tests_require},\n    entry_points={\n        'console_scripts': ['pfnopt = pfnopt.cli:main'],\n        'pfnopt.command': ['mkstudy = pfnopt.cli:MakeStudy']\n    }\n)\n", "path": "setup.py"}]}