Skip to content

Commit

Permalink
Compatibility with ydiff>=1.3 (patroni#3042)
Browse files Browse the repository at this point in the history
PatchStream class was removed as it was effectively doing nothing useful.
  • Loading branch information
CyberDem0n authored Apr 2, 2024
1 parent d7454f7 commit 3fd7c98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions patroni/ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
from psycopg import Cursor
from psycopg2 import cursor

try:
from ydiff import markup_to_pager, PatchStream # pyright: ignore [reportMissingModuleSource]
try: # pragma: no cover
from ydiff import markup_to_pager # pyright: ignore [reportMissingModuleSource]
try:
from ydiff import PatchStream # pyright: ignore [reportMissingModuleSource]
except ImportError:
PatchStream = iter
except ImportError: # pragma: no cover
from cdiff import markup_to_pager, PatchStream # pyright: ignore [reportMissingModuleSource]

Expand Down

0 comments on commit 3fd7c98

Please sign in to comment.