Skip to content

Commit d966744

Browse files
author
bjmb
committed
Removed support for python 2.6
1 parent eef33b0 commit d966744

File tree

7 files changed

+5
-23
lines changed

7 files changed

+5
-23
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ language: python
22
python: 2.7
33
sudo: false
44
env:
5-
- TOX_ENV=py26 CASS_VER=21 CASS_DRIVER_NO_CYTHON=1
6-
- TOX_ENV=py26 CASS_VER=21
75
- TOX_ENV=py27 CASS_VER=12 CASS_DRIVER_NO_CYTHON=1
86
- TOX_ENV=py27 CASS_VER=20 CASS_DRIVER_NO_CYTHON=1
97
- TOX_ENV=py27 CASS_VER=21 CASS_DRIVER_NO_CYTHON=1

README-dev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ it with the ``PROTOCOL_VERSION`` environment variable::
117117

118118
Testing Multiple Python Versions
119119
--------------------------------
120-
If you want to test all of python 2.6, 2.7, and pypy, use tox (this is what
120+
If you want to test all of python 2.7, 3.3, 3.4 and pypy, use tox (this is what
121121
TravisCI runs)::
122122

123123
tox

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DataStax Python Driver for Apache Cassandra
66

77
A modern, `feature-rich <https://github.com/datastax/python-driver#features>`_ and highly-tunable Python client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3.
88

9-
The driver supports Python 2.6, 2.7, 3.3, and 3.4.
9+
The driver supports Python 2.7, 3.3, and 3.4.
1010

1111
Feedback Requested
1212
------------------

cassandra/marshal.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,12 @@ def varint_unpack(term): # noqa
6868
return val
6969

7070

71-
def bitlength(n):
72-
bitlen = 0
73-
while n > 0:
74-
n >>= 1
75-
bitlen += 1
76-
return bitlen
77-
78-
7971
def varint_pack(big):
8072
pos = True
8173
if big == 0:
8274
return b'\x00'
8375
if big < 0:
84-
bytelength = bitlength(abs(big) - 1) // 8 + 1
76+
bytelength = int.bit_length(abs(big) - 1) // 8 + 1
8577
big = (1 << bytelength * 8) + big
8678
pos = False
8779
revbytes = bytearray()

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ def run_setup(extensions):
417417
'Natural Language :: English',
418418
'Operating System :: OS Independent',
419419
'Programming Language :: Python',
420-
'Programming Language :: Python :: 2.6',
421420
'Programming Language :: Python :: 2.7',
422421
'Programming Language :: Python :: 3.3',
423422
'Programming Language :: Python :: 3.4',

tests/unit/test_marshalling.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import sys
1515

1616
from cassandra import ProtocolVersion
17-
from cassandra.marshal import bitlength
1817

1918
try:
2019
import unittest2 as unittest
@@ -134,11 +133,6 @@ def test_marshalling(self):
134133
msg='Marshaller for %s (%s) gave wrong type (%s instead of %s)'
135134
% (valtype, marshaller, type(whatwegot), type(serializedval)))
136135

137-
def test_bitlength(self):
138-
self.assertEqual(bitlength(9), 4)
139-
self.assertEqual(bitlength(-10), 0)
140-
self.assertEqual(bitlength(0), 0)
141-
142136
def test_date(self):
143137
# separate test because it will deserialize as datetime
144138
self.assertEqual(DateType.from_binary(DateType.to_binary(date(2015, 11, 2), 1), 1), datetime(2015, 11, 2))

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{26,27,33,34},pypy
2+
envlist = py{27,33,34},pypy
33

44
[base]
55
deps = nose
@@ -11,8 +11,7 @@ deps = nose
1111
[testenv]
1212
deps = {[base]deps}
1313
cython
14-
py26: unittest2
15-
py{26,27}: gevent
14+
py{27}: gevent
1615
twisted <15.5.0
1716
setenv = LIBEV_EMBED=0
1817
CARES_EMBED=0

0 commit comments

Comments
 (0)