Skip to content

Commit

Permalink
project: abandon python 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
brutasse committed Oct 18, 2017
1 parent e03e17d commit 999da1f
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 46 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ matrix:
- python: 2.7
env:
- TOXENV=py27
- python: 2.6
env:
- TOXENV=py26
- python: pypy
env:
- TOXENV=pypy
allow_failures:
- env: TOXENV=py26
- env: TOXENV=coverage
- env: TOXENV=pyparsing1
- env: TOXENV=pypy
6 changes: 1 addition & 5 deletions graphite_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import traceback
import warnings
from importlib import import_module
from logging.config import dictConfig

import structlog
import yaml
Expand All @@ -15,11 +16,6 @@
from .middleware import CORS, TrailingSlash
from .storage import Store

try:
from logging.config import dictConfig
except ImportError:
from logutils.dictconfig import dictConfig

if DEBUG:
processors = (format_exc_info, KeyValueRenderer())
else:
Expand Down
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@
'pyparsing>=1.5.7',
'pytz',
'six',
'structlog',
'tzlocal',
]

if sys.version_info < (3, 5):
install_requires.append('scandir')
if sys.version_info < (2, 7):
install_requires.append('importlib')
install_requires.append('logutils')
install_requires.append('ordereddict')
install_requires.append('structlog<=16.0.0')
else:
install_requires.append('structlog')

with open('README.rst') as f:
long_description = f.read()
Expand Down
17 changes: 2 additions & 15 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import os
import shutil
import sys
from logging.config import dictConfig

os.environ.setdefault(
'GRAPHITE_API_CONFIG',
Expand All @@ -22,26 +22,13 @@
WHISPER_DIR = os.path.join(DATA_DIR, 'whisper')
SEARCH_INDEX = os.path.join(DATA_DIR, 'index')

null_handler = 'logging.NullHandler'
if sys.version_info > (2, 7):
from logging.config import dictConfig
else:
from logutils.dictconfig import dictConfig

class NullHandler(object):
def emit(self, record):
pass

def setLevel(self, level):
pass
null_handler = 'tests.NullHandler'

dictConfig({
'version': 1,
'handlers': {
'raw': {
'level': 'DEBUG',
'class': null_handler,
'class': 'logging.NullHandler',
},
},
})
Expand Down
15 changes: 0 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,6 @@ deps =
structlog
tzlocal

[testenv:py26]
basepython = python2.6
commands =
python setup.py test
deps =
{[testenv]deps}
Flask
Flask-Cache
pyparsing
unittest2
logutils
ordereddict
mock
scandir

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

0 comments on commit 999da1f

Please sign in to comment.