-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
ENH: Add check for character limmit #57103
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
Changes from 9 commits
20e357a
74e302f
74f4f81
d864912
babdf29
4768089
65284bb
41cad2b
5470464
2e79c61
91a4bee
62b8b54
bd6a975
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1326,6 +1326,11 @@ def _value_with_fmt( | |
fmt = "0" | ||
else: | ||
val = str(val) | ||
# GH#56954 | ||
if len(val) > 32767: | ||
raise ValueError( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a reference where Also I think this should be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had suggested an error over a warning in #57103 (comment) primarily due to the fact that we raise an error if the frame is too long or wide already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see. The reason I suggested warning was due to a similar scenario I remember a while back where we used to raise an error if we detected whether a I slightly prefer to still raise a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually - raising here would need a deprecation too, right? That makes me think we should raise a warning. @luke396 - can you turn this back into a warning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Conservatively yes, but it would "fix" an undesired (external) behavior ("bug"). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Truth be told, I didn't initially utilize 'UserWarning' to the extent you both recommended when I first started out. However, I gained valuable insights from the discussions you provided. |
||
"Cell contents too long, truncated to 32767 characters" | ||
) | ||
|
||
return val, fmt | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.