[Python-modules-commits] r12967 - in packages/python-scrapy/trunk/debian (2 files)
ghantoos-guest at users.alioth.debian.org
ghantoos-guest at users.alioth.debian.org
Sun May 16 13:15:44 UTC 2010
Date: Sunday, May 16, 2010 @ 13:15:34
Author: ghantoos-guest
Revision: 12967
- Corrected regular expression to catch "Scrapy" and "scrapy".
* debian/patches:
- 01_external_modules.diff: refreshed patch.
- 02_view_response.diff: fixes bug in open_in_browser() function with
Python 2.5. (Closes: #573369).
* debian/control:
- Bumped Standards-Version to 3.8.4.
* debian/python-scrapy.lintian-overrides:
- Added overrides for duplicated-compressed-file as the two suspected
files are intentionally present and used by the scrapy test suite.
Added:
packages/python-scrapy/trunk/debian/patches/02_view_response.diff
packages/python-scrapy/trunk/debian/python-scrapy.lintian-overrides
Added: packages/python-scrapy/trunk/debian/patches/02_view_response.diff
===================================================================
--- packages/python-scrapy/trunk/debian/patches/02_view_response.diff (rev 0)
+++ packages/python-scrapy/trunk/debian/patches/02_view_response.diff 2010-05-16 13:15:34 UTC (rev 12967)
@@ -0,0 +1,34 @@
+Description:
+ - Fixes bug in open_in_browser() function with Python 2.5 (Closes: #573369).
+Author: Pablo Hoffman <pablo at pablohoffman.com>
+Applied-Upstream: http://dev.scrapy.org/changeset/1944
+Last-Update: 2010-05-13
+
+--- a/scrapy/utils/response.py
++++ b/scrapy/utils/response.py
+@@ -3,12 +3,11 @@
+ scrapy.http.Response objects
+ """
+
+-from __future__ import with_statement
+-
++import os
+ import re
+ import weakref
+ import webbrowser
+-from tempfile import NamedTemporaryFile
++import tempfile
+
+ from twisted.web import http
+ from twisted.web.http import RESPONSES
+@@ -104,6 +103,7 @@
+ body = response.body
+ if '<base' not in body:
+ body = body.replace('<head>', '<head><base href="%s">' % response.url)
+- with NamedTemporaryFile(suffix='.html', delete=False) as f:
+- f.write(body)
+- webbrowser.open("file://%s" % f.name)
++ fd, fname = tempfile.mkstemp('.html')
++ os.write(fd, body)
++ os.close(fd)
++ webbrowser.open("file://%s" % fname)
Added: packages/python-scrapy/trunk/debian/python-scrapy.lintian-overrides
===================================================================
--- packages/python-scrapy/trunk/debian/python-scrapy.lintian-overrides (rev 0)
+++ packages/python-scrapy/trunk/debian/python-scrapy.lintian-overrides 2010-05-16 13:15:34 UTC (rev 12967)
@@ -0,0 +1,2 @@
+python-scrapy: duplicated-compressed-file usr/share/pyshared/scrapy/tests/sample_data/compressed/feed-sample1.xml.bz2
+python-scrapy: duplicated-compressed-file usr/share/pyshared/scrapy/tests/sample_data/compressed/feed-sample1.xml.gz
More information about the Python-modules-commits
mailing list