drop Python 2.6
* no timedelta.total_seconds * no functools.total_ordering EOL.
This commit is contained in:
parent
4f152d03ac
commit
80cbf2676f
@ -1,15 +1,10 @@
|
||||
language: python
|
||||
python: 2.7
|
||||
env:
|
||||
- TOX_ENV=py26
|
||||
- TOX_ENV=py27
|
||||
- TOX_ENV=py33
|
||||
- TOX_ENV=py34
|
||||
- TOX_ENV=squeeze
|
||||
- TOX_ENV=wheezy
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: TOX_ENV=squeeze
|
||||
install:
|
||||
- pip install tox
|
||||
- sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
|
||||
|
@ -71,7 +71,7 @@ Install from PyPi
|
||||
|
||||
Requirements:
|
||||
|
||||
- Python 2.6, 2.7 or 3.3+ (+ devel headers)
|
||||
- Python 2.7, 3.3 or 3.4 (+ devel headers)
|
||||
- SQLite 3.3.8 or later
|
||||
- a working C compiler
|
||||
|
||||
|
@ -9,7 +9,6 @@ import datetime
|
||||
from email.utils import parseaddr, formataddr
|
||||
from configparser import ConfigParser
|
||||
|
||||
from isso.utils import total_seconds
|
||||
from isso.compat import text_type as str
|
||||
|
||||
logger = logging.getLogger("isso")
|
||||
@ -91,7 +90,7 @@ class IssoParser(ConfigParser):
|
||||
except ValueError:
|
||||
return super(IssoParser, self).getint(section, key)
|
||||
else:
|
||||
return int(total_seconds(delta))
|
||||
return int(delta.total_seconds())
|
||||
|
||||
def getlist(self, section, key):
|
||||
return list(map(str.strip, self.get(section, key).split(',')))
|
||||
|
@ -19,7 +19,6 @@ try:
|
||||
except ImportError:
|
||||
import Queue as queue
|
||||
|
||||
from isso.utils import total_seconds
|
||||
from isso.compat import iteritems
|
||||
|
||||
logger = logging.getLogger("isso")
|
||||
@ -98,7 +97,7 @@ class Queue(object):
|
||||
self.put(Queue.delay(msg, self.timeout))
|
||||
|
||||
def requeue(self, msg, timedelta):
|
||||
self.put(Message(msg.type, msg.data, total_seconds(timedelta)))
|
||||
self.put(Message(msg.type, msg.data, timedelta.total_seconds()))
|
||||
|
||||
@property
|
||||
def size(self):
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from isso.compat import text_type as str
|
||||
|
||||
|
@ -5,10 +5,7 @@ from __future__ import unicode_literals
|
||||
import os
|
||||
import json
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
try:
|
||||
from urllib.parse import urlencode
|
||||
|
@ -1,11 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import io
|
||||
import unittest
|
||||
|
||||
from isso import config
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from werkzeug.test import Client
|
||||
from werkzeug.wrappers import Response
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from isso import config
|
||||
from isso.db import SQLite3, Adapter
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
import os
|
||||
import json
|
||||
|
@ -1,9 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from isso.utils import html
|
||||
|
||||
|
@ -2,11 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import unittest
|
||||
from os.path import join, dirname
|
||||
|
||||
from isso import config
|
||||
|
@ -2,11 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import unittest
|
||||
import datetime
|
||||
|
||||
from isso.queue import Message, Queue, Full, Empty, Timeout
|
||||
|
@ -1,10 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import unittest
|
||||
|
||||
from isso import utils
|
||||
from isso.utils import parse
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from isso.compat import PY2K, string_types
|
||||
from isso.utils.hash import Hash, PBKDF2, new
|
||||
|
@ -2,10 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import unittest
|
||||
|
||||
from isso.compat import string_types
|
||||
from isso.utils import types
|
||||
|
@ -1,14 +1,11 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
import os
|
||||
import json
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
from isso import Isso, config, dist
|
||||
|
@ -1,10 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import unittest
|
||||
|
||||
from isso import wsgi
|
||||
|
||||
|
@ -17,11 +17,6 @@ except ImportError:
|
||||
import ipaddr as ipaddress
|
||||
|
||||
|
||||
# Python 2.6 compatibility
|
||||
def total_seconds(td):
|
||||
return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
|
||||
|
||||
|
||||
def anonymize(remote_addr):
|
||||
"""
|
||||
Anonymize IPv4 and IPv6 :param remote_addr: to /24 (zero'd)
|
||||
|
13
tox.ini
13
tox.ini
@ -7,13 +7,6 @@ deps =
|
||||
commands =
|
||||
python setup.py nosetests
|
||||
|
||||
[testenv:py26]
|
||||
deps =
|
||||
argparse
|
||||
unittest2
|
||||
configparser
|
||||
{[testenv]deps}
|
||||
|
||||
[testenv:py27]
|
||||
deps =
|
||||
configparser
|
||||
@ -28,12 +21,6 @@ deps=
|
||||
passlib==1.5.3
|
||||
werkzeug==0.8.3
|
||||
|
||||
[testenv:squeeze]
|
||||
basepython=python2.6
|
||||
deps=
|
||||
{[testenv:py26]deps}
|
||||
{[testenv:debian]deps}
|
||||
|
||||
[testenv:wheezy]
|
||||
basepython=python2.7
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user