ArulJerald opened a new pull request, #3990:
URL: https://github.com/apache/iceberg-python/pull/3990

   The CLI passed table and view content straight to Rich as plain strings, so 
square-bracket sequences in a property key or value, a column name or doc, a 
ref name, an identifier or a path were parsed as style tags rather than text. 
Content therefore controlled the styling of CLI output, and unbalanced or 
misleading tags could alter how surrounding rows rendered.
   
   Closes #3984
   
   # Rationale for this change
   
   The issue reports this for `describe_properties`, and notes the same pattern 
in the other `describe_*` methods. Escaping each call site individually would 
mean roughly twenty `Text(...)` wraps, and would leave the next render added to 
the class exposed again.
   
   Disabling markup on the consoles the CLI writes through fixes every site at 
once — table cells, tree labels and printed exceptions alike — and keeps future 
renders covered by default. The three property maps are the sites named in the 
issue; column names and docs (`schema`, and the schema tree in `describe`), ref 
names, identifiers, partition specs and manifest/data-file paths were affected 
the same way and are now covered too.
   
   ## Are these changes tested?
   
   Yes. Five tests in `tests/cli/test_console.py` assert that content 
containing `[bold red]injected[/]` reaches the output literally rather than 
being consumed as a style directive:
   
   - namespace property (`describe --entity namespace`)
   - table property (`describe`)
   - view property (`describe --entity=view`)
   - column name and doc (`schema`)
   - column name in the schema tree (`describe`)
   
   All five fail without the change and pass with it. Full file: 106 passed.
   
   ## Are there any user-facing changes?
   
   Only that content containing square brackets now renders as written instead 
of being interpreted as styling. No command, flag or output structure changes.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to