Your message dated Wed, 02 Mar 2016 07:34:57 +0000
with message-id <[email protected]>
and subject line Bug#814909: fixed in sphinx 1.3.6-1
has caused the Debian Bug report #814909,
regarding Port jstest to WebKit 2
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
814909: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814909
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sphinx
Version: 1.3.5-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu xenial ubuntu-patch
Hiya,
Here's a diff to port the jstest from webkit1 to 2 - I wanted this for
Ubuntu since sphinx is in main there and we're trying to move over to
wk2.
Apparently (according to upstream) you can get the return value from
executed javascript, so the title hack ought not to be necessary any
more - but I didn't manage to get this working. It's a bit fiddly to
access. If you want to improve the patch to do that, please do. :)
Cheers,
--
Iain Lane [ [email protected] ]
Debian Developer [ [email protected] ]
Ubuntu Developer [ [email protected] ]
diff -Nru sphinx-1.3.5/debian/control sphinx-1.3.5/debian/control
--- sphinx-1.3.5/debian/control 2016-01-26 11:28:04.000000000 +0000
+++ sphinx-1.3.5/debian/control 2016-02-08 16:09:48.000000000 +0000
@@ -20,7 +20,7 @@
python-sphinx-rtd-theme, python3-sphinx-rtd-theme,
python-alabaster (>= 0.7), python3-alabaster (>= 0.7),
xvfb, xauth, libjs-jquery (>= 1.4), libjs-underscore,
- python3-gi, gir1.2-webkit-3.0,
+ python3-gi, gir1.2-webkit2-4.0,
texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, texinfo,
perl
X-Python-Version: >= 2.6
diff -Nru sphinx-1.3.5/debian/jstest/jstest.py sphinx-1.3.5/debian/jstest/jstest.py
--- sphinx-1.3.5/debian/jstest/jstest.py 2016-01-26 11:27:53.000000000 +0000
+++ sphinx-1.3.5/debian/jstest/jstest.py 2016-02-08 18:10:58.000000000 +0000
@@ -34,11 +34,10 @@
import gi
gi.require_version('Gtk', '3.0')
-gi.require_version('WebKit', '3.0')
-from gi.repository import GLib, Gtk, WebKit
+gi.require_version('WebKit2', '4.0')
+from gi.repository import GLib, Gtk, WebKit2
-default_time_limit = 10.0
-time_step = 0.1
+default_time_limit = 40.0
# HTTP browser
# ============
@@ -49,45 +48,43 @@
class Browser(object):
def __init__(self, options):
- settings = WebKit.WebSettings()
- settings.set_property('enable-file-access-from-file-uris', True)
+ settings = WebKit2.Settings()
+ settings.set_property('allow-file-access-from-file-urls', True)
self._time_limit = 0
- self._view = WebKit.WebView()
- self._view.set_settings(settings)
+ self._view = WebKit2.WebView.new_with_settings(settings)
+ self._view.connect('notify::title', self._on_title_changed)
self._result = None
+ self._id = 0
+
+ def _on_title_changed(self, webview, user_data):
+ contents = webview.get_property('title')
+ webview.run_javascript('document.title = ""')
+ found = "Search finished" in contents
+ if found:
+ self._result = contents
+ Gtk.main_quit()
+ GLib.source_remove(self._id)
+ self._id = 0
+
+ def _quit(self):
+ self._view.run_javascript('document.title = document.documentElement.innerHTML')
+ if self._time_limit < 0:
+ self._result = None
+ Gtk.main_quit()
+ return GLib.SOURCE_REMOVE
+
+ self._time_limit -= 1
+ return GLib.SOURCE_CONTINUE
def wget(self, url, time_limit=default_time_limit):
self._view.load_uri(url)
self._time_limit = time_limit
- GLib.timeout_add(int(1000 * time_step), self._check)
+ self._id = GLib.timeout_add_seconds(time_limit, self._quit)
Gtk.main()
if self._result is None:
raise Timeout
return self._result
- def _extract_html(self):
- # There is not obvious way to extract HTML from WebKit.
- # We use a trick from <http://code.google.com/p/pywebkitgtk/wiki/HowDoI> instead.
- self._view.execute_script('document.title = document.documentElement.innerHTML')
- try:
- return self._view.get_main_frame().get_title() or ''
- finally:
- self._view.execute_script('document.title = ""')
-
- def _check(self):
- contents = self._extract_html()
- match = re_done.search(contents)
- if match is not None:
- self._result = contents
- Gtk.main_quit()
- return
- self._time_limit -= time_step
- if self._time_limit < 0:
- self._result = None
- Gtk.main_quit()
- else:
- GLib.timeout_add(int(1000 * time_step), self._check)
-
# Actual tests
# ============
@@ -127,6 +124,7 @@
def test_directory(directory, options, time_limit=default_time_limit):
url = urllib.parse.urljoin('file:', urllib.request.pathname2url(directory))
url = urllib.parse.urljoin(url, 'html/search.html?q=' + urllib.parse.quote_plus(options.search_term))
+
browser = Browser(options)
html = browser.wget(url, time_limit)
return test_html(html, options)
--- End Message ---
--- Begin Message ---
Source: sphinx
Source-Version: 1.3.6-1
We believe that the bug you reported is fixed in the latest version of
sphinx, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dmitry Shachnev <[email protected]> (supplier of updated sphinx package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 02 Mar 2016 10:24:30 +0300
Source: sphinx
Binary: python-sphinx python3-sphinx sphinx-common sphinx-doc libjs-sphinxdoc
Architecture: source
Version: 1.3.6-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Modules Team
<[email protected]>
Changed-By: Dmitry Shachnev <[email protected]>
Description:
libjs-sphinxdoc - JavaScript support for Sphinx documentation
python-sphinx - documentation generator for Python projects (implemented in
Pytho
python3-sphinx - documentation generator for Python projects (implemented in
Pytho
sphinx-common - documentation generator for Python projects - common data
sphinx-doc - documentation generator for Python projects - documentation
Closes: 814909
Changes:
sphinx (1.3.6-1) unstable; urgency=medium
.
* New upstream bugfix release.
* Port jstest to WebKit2 (closes: #814909).
* Remove the now obsolete debian/TODO file.
* Update debian/source/lintian-overrides for new Lintian versions.
* Use https in Vcs-Git field.
* Bump Standards-Version to 3.9.7, no changes needed.
Checksums-Sha1:
a153fcfefe2ec20343a45e5787919ba82116b070 2990 sphinx_1.3.6-1.dsc
62042abca05a28ae58ff840cac55f3bd56cca912 3682405 sphinx_1.3.6.orig.tar.gz
2cf473751fb05ea003f9d0ab22f571b256e04cb8 31472 sphinx_1.3.6-1.debian.tar.xz
Checksums-Sha256:
ebec9e8309de922cd2f32981c78e7972211b21f69f905c640945d7fd826c96f7 2990
sphinx_1.3.6-1.dsc
0b3be9221220af36090d139192347bb5f42b13401e4c53a4de8f5329a7a3ff8a 3682405
sphinx_1.3.6.orig.tar.gz
d73f36ad0cf81cc05806b1c68f4ff05f141a2fc3099731269c788758709a6ffb 31472
sphinx_1.3.6-1.debian.tar.xz
Files:
c3247d96afbeaa445a3e8f85c60e59c2 2990 python optional sphinx_1.3.6-1.dsc
7df638f47749f9284889c93012ffa07f 3682405 python optional
sphinx_1.3.6.orig.tar.gz
0b8e2033a84b393dcbbab93ec692cc43 31472 python optional
sphinx_1.3.6-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJW1pYlAAoJENb+cQNj+F3TWIYP/1jOR98Sl1qoB6BED8TgbnTP
8F9JI8epslRSwCmpfcA8onEvmVBc0BKyvjD2UqNZUT4/xqRMyV1sfvH8m+6nRpFD
77s0eWm/IAA0ucDq/03fuVCzdbBN9BkLxq4Z+rfxzfjIflCkQsa49NuxJaSGJ9sh
0S7I23edhyB8Mr7N5wUUjfkz6+5ZgY0vf0O2t+aNIJj/PHokf7FgnzjJs+m8XAEM
TBB6P5QL9pJSDYpzUS4KUJ4WKzR4H5GrBED3YU/akMvZ3FQ3vjLnt3jhcHAcP2Mf
rRZcpWA8KubEk2g164lzbIyPoY1JsbPz85QmYVQfUO2HZLY1V8i5FFmzUEZ6HOVY
SK1lFWuvlWUSCGKepR4pclOwV/npSW2VTOIp7A66qVjmIhfMVD8AeucgLNgic2wu
srLA3OfriOL5t7sg9JscG5E2lapy/WQ+CiBH+K6To0S86D3qnWg78hYlv8qnWCt9
xpohXUbW0MkD8M5wZ8maS1Y8riRlAfItk4QLbP/rPH64AW3KsMm/X+wH/EXKeIbg
KUyxN++qIuMZyW3D2+KROVA7C/6luM3FXkLimLw4SL+4YWcRzHahw8NZ7SBl0EPl
O+nmMK7vG+ufiKvWJrEE4poGRf1AZnErjkDZYUSB42FjaLjrJZvOKo15QAO1Kzfl
Ua+gVM7LAuILHL4iIR7f
=8KcU
-----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team