Skip to content

Commit 1c69b23

Browse files
committed
fix a compatibility issue for notebook 5.x
1 parent 8c16ee9 commit 1c69b23

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGES.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
## mysql-0.2 2017-11-21
4+
5+
* Fixed a compatibility issue for notebook 5.x
6+
7+
## mysql-0.1 2016-12-04
8+
9+
Port pgcontents to support mysql.

pgcontents/pgmanager.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ def _checkpoints_class_default(self):
7878
return PostgresCheckpoints
7979

8080
def _checkpoints_kwargs_default(self):
81-
kw = super(PostgresContentsManager, self)._checkpoints_kwargs_default()
81+
if hasattr(ContentsManager, '_default_checkpoints_kwargs'):
82+
# for newer version of notebook
83+
kw = super(PostgresContentsManager, self)._default_checkpoints_kwargs()
84+
else:
85+
# for older version of notebook
86+
kw = super(PostgresContentsManager, self)._checkpoints_kwargs_default()
8287
kw.update(
8388
{
8489
'db_url': self.db_url,

0 commit comments

Comments
 (0)