@@ -52,11 +52,7 @@ Table of contents:
5252* [ v66+ Changes to Mac apps that integrate into existing message loop (Qt, wxPython)] ( #v66-changes-to-mac-apps-that-integrate-into-existing-message-loop-qt-wxpython )
5353* [ v66.1+ Navigation urls passed to CreateBrowserSync or LoadUrl methods need to be encoded by app code] ( #v661-navigation-urls-passed-to-createbrowsersync-or-loadurl-methods-need-to-be-encoded-by-app-code )
5454* [ v67+ Do not call the 'WindowUtils.OnSize' function] ( #v67-do-not-call-the-windowutilsonsize-function )
55- * [ v147+ Python and platform requirements] ( #v147-python-and-platform-requirements )
56- * [ v147+ Build and packaging workflow rewritten] ( #v147-build-and-packaging-workflow-rewritten )
57- * [ v147+ Building CEF from sources is untested] ( #v147-building-cef-from-sources-is-untested )
58- * [ v147+ C++ to Python callbacks are now declared "noexcept"; add sys.unraisablehook] ( #v147-c-to-python-callbacks-are-now-declared-noexcept-add-sysunraisablehook )
59- * [ v147+ Cython 3 (language_level "3str") does not change any public string types] ( #v147-cython-3-language_level-3str-does-not-change-any-public-string-types )
55+ * [ v147+ Register sys.unraisablehook] ( #v147-register-sysunraisablehook )
6056* [ v147+ Removed and changed APIs] ( #v147-removed-and-changed-apis )
6157
6258
@@ -185,7 +181,7 @@ its implementation in `src/dpi_aware_win.pyx`.
185181## v49 (Win) Do not call the 'WindowUtils.OnSize' function
186182
187183This function can sometimes cause app hanging during window resize.
188- Call instead the new ` WindowUtils ` . [ UpdateBrowserSize] ( ../api/WindowUtils.md#updatebrowsersize )
184+ Call instead the new ` WindowUtils. UpdateBrowserSize `
189185function. Except when you use the ` pywin32.py ` example, in such case
190186` WindowUtils.OnSize ` must be called.
191187See [ Issue #464 ] ( ../../../issues/464 ) for more details.
@@ -383,7 +379,7 @@ CEF v55 was the last version to support MacOS 10.7.
383379## v57.1+ High DPI support on Windows
384380
385381The ` cef.DpiAware.SetProcessDpiAware ` function is now deprecated.
386- Use cef.DpiAware.[ EnableHighDpiSupport] ( ../api/DpiAware.md#enablehighdpisupport )
382+ Use ` cef.DpiAware.EnableHighDpiSupport `
387383function instead.
388384
389385The ApplicationSettings.[ auto_zooming] ( ../api/ApplicationSettings.md#auto_zooming )
@@ -465,7 +461,7 @@ cef.Request.[GetFlags](../api/Request.md#getflags) method.
465461
466462## v66+ RequestHandler.GetCookieManager not getting called in some cases
467463
468- In some cases the RequestHandler.[ GetCookieManager] ( ../api/RequestHandler.md#getcookiemanager )
464+ In some cases the ` RequestHandler.GetCookieManager `
469465callback is not getting called due to a race condition.
470466This bug is to be fixed in Issue [ #429 ] ( ../../../issues/429 ) .
471467
@@ -507,78 +503,17 @@ The `cef.GetNavigateUrl` function was removed from the cefpython3 module.
507503## v67+ Do not call the 'WindowUtils.OnSize' function
508504
509505This function can sometimes cause app hanging during window resize.
510- Call instead the new ` WindowUtils ` . [ UpdateBrowserSize] ( ../api/WindowUtils.md#updatebrowsersize )
506+ Call instead the new ` WindowUtils. UpdateBrowserSize `
511507function. Except when you use the ` pywin32.py ` example, in such case
512508` WindowUtils.OnSize ` must be called.
513509See [ Issue #464 ] ( ../../../issues/464 ) for more details.
514510
515511
516- ## v147+ Python and platform requirements
512+ ## v147+ Register sys.unraisablehook
517513
518- CEF Python v147 supports CPython 3.10 through 3.14. Python 2 and Python 3.9 or
519- older are no longer supported. All supported builds are 64-bit:
520-
521- | Platform | Supported target |
522- | --- | --- |
523- | Windows | Windows 10 or later, x64 |
524- | Linux | x64 (CI builds and tests on Ubuntu 24.04) |
525- | macOS | macOS 12 or later, Apple Silicon/arm64 |
526-
527- Windows and Linux 32-bit builds and macOS Intel/x86_64 builds are no longer
528- produced or tested. The Windows compile target was raised from Windows 7 to
529- Windows 10 (` WINVER ` , ` _WIN32_WINNT ` , and ` NTDDI_VERSION ` ) because the
530- underlying CEF/Chromium 147 binaries already require Windows 10 or later.
531-
532-
533- ## v147+ Build and packaging workflow rewritten
534-
535- Jumping from v66/v67 to v147 also means a full rewrite of the build and
536- packaging workflow. The legacy Makefile/setup.py and
537- ` tools/make_installer.py ` flow was replaced by:
538-
539- 1 . ` tools/download_cef.py ` to download and verify the CEF distribution.
540- 2 . ` tools/automate.py --prebuilt-cef ` to prepare the downloaded SDK.
541- 3 . ` tools/build.py ` to drive an incremental CMake build.
542- 4 . ` tools/build_distrib.py ` to package the staged files as a wheel.
543-
544- The helper scripts ` automate.py ` and ` build.py ` are still part of the current
545- workflow; they were rewritten rather than superseded. Although
546- ` pyproject.toml ` declares scikit-build-core as its build backend, the supported
547- workflow used by CI currently invokes CMake and ` build_distrib.py ` directly.
548- See the rewritten [ Build instructions] ( Build-instructions.md ) .
549-
550- This is a build-time-only change and does not by itself affect the runtime
551- Python API.
552-
553-
554- ## v147+ Building CEF from sources is untested
555-
556- ` tools/automate.py --build-cef ` , which builds CEF/Chromium itself from
557- sources, is not tested or supported as of v147 - it was last verified
558- working with much older CEF versions (v56 on Linux, v50 on Windows). The
559- supported path is downloading with ` tools/download_cef.py ` and then preparing
560- the binaries with ` tools/automate.py --prebuilt-cef ` (see
561- [ Build instructions] ( Build-instructions.md ) ).
562-
563-
564- ## v147+ C++ to Python callbacks are now declared "noexcept"; add sys.unraisablehook
565-
566- CEF Python's C++ to Python callback bridges (compiled with Cython) are now
567- declared ` noexcept ` instead of ` except * ` . This includes client handlers as
568- well as task, visitor, and web-request callbacks. These callbacks already
569- catch their own exceptions and forward them to ` sys.excepthook ` , so normal
570- application code is unaffected. The difference only shows up when an
571- exception escapes that guard (for example, a callback missing a try/except or
572- whose except block itself raises): previously that left CPython's error
573- indicator set with nothing to consume it, so the error could resurface later
574- as an unrelated, confusing failure; now Python reports it once, immediately,
575- through
576- [ sys.unraisablehook] ( https://docs.python.org/3/library/sys.html#sys.unraisablehook )
577- - which by default only prints to stderr and is easy to miss.
578-
579- To give these exceptions the same treatment as any other CEF Python error
580- (written to "error.log", printed, clean CEF shutdown), set the new hook
581- alongside ` sys.excepthook ` during application startup:
514+ Register ` cef.UnraisableHook ` alongside ` cef.ExceptHook ` during application
515+ startup so that Python exceptions which cannot be raised normally receive the
516+ same logging and shutdown handling as other CEF Python errors:
582517
583518``` python
584519sys.excepthook = cef.ExceptHook
@@ -587,22 +522,7 @@ sys.unraisablehook = cef.UnraisableHook
587522
588523See cef.[ UnraisableHook] ( ../api/cefpython.md#unraisablehook ) and
589524[ Tutorial > Handling Python exceptions] ( Tutorial.md#handling-python-exceptions )
590- for details. Note that ` sys.unraisablehook ` is Python's own global hook and
591- also fires for unrelated unraisable exceptions in your application (for
592- example errors in ` __del__ ` or garbage collection), not just for CEF Python
593- callbacks.
594-
595-
596- ## v147+ Cython 3 (language_level "3str") does not change any public string types
597-
598- The CMake build explicitly invokes Cython with ` --3str ` , equivalent to
599- ` language_level="3str" ` , instead of Cython 2.x's implicit
600- ` language_level=2 ` . This is a Cython * compile-time* setting that affects how
601- string/bytes ** literals inside ` .pyx ` source** are typed by the compiler - it
602- does not change the type of any value returned by, or passed into, the public
603- ` cefpython3 ` Python API. Strings crossing the Python/CEF boundary still go
604- through the same ` PyToCefString ` /` CefToPyString ` conversions as before and are
605- still plain Python ` str ` on the Python side.
525+ for details.
606526
607527
608528## v147+ Removed and changed APIs
@@ -614,9 +534,7 @@ most important application-facing changes are:
614534| --- | --- |
615535| ` Browser.GetFrame(name) ` | Renamed to ` Browser.GetFrameByName(name) ` . |
616536| ` Browser.GetFrameByIdentifier(int) ` | Frame identifiers are now strings. |
617- | ` Browser.GetFrameCount() ` / ` GetFrameIdentifiers() ` | Use ` GetFrameNames() ` or ` GetFrames() ` . |
618537| ` Browser.Find(search_id, search_text, ...) ` | The ` search_id ` argument was removed. |
619- | ` Browser.IsLoading() ` | Track ` is_loading ` in ` LoadHandler.OnLoadingStateChange ` . |
620538| ` Browser.SendFocusEvent(focus) ` | Kept as a compatibility alias; new code should use ` SetFocus(focus) ` . |
621539| ` Browser.SetMouseCursorChangeDisabled() ` / ` IsMouseCursorChangeDisabled() ` | Removed with no direct replacement. |
622540| ` Frame.LoadString(value, url) ` | Use ` Frame.LoadUrl() ` with a ` data: ` URL. |
0 commit comments