mirror of https://github.com/scrapy/scrapy.git
Added "from __future__ import print_function" in all relevant places except xlib
This commit is contained in:
parent
d381a35732
commit
ae4a61a2d5
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
from time import time
|
||||
from collections import deque
|
||||
from twisted.web.server import Site, NOT_DONE_YET
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ command).
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, optparse, urllib, json
|
||||
from urlparse import urljoin
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Scrapy - a screen scraping framework written in Python
|
||||
"""
|
||||
from __future__ import print_function
|
||||
import pkgutil
|
||||
__version__ = pkgutil.get_data(__package__, 'VERSION').strip()
|
||||
version_info = tuple(__version__.split('.')[:3])
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import sys
|
||||
import optparse
|
||||
import cProfile
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from collections import defaultdict
|
||||
from functools import wraps
|
||||
from unittest import TextTestRunner
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import sys
|
||||
import os
|
||||
import glob
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from w3lib.url import is_url
|
||||
|
||||
from scrapy.command import ScrapyCommand
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import os
|
||||
import shutil
|
||||
import string
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from scrapy.command import ScrapyCommand
|
||||
|
||||
class Command(ScrapyCommand):
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from w3lib.url import is_url
|
||||
from scrapy.command import ScrapyCommand
|
||||
from scrapy.http import Request
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from scrapy.command import ScrapyCommand
|
||||
|
||||
class Command(ScrapyCommand):
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import sys
|
||||
import string
|
||||
import re
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import sys
|
||||
import platform
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import os
|
||||
import cPickle as pickle
|
||||
from time import time
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from collections import defaultdict
|
||||
from twisted.internet.defer import Deferred, DeferredList
|
||||
from twisted.python.failure import Failure
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import os
|
||||
from scrapy.utils.request import request_fingerprint
|
||||
from scrapy.utils.job import job_dir
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Scrapy Shell
|
|||
|
||||
See documentation in docs/topics/shell.rst
|
||||
"""
|
||||
from __future__ import print_function
|
||||
import signal
|
||||
|
||||
from twisted.internet import reactor, threads, defer
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import sys, time, random, urllib, os
|
||||
from subprocess import Popen, PIPE
|
||||
from twisted.web.server import Site, NOT_DONE_YET
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import time
|
||||
import tempfile
|
||||
import shutil
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ module with the ``runserver`` argument::
|
|||
python test_engine.py runserver
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, os, re, urlparse
|
||||
|
||||
from twisted.internet import reactor, defer
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from twisted.trial import unittest
|
||||
from twisted.python.failure import Failure
|
||||
from twisted.internet import reactor
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import unittest
|
||||
from scrapy.http import Request
|
||||
from scrapy.utils.request import request_fingerprint, _fingerprint_cache, \
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
pprint and pformat wrappers with colorization support
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
from pprint import pformat as pformat_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
"""Some debugging functions for working with the Scrapy engine"""
|
||||
|
||||
from __future__ import print_function
|
||||
from time import time # used in global tests code
|
||||
|
||||
def get_engine_status(engine):
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ This module provides some useful functions for working with
|
|||
scrapy.http.Request objects
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import hashlib
|
||||
import weakref
|
||||
from urlparse import urlunparse
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import urlparse
|
||||
|
||||
from twisted.internet import reactor
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ and no performance penalty at all when disabled (as object_ref becomes just an
|
|||
alias to object in that case).
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import weakref, os
|
||||
from collections import defaultdict
|
||||
from time import time
|
||||
|
|
|
|||
Loading…
Reference in New Issue