Skip to content

Commit

Permalink
Add a redshift_sqlalchemy compatibility package
Browse files Browse the repository at this point in the history
  • Loading branch information
jklukas committed Oct 23, 2015
1 parent 393ba33 commit a1f6994
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
0.3.2 (unreleased)
------------------

- Nothing changed yet.
- Change the name of the package to `sqlalchemy_redshift` to match the naming
convention for other dialects; the `redshift_sqlalchemy` package now emits
a `DeprecationWarning` and references `sqlalchemy_redshift`.
The `redshift_sqlalchemy` compatibility package will be removed
in a future release.
(`Issue #58 <https://github.com/sqlalchemy-redshift/sqlalchemy-redshift/pull/58>`_)


0.3.1 (2015-10-08)
Expand Down
22 changes: 22 additions & 0 deletions redshift_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Compatibility module for projects referencing sqlalchemy_redshift
by its old name "redshift_sqlalchemy".
"""

import sys
import warnings

import sqlalchemy_redshift


DEPRECATION_MESSAGE = """\
redshift_sqlalchemy has been renamed to sqlalchemy_redshift.
The redshift_sqlalchemy compatibility package will be removed in
a future release, so it is recommended to update all package references.
"""

warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)

# All references to module redshift_sqlalchemy will map to sqlalchemy_redshift
sys.modules['redshift_sqlalchemy'] = sqlalchemy_redshift
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
maintainer_email='[email protected]',
license="MIT",
url='https://github.com/sqlalchemy-redshift/sqlalchemy-redshift',
packages=['sqlalchemy_redshift'],
packages=['sqlalchemy_redshift', 'redshift_sqlalchemy'],
package_data={'sqlalchemy_redshift': ['redshift-ssl-ca-cert.pem']},
install_requires=[
'psycopg2>=2.5',
Expand Down

0 comments on commit a1f6994

Please sign in to comment.