From 2a6a6c1e22ec8b978a0d08a80d12c110e697eeb6 Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Sat, 14 Nov 2020 22:51:05 +0100 Subject: [PATCH] Remove unused arguments, fixes #343. --- dataset/__init__.py | 19 ++++++------------- dataset/database.py | 2 -- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dataset/__init__.py b/dataset/__init__.py index 8935275..c371596 100644 --- a/dataset/__init__.py +++ b/dataset/__init__.py @@ -17,25 +17,20 @@ __version__ = "1.3.2" def connect( url=None, schema=None, - reflect_metadata=True, engine_kwargs=None, - reflect_views=True, ensure_schema=True, row_type=row_type, sqlite_wal_mode=True, ): - """ Opens a new connection to a database. + """Opens a new connection to a database. *url* can be any valid `SQLAlchemy engine URL`_. If *url* is not defined it will try to use *DATABASE_URL* from environment variable. Returns an - instance of :py:class:`Database `. Set *reflect_metadata* - to False if you don't want the entire database schema to be pre-loaded. - This significantly speeds up connecting to large databases with lots of - tables. *reflect_views* can be set to False if you don't want views to be - loaded. Additionally, *engine_kwargs* will be directly passed to - SQLAlchemy, e.g. set *engine_kwargs={'pool_recycle': 3600}* will avoid `DB - connection timeout`_. Set *row_type* to an alternate dict-like class to - change the type of container rows are stored in.:: + instance of :py:class:`Database `. Additionally, + *engine_kwargs* will be directly passed to SQLAlchemy, e.g. set + *engine_kwargs={'pool_recycle': 3600}* will avoid `DB connection timeout`_. + Set *row_type* to an alternate dict-like class to change the type of + container rows are stored in.:: db = dataset.connect('sqlite:///factbook.db') @@ -53,9 +48,7 @@ def connect( return Database( url, schema=schema, - reflect_metadata=reflect_metadata, engine_kwargs=engine_kwargs, - reflect_views=reflect_views, ensure_schema=ensure_schema, row_type=row_type, sqlite_wal_mode=sqlite_wal_mode, diff --git a/dataset/database.py b/dataset/database.py index 17de461..6ea3d4a 100644 --- a/dataset/database.py +++ b/dataset/database.py @@ -27,9 +27,7 @@ class Database(object): self, url, schema=None, - reflect_metadata=True, engine_kwargs=None, - reflect_views=True, ensure_schema=True, row_type=row_type, sqlite_wal_mode=True,