Skip to content

Commit 59a9aa1

Browse files
committed
Update to Chrome 55.0.2883.21 and CEF 3.2883.1506.ga6c42a7 (cztomczak#263), and
others. This is CEF Python 55.1 beta release with Chrome 55 from beta channel. Add support for Python 3.6 (cztomczak#121). Update to Cython 0.25.1 (cztomczak#110). Build cefpython .so modules using clean Python installations as in pyenv to avoid invalid symbols being embedded in the .so module (cztomczak#266). Update CEF include/. Update patches/. Update compile.py. Run unit tests first and don't run gtk3 example temporarily until cztomczak#261 is fixed. Check if Cython version installed is the same as specified in tools/requirements.txt. Update examples - print filename when logging messages.
1 parent 15a2063 commit 59a9aa1

24 files changed

+301
-78
lines changed

api/RequestHandler.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ For an example of how to implement handler see [cefpython](cefpython.md).CreateB
99

1010
The `RequestHandler` tests can be found in the wxpython.py script.
1111

12-
Not yet ported to CEF Python:
12+
The following callbacks are available in upstream CEF, but were not yet
13+
exposed:
1314
* OnOpenURLFromTab
14-
15+
* OnSelectClientCertificate
1516

1617

1718
Table of contents:

docs/Build-instructions.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Table of contents:
3232

3333
## Build CEF Python on Linux
3434

35-
Complete steps for building CEF Python 54 using prebuilt
35+
Complete steps for building CEF Python 55 using prebuilt
3636
binaries from GitHub releases:
3737

3838
1) Tested and works fine on Ubuntu 14.04 64-bit (cmake 2.8.12 and g++ 4.8.4)
@@ -48,15 +48,15 @@ binaries from GitHub releases:
4848

4949
5) Download 64-bit Linux binaries and libraries from
5050
[GH releases](https://github.com/cztomczak/cefpython/releases)
51-
tagged 'v54-upstream'.
51+
tagged 'v55-upstream'.
5252

5353
6) Extract it in the cefpython/build/ directory and rename the extracted
5454
directory to "cef_linux64".
5555

5656
8) Build cefpython and run examples:
5757
```
5858
cd cefpython/src/linux/
59-
python compile.py 54.0
59+
python compile.py 55.0
6060
```
6161

6262
## Requirements
@@ -167,7 +167,7 @@ mkdir build/ && cd build
167167
python ../tools/automate.py --build-cef --ninja-jobs 6
168168
mv cef*_*_linux64/ cef_linux64/
169169
cd ../../../src/linux/
170-
python compile.py 54.0
170+
python compile.py 55.0
171171
```
172172

173173
__MISSING PACKAGES (Linux)__: After the chromium sources are downloaded,
@@ -248,13 +248,7 @@ git diff --no-prefix --relative > issue251.patch
248248
Apply a patch in current directory:
249249
```
250250
cd chromium/src/cef/
251-
git apply issue251.patch
252-
```
253-
254-
In case of a "No such file or directory" error and when paths seem
255-
to be correct, try the -p0 or -p1 flag:
256-
```
257-
git apply -p0 issue251.patch
251+
git apply -v -p0 issue251.patch
258252
```
259253

260254
To create a patch from last two commits (no --relative flag available

examples/gtk2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ def main():
3535

3636

3737
def check_versions():
38-
print("CEF Python {ver}".format(ver=cef.__version__))
39-
print("Python {ver}".format(ver=sys.version[:6]))
40-
print("GTK {ver}".format(ver='.'.join(map(str, list(gtk.gtk_version)))))
38+
print("[gkt2.py] CEF Python {ver}".format(ver=cef.__version__))
39+
print("[gkt2.py] Python {ver}".format(ver=sys.version[:6]))
40+
print("[gkt2.py] GTK {ver}".format(ver='.'.join(map(str, list(gtk.gtk_version)))))
4141
assert cef.__version__ >= "54.0", "CEF Python v54+ required to run this"
4242
pygtk.require('2.0')
4343

4444

4545
def configure_message_loop():
4646
global g_message_loop
4747
if "--message-loop-timer" in sys.argv:
48-
print("Message loop mode: TIMER")
48+
print("[gkt2.py] Message loop mode: TIMER")
4949
g_message_loop = MESSAGE_LOOP_TIMER
5050
sys.argv.remove("--message-loop-timer")
5151
else:
52-
print("Message loop mode: BEST")
52+
print("[gkt2.py] Message loop mode: BEST")
5353
g_message_loop = MESSAGE_LOOP_BEST
5454
if len(sys.argv) > 1:
55-
print("ERROR: unknown argument passed")
55+
print("[gkt2.py] ERROR: unknown argument passed")
5656
sys.exit(1)
5757

5858

examples/gtk3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010

1111
def main():
12-
print("CEF Python {ver}".format(ver=cef.__version__))
13-
print("Python {ver}".format(ver=sys.version[:6]))
14-
print("GTK {major}.{minor}".format(
12+
print("[gkt3.py] CEF Python {ver}".format(ver=cef.__version__))
13+
print("[gkt3.py] Python {ver}".format(ver=sys.version[:6]))
14+
print("[gkt3.py] GTK {major}.{minor}".format(
1515
major=Gtk.get_major_version(),
1616
minor=Gtk.get_minor_version()))
1717
assert cef.__version__ >= "53.1", "CEF Python v53.1+ required to run this"

examples/hello_world.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77

88
def main():
9-
print("CEF Python {ver}".format(ver=cef.__version__))
10-
print("Python {ver}".format(ver=sys.version[:6]))
9+
print("[hello_world.py] CEF Python {ver}".format(ver=cef.__version__))
10+
print("[hello_world.py] Python {ver}".format(ver=sys.version[:6]))
1111
assert cef.__version__ >= "53.1", "CEF Python v53.1+ required to run this"
1212
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
1313
cef.Initialize()

examples/tkinter_.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
import Tkinter as tk
1313
import sys
1414
import os
15-
import logging
15+
import logging as _logging
1616

1717
# Globals
18-
logger = logging.getLogger()
18+
logger = _logging.getLogger("tkinter_.py")
1919

2020

2121
def main():
22-
logger.setLevel(logging.INFO)
23-
logger.addHandler(logging.StreamHandler())
22+
logger.setLevel(_logging.INFO)
23+
stream_handler = _logging.StreamHandler()
24+
formatter = _logging.Formatter("[%(filename)s] %(message)s")
25+
stream_handler.setFormatter(formatter)
26+
logger.addHandler(stream_handler)
2427
logger.info("CEF Python {ver}".format(ver=cef.__version__))
2528
logger.info("Python {ver}".format(ver=sys.version[:6]))
2629
logger.info("Tk {ver}".format(ver=tk.TkVersion))

patches/issue125.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git http_cache_transaction.cc http_cache_transaction.cc
2-
index 489e4960..2c4d719 100644
2+
index 370862d..e63aecf 100644
33
--- http_cache_transaction.cc
44
+++ http_cache_transaction.cc
5-
@@ -2535,7 +2535,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
5+
@@ -2548,7 +2548,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
66
// blocking page is shown. An alternative would be to reverse-map the cert
77
// status to a net error and replay the net error.
88
if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||
@@ -11,4 +11,4 @@ index 489e4960..2c4d719 100644
1111
+ IsCertStatusError(response_.ssl_info.cert_status))) {
1212
DoneWritingToEntry(false);
1313
if (net_log_.IsCapturing())
14-
net_log_.EndEvent(NetLog::TYPE_HTTP_CACHE_WRITE_INFO);
14+
net_log_.EndEvent(NetLogEventType::HTTP_CACHE_WRITE_INFO);

patches/issue231.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ index 6a75930..ad620d7 100644
8383
+ return PathService::Override(pref_key, file_path);
8484
+}
8585
diff --git libcef_dll/libcef_dll.cc libcef_dll/libcef_dll.cc
86-
index 208333c..fcadb7e 100644
86+
index 496c9b0..f2dc4d8 100644
8787
--- libcef_dll/libcef_dll.cc
8888
+++ libcef_dll/libcef_dll.cc
89-
@@ -747,6 +747,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
89+
@@ -752,6 +752,23 @@ CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
9090
return _retval;
9191
}
9292

@@ -111,10 +111,10 @@ index 208333c..fcadb7e 100644
111111
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
112112

113113
diff --git libcef_dll/wrapper/libcef_dll_wrapper.cc libcef_dll/wrapper/libcef_dll_wrapper.cc
114-
index 248a285..3f0c226 100644
114+
index 3a5d30f..7431698 100644
115115
--- libcef_dll/wrapper/libcef_dll_wrapper.cc
116116
+++ libcef_dll/wrapper/libcef_dll_wrapper.cc
117-
@@ -691,6 +691,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
117+
@@ -696,6 +696,23 @@ CEF_GLOBAL bool CefGetPath(PathKey key, CefString& path) {
118118
return _retval?true:false;
119119
}
120120

patches/issue251.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ index 8f8094b..8b4602b 100644
7171

7272
#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_
7373
diff --git libcef/browser/osr/web_contents_view_osr.cc libcef/browser/osr/web_contents_view_osr.cc
74-
index 52f1a87..e967865 100644
74+
index c39a29c..8b3c30a 100644
7575
--- libcef/browser/osr/web_contents_view_osr.cc
7676
+++ libcef/browser/osr/web_contents_view_osr.cc
7777
@@ -6,6 +6,7 @@
@@ -82,7 +82,7 @@ index 52f1a87..e967865 100644
8282
#include "libcef/browser/osr/render_widget_host_view_osr.h"
8383
#include "libcef/common/drag_data_impl.h"
8484

85-
@@ -227,7 +228,9 @@ void CefWebContentsViewOSR::StartDragging(
85+
@@ -230,7 +231,9 @@ void CefWebContentsViewOSR::StartDragging(
8686
if (browser.get())
8787
handler = browser->GetClient()->GetRenderHandler();
8888
if (handler.get()) {

src/include/cef_navigation_entry.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
#pragma once
4040

4141
#include "include/cef_base.h"
42-
43-
class CefSSLStatus;
42+
#include "include/cef_ssl_status.h"
4443

4544
///
4645
// Class used to represent an entry in navigation history.

0 commit comments

Comments
 (0)