Skip to content

Commit

Permalink
Drop the support for Python 2.6
Browse files Browse the repository at this point in the history
Resolves #376
  • Loading branch information
ashcrow committed Oct 8, 2016
1 parent d8b41ef commit 11a812f
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 47 deletions.
1 change: 0 additions & 1 deletion .travis.yml
@@ -1,6 +1,5 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
Expand Down
7 changes: 1 addition & 6 deletions fedmsg/commands/__init__.py
Expand Up @@ -24,12 +24,7 @@
import sys

import logging
try:
# Python2.7 and later
from logging.config import dictConfig
except ImportError:
# For Python2.6, we rely on a third party module.
from logutils.dictconfig import dictConfig
from logging.config import dictConfig


class BaseCommand(object):
Expand Down
6 changes: 2 additions & 4 deletions fedmsg/consumers/__init__.py
Expand Up @@ -114,10 +114,8 @@ def __init__(self, hub):
self.status_filename, self.status_lock = None, None
if self.status_directory:

# Extract proc name and handle differences between py2.6 and py2.7
proc_name = current_proc().name
if callable(proc_name):
proc_name = proc_name()
# Extract proc name
proc_name = current_proc().name()

self.status_filename = os.path.join(
self.status_directory, proc_name, type(self).__name__)
Expand Down
8 changes: 1 addition & 7 deletions fedmsg/tests/test_crypto_switching.py
Expand Up @@ -23,13 +23,7 @@

import nose.tools.nontrivial

major, minor = sys.version_info[:2]
if major == 2 and minor <= 6:
# For python-2.6, so we can do skipTest
import unittest2 as unittest
else:
import unittest

import unittest
import fedmsg.crypto

SEP = os.path.sep
Expand Down
8 changes: 1 addition & 7 deletions fedmsg/tests/test_crypto_x509.py
Expand Up @@ -23,13 +23,7 @@
import sys

import nose.tools.nontrivial

major, minor = sys.version_info[:2]
if major == 2 and minor <= 6:
# For python-2.6, so we can do skipTest
import unittest2 as unittest
else:
import unittest
import unittest

import fedmsg.crypto

Expand Down
7 changes: 1 addition & 6 deletions fedmsg/tests/test_hub.py
Expand Up @@ -13,12 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
# For python-2.6, so we can do skipTest
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import os
import socket

Expand Down
7 changes: 1 addition & 6 deletions fedmsg/tests/test_threads.py
Expand Up @@ -13,12 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try:
# For python-2.6, so we can do skipTest
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import threading
import copy
import os
Expand Down
10 changes: 1 addition & 9 deletions setup.py
Expand Up @@ -104,15 +104,7 @@

if sys.version_info[0] == 2:
tests_require.append('mock')
if sys.version_info[1] <= 6:
install_requires.extend([
'argparse',
'ordereddict',
'logutils',
])
tests_require.extend([
'unittest2',
])


setup(
name='fedmsg',
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Expand Up @@ -5,7 +5,6 @@ downloadcache = {toxworkdir}/_download/
[testenv]
recreate = True
basepython =
py26: python2.6
py27: python2.7
py34: python3.4
deps =
Expand Down

0 comments on commit 11a812f

Please sign in to comment.