Skip to content

bpo-42318: Fix support of non-BMP characters in Tkinter on macOS #23281

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

Merged
merged 2 commits into from
Nov 15, 2020

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Nov 14, 2020

@serhiy-storchaka serhiy-storchaka changed the title Fix support of non-BMP characters in Tkinter on macOS bpo-42318: Fix support of non-BMP characters in Tkinter on macOS Nov 14, 2020
Copy link
Contributor

@ronaldoussoren ronaldoussoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me.

I've tested the PR with the copy of Tk 8.6.10 that I reported the issue for, and with this patch the problem is gone. I also get correct syntax colouring in edit windows.

return NULL;
}
Py_UCS4 ch;
for (j = i; i < len; i++, u[j++] = ch) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to reread this loop a couple of times before I understood how the contents of "u" is updated. My C is getting a bit rusty ;-)

The code looks fine though.

@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the tkinter-macos-nonbmp branch November 15, 2020 16:17
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker a26215db11cfcf7b5f55cab9e91396761a0e0bcf 3.9

@miss-islington
Copy link
Contributor

Sorry @serhiy-storchaka, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker a26215db11cfcf7b5f55cab9e91396761a0e0bcf 3.8

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Dec 15, 2020
pythonGH-23281).

(cherry picked from commit a26215d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-23784 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Dec 15, 2020
serhiy-storchaka added a commit that referenced this pull request Dec 15, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 15, 2020
pythonGH-23281). (pythonGH-23784)

(cherry picked from commit a26215d)
(cherry picked from commit 28bf6ab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 LTO + PGO 3.9 has failed when building commit 28bf6ab.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/436/builds/422) and take a look at the build logs.
  4. Check if the failure is related to this commit (28bf6ab) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/436/builds/422

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

409 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 40 sec
  • test_multiprocessing_spawn: 1 min 10 sec
  • test_multiprocessing_forkserver: 1 min
  • test_multiprocessing_fork: 56.5 sec
  • test_asyncio: 48.3 sec
  • test_signal: 47.1 sec
  • test_io: 34.7 sec
  • test_imaplib: 33.5 sec
  • test_pydoc: 31.1 sec
  • test_subprocess: 29.6 sec

1 test altered the execution environment:
test_asyncio

15 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib test_nis
test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

Total duration: 4 min 47 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/sslproto.py", line 321, in __del__
    self.close()
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/sslproto.py", line 316, in close
    self._ssl_protocol._start_shutdown()
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/sslproto.py", line 590, in _start_shutdown
    self._abort()
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/sslproto.py", line 731, in _abort
    self._transport.abort()
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/selector_events.py", line 680, in abort
    self._force_close(None)
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/base_events.py", line 746, in call_soon
    self._check_closed()
  File "/home/dje/cpython-buildarea/3.9.edelsohn-rhel8-z.lto-pgo/build/Lib/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

serhiy-storchaka pushed a commit that referenced this pull request Dec 25, 2020
@serhiy-storchaka serhiy-storchaka removed their assignment Dec 31, 2020
bcail pushed a commit to bcail/cpython that referenced this pull request May 7, 2024
bcail pushed a commit to bcail/cpython that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants