File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 66if TYPE_CHECKING :
77 from .connection import Connection
88
9- __version__ : str = "0.4.4 "
9+ __version__ : str = "0.4.5 "
1010
1111# Globals https://www.python.org/dev/peps/pep-0249/#globals
1212apilevel : str = "2.0"
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ Documentation = "https://github.com/passren/PyMongoSQL/wiki"
5858[project .entry-points ."sqlalchemy .dialects" ]
5959mongodb = " pymongosql.sqlalchemy_mongodb.sqlalchemy_dialect:PyMongoSQLDialect"
6060"mongodb+srv" = " pymongosql.sqlalchemy_mongodb.sqlalchemy_dialect:PyMongoSQLDialect"
61+ "mongodb.srv" = " pymongosql.sqlalchemy_mongodb.sqlalchemy_dialect:PyMongoSQLDialect"
6162
6263[tool .black ]
6364line-length = 120
Original file line number Diff line number Diff line change @@ -658,3 +658,14 @@ def test_dialect_registration(self):
658658 except ImportError :
659659 # Skip if SQLAlchemy registry is not available
660660 self .skipTest ("SQLAlchemy registry not available" )
661+
662+ def test_srv_dialect_lookup (self ):
663+ """Test that mongodb.srv resolves correctly (mongodb+srv:// URLs)."""
664+ if not HAS_SQLALCHEMY :
665+ self .skipTest ("SQLAlchemy not available" )
666+
667+ from sqlalchemy .dialects import registry
668+
669+ loaded = registry .load ("mongodb.srv" )
670+ self .assertIsNotNone (loaded )
671+ self .assertEqual (loaded .name , "mongodb" )
You can’t perform that action at this time.
0 commit comments