Skip to content

Commit 5abae48

Browse files
authored
Merge pull request #896 from mwcm/fix_mycli_magic
fix "AttributeError: type object 'Connection' has no attribute 'get'" in mycli iPython magic
2 parents d976fbd + 8d72e3c commit 5abae48

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ Features:
99
Bug Fixes:
1010
----------
1111
* Fixed compatibility with sqlparse 0.4 (Thanks: [mtorromeo]).
12+
* Fixed iPython magic (Thanks: [mwcm]).
1213

1314
1.22.2
1415
======
1516

1617
Bug Fixes:
1718
----------
1819

19-
* Make the `pwd` module optional.
20+
* Make the `pwd` module optional.
2021

2122
1.22.1
2223
======
@@ -790,3 +791,4 @@ Bug Fixes:
790791
[Zach DeCook]: https://zachdecook.com
791792
[laixintao]: https://github.com/laixintao
792793
[mtorromeo]: https://github.com/mtorromeo
794+
[mwcm]: https://github.com/mwcm

mycli/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Contributors:
7575
* Zach DeCook
7676
* kevinhwang91
7777
* KITAGAWA Yasutaka
78+
* Morgan Mitchell
7879
* Massimiliano Torromeo
7980

8081
Creator:

mycli/magic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def load_ipython_extension(ipython):
1919
def mycli_line_magic(line):
2020
_logger.debug('mycli magic called: %r', line)
2121
parsed = sql.parse.parse(line, {})
22-
conn = sql.connection.Connection.get(parsed['connection'])
22+
conn = sql.connection.Connection(parsed['connection'])
2323

2424
try:
2525
# A corresponding mycli object already exists

0 commit comments

Comments
 (0)