Skip to content

Commit 8c379e7

Browse files
committed
Officially remove Python 2.6 and 3.3 support.
Also removed Python 2.6 compatibility code so it really won't work anymore. Python 3.3 still works, but we are not going to support it or test using it in the future. Fixes robotframework#2276.
1 parent b060ba1 commit 8c379e7

File tree

8 files changed

+7
-147
lines changed

8 files changed

+7
-147
lines changed

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
License :: OSI Approved :: Apache Software License
2424
Operating System :: OS Independent
2525
Programming Language :: Python :: 2
26-
Programming Language :: Python :: 2.6
2726
Programming Language :: Python :: 2.7
2827
Programming Language :: Python :: 3
29-
Programming Language :: Python :: 3.3
3028
Programming Language :: Python :: 3.4
3129
Programming Language :: Python :: 3.5
3230
Programming Language :: Python :: 3.6

src/robot/reporting/logreportwriters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def write(self, path, config):
4343
self._write_split_logs(splitext(path)[0])
4444

4545
def _write_split_logs(self, base):
46-
for index, (keywords, strings) in enumerate(self._js_model.split_results):
47-
index += 1 # enumerate accepts start index only in Py 2.6+
46+
for index, (keywords, strings) in enumerate(self._js_model.split_results,
47+
start=1):
4848
self._write_split_log(index, keywords, strings, '%s-%d.js' % (base, index))
4949

5050
def _write_split_log(self, index, keywords, strings, path):

src/robot/running/namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _get_runner_based_on_search_order(self, runners):
343343
return runners
344344

345345
def _filter_stdlib_runner(self, runner1, runner2):
346-
stdlibs_without_remote = STDLIBS - set(['Remote'])
346+
stdlibs_without_remote = STDLIBS - {'Remote'}
347347
if runner1.library.orig_name in stdlibs_without_remote:
348348
standard, custom = runner1, runner2
349349
elif runner2.library.orig_name in stdlibs_without_remote:

src/robot/utils/dotdict.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
try:
17-
from collections import OrderedDict
18-
except ImportError: # New in Python 2.7
19-
from .ordereddict import OrderedDict
16+
from collections import OrderedDict
2017

2118
from .robottypes import is_dict_like
2219

src/robot/utils/ordereddict.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/robot/utils/robotpath.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@
2525
from .unic import unic
2626

2727

28-
if sys.version_info < (2,7):
29-
def _abspath(path):
30-
if WINDOWS and os.path.splitunc(path)[0]:
31-
return os.path.abspath(path)
32-
return os.path.abspath(os.path.join(os.getcwdu(), path))
33-
elif IRONPYTHON and sys.version_info[:3] == (2, 7, 8):
28+
if IRONPYTHON and sys.version_info[:3] == (2, 7, 8):
3429
# https://github.com/IronLanguages/ironpython2/issues/371
3530
def _abspath(path):
3631
if os.path.isabs(path):
@@ -86,8 +81,6 @@ def abspath(path, case_normalize=False):
8681
2. Optionally lower-case paths on case-insensitive file systems.
8782
That includes Windows and also OSX in default configuration.
8883
3. Turn ``c:`` into ``c:\\`` on Windows instead of ``c:\\current\\path``.
89-
4. Handle non-ASCII characters on working directory with Python < 2.6.5:
90-
http://bugs.python.org/issue3426
9184
"""
9285
path = normpath(path, case_normalize)
9386
return normpath(_abspath(path), case_normalize)

src/robot/utils/robottypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
is_number, is_string, is_unicode, type_name)
2626

2727

28-
FALSE_STRINGS = set(['FALSE', 'NONE', 'NO', ''])
28+
FALSE_STRINGS = {'FALSE', 'NONE', 'NO', ''}
2929

3030

3131
def is_truthy(item):

src/robot/variables/splitter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ def _split(self, string):
7979
self._index_chars = []
8080
self._string = string
8181
start_index += 2
82-
for index, char in enumerate(string[start_index:]):
83-
index += start_index # Giving start to enumerate only in Py 2.6+
82+
for index, char in enumerate(string[start_index:], start=start_index):
8483
try:
8584
self._state(char, index)
8685
except StopIteration:

0 commit comments

Comments
 (0)