Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty table config is deprecated and it causes an error of KeyError: "DEFAULT" #252

Open
talbarda opened this issue Nov 3, 2024 · 2 comments

Comments

@talbarda
Copy link

talbarda commented Nov 3, 2024

https://github.com/catherinedevlin/ipython-sql/blob/eb274844b4a619463149e0d57df705e1bba47635/src/sql/run.py#L116C63-L116C74

description
in https://github.com/catherinedevlin/ipython-sql/blob/eb274844b4a619463149e0d57df705e1bba47635/src/sql/run.py#L116C63-L116C74 it'd relying on old values which were deprecated in prettytable/prettytable@c280f5d#diff-a23434b1b73f48b3a86c77a98ace18042f475a7463f98eea9d2ccf7523e6046dL13 (see https://github.com/prettytable/prettytable/releases)

few possible solutions:

  1. change to self.pretty = PrettyTable(self.field_names, style=prettytable.__dict__[f"_DEPRECATED_{config.style.upper()}])
  2. freeze prettytable to 3.11 in
    prettytable
@pavlozt
Copy link

pavlozt commented Dec 15, 2024

The proposed change works.
And it is a very frustrating bug that breaks the basic functionality

@talbarda
Copy link
Author

Can you merge this then ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants