Skip to content

Commit 35f0b98

Browse files
committed
remove Python 2.6 and 3.3 support
1 parent bee5672 commit 35f0b98

9 files changed

Lines changed: 11 additions & 18 deletions

File tree

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
sudo: false
22
language: python
33
python:
4-
- 2.6
54
- 2.7
6-
- 3.3
75
- 3.4
86
- 3.5
97
- 3.6
@@ -13,7 +11,6 @@ python:
1311
install:
1412
- pip install -r tests/requirements.txt
1513
- pip install coveralls
16-
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
1714
script:
1815
- nosetests --with-coverage --cover-erase --cover-package=redminelib
1916
after_success:

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Changelog
99
- ``PerformanceWarning`` will be issued when Python-Redmine does some unnecessary work under the hood to fix the
1010
clients code problems
1111

12+
**Changes**:
13+
14+
- *Backwards Incompatible:* Removed Python 2.6 and 3.3 support
15+
1216
**Bugfixes**:
1317

1418
- ``Redmine.upload()`` fails under certain circumstances when used with a file-like object and it contains unicode

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Features
5858

5959
* Supports 100% of Redmine API
6060
* Supports external Redmine plugins API
61-
* Supports Python 2.6, 2.7, 3.3 - 3.7, PyPy and PyPy3
61+
* Supports Python 2.7, 3.4 - 3.7, PyPy and PyPy3
6262
* Supports different request engines
6363
* Extendable via custom resources and custom request engines
6464
* Extensively documented

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Features
5858

5959
* Supports 100% of Redmine API
6060
* Supports external Redmine plugins API
61-
* Supports Python 2.6, 2.7, 3.3 - 3.7, PyPy and PyPy3
61+
* Supports Python 2.7, 3.4 - 3.7, PyPy and PyPy3
6262
* Supports different request engines
6363
* Extendable via custom resources and custom request engines
6464
* Extensively documented

redminelib/resources/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class BaseResource(utilities.with_metaclass(Registrar)):
116116
_resource_set_map = {} # Resources that should become a ResourceSet object
117117
_single_attr_id_map = {} # Resource attributes that should set another resource id to its value
118118
_multiple_attr_id_map = {} # Resource attributes should set another resource ids to their value
119-
__length_hint__ = None # fixes Python 2.6 list() call on resource object
120119

121120
def __init__(self, manager, attributes):
122121
"""
@@ -199,7 +198,7 @@ def __setattr__(self, attr, value):
199198
raise exceptions.ReadonlyAttrError
200199
elif attr == 'custom_fields':
201200
try:
202-
new = dict((field['id'], self.bulk_decode(field, self.manager)) for field in value)
201+
new = {field['id']: self.bulk_decode(field, self.manager) for field in value}
203202
except (TypeError, KeyError):
204203
raise exceptions.CustomFieldValueError
205204

redminelib/resultsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def values(self, *fields):
245245
"""
246246
if fields:
247247
for resource in super(ResourceSet, self).__iter__():
248-
yield dict((field, resource[field]) for field in fields if field in resource)
248+
yield {field: resource[field] for field in fields if field in resource}
249249
else:
250250
for resource in super(ResourceSet, self).__iter__():
251251
yield resource

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ def run_tests(self):
2424

2525
if sys.version_info[:2] < (3, 3):
2626
tests_require.append('mock')
27-
if sys.version_info[:2] == (2, 6):
28-
tests_require.append('unittest2')
2927

3028
exec(open('redminelib/version.py').read())
3129

@@ -45,6 +43,7 @@ def run_tests(self):
4543
description='Library for communicating with a Redmine project management application',
4644
long_description=open('README.rst').read() + '\n\n' + open('CHANGELOG.rst').read(),
4745
keywords='redmine redmineup redminecrm redminelib easyredmine',
46+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
4847
tests_require=tests_require,
4948
cmdclass={'test': NoseTests},
5049
zip_safe=False,
@@ -58,9 +57,7 @@ def run_tests(self):
5857
'Environment :: Console',
5958
'Environment :: Web Environment',
6059
'Operating System :: OS Independent',
61-
'Programming Language :: Python :: 2.6',
6260
'Programming Language :: Python :: 2.7',
63-
'Programming Language :: Python :: 3.3',
6461
'Programming Language :: Python :: 3.4',
6562
'Programming Language :: Python :: 3.5',
6663
'Programming Language :: Python :: 3.6',

tests/README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ To run tests you will need these packages:
99

1010
For your convenience they are all listed in the ``requirements.txt`` file in this directory.
1111
If you are running Python 3.3+ ``mock`` already exists in the standard library so you don't
12-
need to install it. For Python 2.6 you also need to install ``unittest2`` package. After all
13-
dependencies are installed you can run tests with this command:
12+
need to install it. After all dependencies are installed you can run tests with this command:
1413

1514
.. code-block:: bash
1615

tests/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
try:
2-
import unittest2 as unittest
3-
except ImportError:
4-
import unittest
1+
import unittest
52

63
try:
74
from unittest import mock

0 commit comments

Comments
 (0)