Skip to content

Commit

Permalink
Drop Python 2.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Oct 29, 2013
1 parent bd79b6e commit 2df8156
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 204 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ matrix:
exclude:
- env: TRAVISBUG="#1027"
include:
- python: "2.6"
env: BUILDENV=lucid
- python: "2.7"
env: BUILDENV=precise
- python: "2.7"
Expand Down
9 changes: 0 additions & 9 deletions .travis/requirements-lucid.txt

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ http://scrapy.org
Requirements
============

* Python 2.6 or up
* Python 2.7
* Works on Linux, Windows, Mac OSX, BSD

Install
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: scrapy-SUFFIX
Section: python
Priority: optional
Maintainer: Scrapinghub Team <[email protected]>
Build-Depends: debhelper (>= 7.0.50), python (>=2.6), python-twisted, python-w3lib, python-lxml
Build-Depends: debhelper (>= 7.0.50), python (>=2.7), python-twisted, python-w3lib, python-lxml
Standards-Version: 3.8.4
Homepage: http://scrapy.org/

Expand Down
9 changes: 5 additions & 4 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ comparing `jinja2`_ to `Django`_.
What Python versions does Scrapy support?
-----------------------------------------

Scrapy runs in Python 2.6 and 2.7.
Scrapy is supported under Python 2.7 only.
Python 2.6 support was dropped starting at Scrapy 0.20.

Does Scrapy work with Python 3.0?
Does Scrapy work with Python 3?
---------------------------------

No, and there are no plans to port Scrapy to Python 3.0 yet. At the moment,
Scrapy works with Python 2.6 and 2.7.
No, but there are plans to support Python 3.3+.
At the moment, Scrapy works with Python 2.7.

.. seealso:: :ref:`faq-python-versions`.

Expand Down
2 changes: 1 addition & 1 deletion docs/intro/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pre-requisites

The installation steps assume that you have the following things installed:

* `Python`_ 2.6 or 2.7
* `Python`_ 2.7
* `lxml`_. Most Linux distributions ships prepackaged versions of lxml. Otherwise refer to http://lxml.de/installation.html
* `OpenSSL`_. This comes preinstalled in all operating systems except Windows (see :ref:`intro-install-platform-notes`)
* `pip`_ or `easy_install`_ Python package managers
Expand Down
1 change: 1 addition & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Release notes
- Dropped libxml2 selectors backend
- Dropped support for multiple selectors backends, sticking to lxml only
- Selector Unified API with support for CSS expressions (:issue:`395` and :issue:`426`)
- Dropped Python 2.6 support

0.18.4 (released 2013-10-10)
----------------------------
Expand Down
27 changes: 3 additions & 24 deletions docs/topics/ubuntu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ those in Ubuntu, and more stable too since they're continuously built from
fixes.

To use the packages, just add the following line to your
``/etc/apt/sources.list``, and then run ``aptitude update`` and ``aptitude
install scrapy-0.13``::
``/etc/apt/sources.list``, and then run ``aptitude update`` and
``apt-get install scrapy-0.18``::

deb http://archive.scrapy.org/ubuntu DISTRO main

Expand All @@ -22,8 +22,7 @@ with command::

lsb_release -cs

Supported Ubuntu releases are: ``karmic``, ``lucid``, ``maverick``, ``natty``,
``oneiric``, ``precise``, ``quantal``, ``raring``.
Supported Ubuntu releases are: ``precise``, ``quantal``, ``raring``.

For Ubuntu Raring (13.04)::

Expand All @@ -37,26 +36,6 @@ For Ubuntu Precise (12.04)::

deb http://archive.scrapy.org/ubuntu precise main

For Ubuntu Oneiric (11.10)::

deb http://archive.scrapy.org/ubuntu oneiric main

For Ubuntu Natty (11.04)::

deb http://archive.scrapy.org/ubuntu natty main

For Ubuntu Maverick (10.10)::

deb http://archive.scrapy.org/ubuntu maverick main

For Ubuntu Lucid (10.04)::

deb http://archive.scrapy.org/ubuntu lucid main

For Ubuntu Karmic (9.10)::

deb http://archive.scrapy.org/ubuntu karmic main

.. warning:: Please note that these packages are updated frequently, and so if
you find you can't download the packages, try updating your apt package
lists first, e.g., with ``apt-get update`` or ``aptitude update``.
Expand Down
4 changes: 2 additions & 2 deletions scrapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import sys, os, warnings

if sys.version_info < (2, 6):
print("Scrapy %s requires Python 2.6 or above" % __version__)
if sys.version_info < (2, 7):
print("Scrapy %s requires Python 2.7" % __version__)
sys.exit(1)

# ignore noisy twisted deprecation warnings
Expand Down
2 changes: 0 additions & 2 deletions scrapy/tests/test_downloadermiddleware_httpproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def test_proxy_already_seted(self):


def test_no_proxy(self):
if sys.version_info < (2, 6):
raise SkipTest('no_proxy is not supported in python < 2.6')
os.environ['http_proxy'] = http_proxy = 'https://proxy.for.http:3128'
mw = HttpProxyMiddleware()

Expand Down
5 changes: 2 additions & 3 deletions scrapy/utils/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"""

import copy

from scrapy.utils.py27 import OrderedDict
from collections import OrderedDict


class MultiValueDictKeyError(KeyError):
Expand Down Expand Up @@ -57,7 +56,7 @@ def __copy__(self):
return self.__class__(dict.items(self))

def __deepcopy__(self, memo=None):
if memo is None:
if memo is None:
memo = {}
result = self.__class__()
memo[id(self)] = result
Expand Down
10 changes: 0 additions & 10 deletions scrapy/utils/py26.py

This file was deleted.

11 changes: 0 additions & 11 deletions scrapy/utils/py27.py

This file was deleted.

127 changes: 0 additions & 127 deletions scrapy/xlib/ordereddict.py

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def is_not_module(filename):
'scripts': scripts,
'classifiers': [
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
Expand Down
7 changes: 1 addition & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
# and then run "tox" from this directory.

[tox]
envlist = py26, py27, lucid, precise, trunk
envlist = py27, precise, trunk

[testenv]
deps =
-r{toxinidir}/.travis/requirements-latest.txt
commands =
{toxinidir}/bin/runtests.sh []

[testenv:lucid]
basepython = python2.6
deps =
-r{toxinidir}/.travis/requirements-lucid.txt

[testenv:precise]
basepython = python2.7
deps =
Expand Down

0 comments on commit 2df8156

Please sign in to comment.