Skip to content

Commit f5fd760

Browse files
authored
Merge pull request #52 from kvesteri/hotfix/42-overflow-error
Hotfix/42 overflow error
2 parents 0efcb67 + b08c0a3 commit f5fd760

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ sudo: required
33
dist: xenial
44

55
python:
6-
- 2.7
7-
- 3.4
86
- 3.5
97
- 3.6
108
- 3.7

CHANGES.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Changelog
44
Here you can see the full list of changes between each intervals release.
55

66

7+
0.9.0 (2020-07-16)
8+
^^^^^^^^^^^^^^^^^^
9+
10+
- Fixed interval coercion (#42)
11+
- Dropped py27 and py34 support
12+
13+
714
0.8.1 (2017-12-06)
815
^^^^^^^^^^^^^^^^^^
916

intervals/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
)
3333

3434

35-
__version__ = '0.8.1'
35+
__version__ = '0.9.0'

intervals/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def wrapper(self, arg):
100100
return NotImplemented
101101
try:
102102
arg = type(self)(self.type(arg))
103-
except (ValueError, TypeError):
103+
except (ValueError, TypeError, OverflowError):
104104
pass
105105
return func(self, arg)
106106
return wrapper

setup.py

-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def get_version():
5757
'License :: OSI Approved :: BSD License',
5858
'Operating System :: OS Independent',
5959
'Programming Language :: Python',
60-
'Programming Language :: Python :: 2',
61-
'Programming Language :: Python :: 2.7',
6260
'Programming Language :: Python :: 3',
63-
'Programming Language :: Python :: 3.4',
6461
'Programming Language :: Python :: 3.5',
6562
'Programming Language :: Python :: 3.6',
6663
'Programming Language :: Python :: 3.7',

tests/interval/test_operators.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ class TestComparisonOperators(object):
1919
DateInterval([date(2011, 1, 1), date(2011, 1, 1)]),
2020
False
2121
),
22-
(IntInterval.from_string('(,)') == None, False) # noqa
22+
(IntInterval.from_string('(,)') == None, False), # noqa
23+
(
24+
DateInterval(date(2000, 1, 1), date(2001, 1, 1)) ==
25+
-12312321312312312312123123,
26+
False
27+
)
2328
))
2429
def test_eq_operator(self, comparison, result):
2530
assert comparison is result

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py33,py34,pypy
2+
envlist = py35,py36,py37,pypy
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)