Remove the zxJDBC dialect and its entry points - #204
Open
aminghadersohi wants to merge 1 commit into
Open
aminghadersohi wants to merge 1 commit into
aminghadersohi wants to merge 1 commit into
Conversation
ibm_db_sa/zxjdbc.py imports sqlalchemy.connectors.zxJDBC, which SQLAlchemy removed in 1.4, and the dialect itself only runs on Jython, which cannot install this package (python_requires >= 3.9). The four sqlalchemy.dialects entry points that point at it therefore always fail to load with ModuleNotFoundError. Applications that enumerate installed dialects through entry points (for example to list available databases) hit and log that error on every scan. Drop the module, its four entry points and the matching test registrations. The ibm_db, pyodbc and AS/400 dialects are unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ibm_db_sa/zxjdbc.pyimportssqlalchemy.connectors.zxJDBC, which SQLAlchemy removed in 1.4. This package declares foursqlalchemy.dialectsentry points that point at it:db2.zxjdbc,db2.zxjdbc400ibm_db_sa.zxjdbc,ibm_db_sa.zxjdbc400On any supported SQLAlchemy 1.4 or 2.0 install, loading them always raises
ModuleNotFoundError: No module named 'sqlalchemy.connectors.zxJDBC'. The dialect also only ever worked on Jython, and Jython cannot install this package (python_requires >= 3.9), so it can't be used even with SQLAlchemy 1.3.Applications that enumerate installed dialects through entry points, for example to show which databases are available, hit and log this error on every scan.
Change
ibm_db_sa/zxjdbc.pyand its four entry points.run_tests.py.The
ibm_db,pyodbcand AS/400 dialects, and all their entry points, are unchanged.Verification
Python 3.11, SQLAlchemy 2.0.52. The script loads every
sqlalchemy.dialectsentry point this distribution declares:7f3866e(0.4.4)No module named 'sqlalchemy.connectors.zxJDBC')The same four failures reproduce with released 0.4.0 on SQLAlchemy 1.4.54. The built wheel's
entry_points.txtlists exactly the eight remaining dialects, and the wheel contains nozxjdbcmodule.