diff --git a/README.rst b/README.rst index 96a44a5..3362e13 100644 --- a/README.rst +++ b/README.rst @@ -13,41 +13,34 @@ This is a fork of SQLAlchemy's internal "sybase" dialect which is soon to be deprecated and will be removed from a future release. -Status ------- - -This dialect currently depends on SQLAlchemy features that have not been -officially released. For now you must **first** install SQLAlchemy from -source **before** installing this dialect. - -For SQLAlchemy 1.3 ...:: - - pip install git+https://github.com/sqlalchemy/sqlalchemy@rel_1_3 +Pre-requisites +-------------- -... or for (pre-release) SQLAlchemy 1.4 ...:: +You will need an ODBC driver for SAP ASE installed on the machine from which +you want to connect to the SAP ASE server. This dialect is tested with +a *current version* of the `FreeTDS`_ ODBC driver. - pip install git+https://github.com/sqlalchemy/sqlalchemy.git +.. _FreeTDS: https://www.freetds.org/ -Pre-requisites --------------- +Also, if you are running on Linux and using `unixODBC`_, check the version via +``odbcinst -j``. The official repositories of several Linux distributions +contain versions of unixODBC that are quite old and somewhat buggy. -You will need an ODBC driver for Sybase installed on the machine from which -you want to connect to the Sybase server. This dialect is tested with -a *current version* of the FreeTDS ODBC driver. +.. _unixODBC: http://www.unixodbc.org/ -Co-requisites -------------- +Installing +---------- -This dialect requires SQLAlchemy and pyodbc. They are both specified as requirements so ``pip`` will install +SQLAlchemy and pyodbc are specified as requirements so ``pip`` will install them if they are not already in place. To install, just:: - pip install sqlalchemy-sybase --pre + pip install sqlalchemy-sybase Getting Started --------------- -Create an `ODBC DSN (Data Source Name)`_ that points to your Sybase database. +Create an `ODBC DSN (Data Source Name)`_ that points to your SAP ASE database. Then, in your Python app, you can connect to the database via:: from sqlalchemy import create_engine diff --git a/setup.py b/setup.py index e967a83..d2fc2c4 100644 --- a/setup.py +++ b/setup.py @@ -25,8 +25,8 @@ # 'Development Status :: 1 - Planning', # "Development Status :: 2 - Pre-Alpha", # 'Development Status :: 3 - Alpha', - 'Development Status :: 4 - Beta', - # 'Development Status :: 5 - Production/Stable', + # 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", diff --git a/sqlalchemy_sybase/__init__.py b/sqlalchemy_sybase/__init__.py index 73b5dbf..106a89f 100644 --- a/sqlalchemy_sybase/__init__.py +++ b/sqlalchemy_sybase/__init__.py @@ -33,7 +33,7 @@ from .base import VARBINARY from .base import VARCHAR -__version__ = "1.0.0b2" +__version__ = "1.0.0" # default (and only) dialect base.dialect = dialect = pyodbc.dialect diff --git a/sqlalchemy_sybase/pyodbc.py b/sqlalchemy_sybase/pyodbc.py index e82d767..19156c2 100644 --- a/sqlalchemy_sybase/pyodbc.py +++ b/sqlalchemy_sybase/pyodbc.py @@ -78,6 +78,8 @@ def set_ddl_autocommit(self, connection, value): class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): execution_ctx_cls = SybaseExecutionContext_pyodbc + # TODO: remove once https://github.com/sqlalchemy/sqlalchemy/issues/5321 + # is resolved and released supports_sane_rowcount_returning = True colspecs = {sqltypes.Numeric: _SybNumeric_pyodbc}