| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
Someone should try this on Windows with "Courier New" as Terry mentioned in the issue. It will be good to check with a bunch of fonts to see what we are up against. |
Sorry, something went wrong.
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
Wow, this is an old PR but @pablogsal @ammaraskar are we interested in reviving it? I think I can rebase and get it ready for 3.12. |
Sorry, something went wrong.
|
I am. I was precisely thinking on reviving it last week so you managed to read my mind! 😁 |
Sorry, something went wrong.
|
Hahahaha, perfection! I'll try to get it up to date over this week, and will ping you again for the review 💯 |
Sorry, something went wrong.
Sorry, something went wrong.
|
Sounds good, happy to re-review when you update :) Sorry for the slow follow-ups around PEP657 stuff, I've been a little busy and inactive recently :( |
Sorry, something went wrong.
|
I've pushed the initial revision where we handle everything using the unicodedata.east_asian_width (double width on W and F labels, single on rest) as per the discussion here. Before merging this we also have to decide:
I guess also looking at what other compilers are doing by default might also help us gain some insight (I recall @pablogsal mentioning rustc; maybe it might worth a shot to check out what they do to decide when to show carets). |
Sorry, something went wrong.
|
CC: @cfbolz (would also love to hear your feedback on the unicode related parts) |
Sorry, something went wrong.
|
I'll take a look at the code! "Amusingly" the width doesn't line up in my browser's font: (Looks fantastic in my editor and my terminal though) Personal opinions on some of your questions:
|
Sorry, something went wrong.
|
The code looks reasonable to me. I've been thinking about it a bit more, and it would be certainly more annoying to implement, but I am wondering whether it wouldn't be an option to use unicode chars 0x3000 (IDEOGRAPHIC SPACE) and 0xFF3E (FULLWIDTH CIRCUMFLEX ACCENT) to do the spaces/underlines under wide chars. Because even if in a font the width of two ascii spaces is not the same as a fullwidth char, the font should at least be consistent with itself and have the fullwidth space be the same width. Example: Here are the chars: 说明说明📗a
a fullwidth space
^^^^^a fullwidth circumflex
a ascii whitespace
^^^^^^^^^^a ascii circumflex
Screenshot in my Firefox: (in my terminal all the 'a' line up, so it doesn't matter there). |
Sorry, something went wrong.
|
(Unfortunately it already breaks down in Chrome on my laptop, where the book emoji is even wider) |
Sorry, something went wrong.
|
@isidentical let's push this forward. Could you rebase the PR? |
Sorry, something went wrong.
|
yay, i'm excited for this to land :-) |
Sorry, something went wrong.
…nGH-28150) (cherry picked from commit 78e6d72) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
GH-111345 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
…nGH-28150) (cherry picked from commit 78e6d72) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
GH-111346 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
…nGH-28150) (cherry picked from commit 78e6d72) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
…nGH-28150) (cherry picked from commit 78e6d72) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
…nGH-28150) (cherry picked from commit 78e6d72) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
|
GH-111373 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Do not merge yet, only for discussion.
This PR adds support for the existing traceback machinery to work with wide unicode characters when dumping to the terminal. It uses unicodedata.east_asian_width to classify individual unicode characters.

https://bugs.python.org/issue43950