Skip to content

Commit

Permalink
Merge pull request #240 from willkg/python-changes
Browse files Browse the repository at this point in the history
Remove support for Python 2.6 and 3.2
  • Loading branch information
willkg authored Dec 8, 2016
2 parents 5cd9bcf + 38c2ce9 commit 70b1d2d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 28 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ cache:
directories:
- "~/.cache/pip"
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
Expand All @@ -15,10 +13,6 @@ env:
- HTML5LIB=0.999 # 3
- HTML5LIB=0.999999 # 6
- HTML5LIB=0.9999999 # 7
matrix:
allow_failures:
- python: "2.6"
- python: "3.2"
install:
- pip install -r requirements.txt
- pip install html5lib==$HTML5LIB
Expand Down
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Bleach Changes
==============

Version 2.0 (in development)
----------------------------

**Backwards incompatible changes**

- Removed support for Python 2.6. #206
- Removed support for Python 3.2. #224


Version 1.5 (November 4th, 2016)
--------------------------------

Expand Down
8 changes: 1 addition & 7 deletions bleach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

from __future__ import unicode_literals
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
import re

import html5lib
Expand All @@ -22,7 +16,7 @@ def emit(self, record):
__all__ = ['clean', 'linkify']

log = logging.getLogger(__name__)
log.addHandler(NullHandler())
log.addHandler(logging.NullHandler())

ALLOWED_TAGS = [
'a',
Expand Down
2 changes: 1 addition & 1 deletion bleach/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from __future__ import unicode_literals

VERSION = (1, 5, 0)
VERSION = (2, 0, 0)
__version__ = '.'.join([str(n) for n in VERSION])
11 changes: 0 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
'html5lib>=0.999,!=0.9999,!=0.99999,<0.99999999',
]

try:
from collections import OrderedDict # noqa
except ImportError:
# We don't use ordereddict, but html5lib does when you request
# alpha-sorted attributes and on Python 2.6 and it doesn't specify it
# as a dependency (see
# https://github.com/html5lib/html5lib-python/pull/177)
install_requires.append('ordereddict')


def get_long_desc():
desc = open('README.rst').read()
Expand Down Expand Up @@ -72,10 +63,8 @@ def get_version():
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
# and then run "tox" from this directory.

[tox]
envlist = py{26,27,32,33,34,35}-html5lib{999,999999,9999999},pypy-html5lib9999999
envlist = py{27,33,34,35}-html5lib{999,999999,9999999},pypy-html5lib9999999

[testenv]
basepython =
py26: python2.6
py27: python2.7
py32: python3.2
py33: python3.3
py34: python3.4
py35: python3.5
Expand Down

0 comments on commit 70b1d2d

Please sign in to comment.