Skip to content

Commit f586928

Browse files
authored
Merge pull request #101 from chaimleib/v3.1.0
V3.1.0
2 parents 1624413 + c4bc2af commit f586928

File tree

7 files changed

+40
-24
lines changed

7 files changed

+40
-24
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ language: python
22
matrix:
33
include:
44
- python: 2.7
5-
- python: 3.4
65
- python: 3.5
76
- python: 3.6
87
- python: 3.7
8+
- python: 3.8
99
dist: xenial
1010
sudo: true
11-
- python: 3.8-dev
11+
- python: 3.9-dev
1212
env: FAILOK=y
1313
dist: xenial
1414
sudo: true

CHANGELOG.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change log
22

3+
## Version 3.1.0
4+
- Dropped support for Python 3.4, added Python 3.8
5+
- Add `__slots__` optimization in Node class, should give performance improvement
6+
- Fixed:
7+
- Restore universal wheels
8+
- Bytes/str type incompatibility in setup.py
9+
- New version of distutils rejects version suffixes of `.postNN`, use `aNN` instead
10+
311
## Version 3.0.2
412
- Fixed:
513
- On some systems, setup.py opened README.md with a non-unicode encoding. My fault for leaving the encoding flapping in the breeze. It's been fixed.
@@ -171,6 +179,3 @@
171179
- Added tests
172180
- Bug fix: interval addition via [] was broken in Python 2.7 (see http://bugs.python.org/issue21785)
173181
- Added intervaltree.bio subpackage, adding some utilities for use in bioinformatics
174-
175-
## Version 0.2.2b
176-
- Forked from https://github.com/MusashiAharon/PyIntervalTree

Makefile

+10-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TEMPS=$(shell \
99
-o \( -type d -name '__pycache__' \) \
1010
)
1111

12-
PYTHONS:=2.7.15 3.4.9 3.5.6 3.6.7 3.7.1
12+
PYTHONS:=2.7.18 3.5.9 3.6.11 3.7.8 3.8.5
1313
PYTHON_MAJORS:=$(shell \
1414
echo "$(PYTHONS)" | \
1515
tr ' ' '\n' | cut -d. -f1 | \
@@ -24,16 +24,7 @@ PYTHON_MINORS:=$(shell \
2424
# PyPI server name, as specified in ~/.pypirc
2525
# See http://peterdowns.com/posts/first-time-with-pypi.html
2626
PYPI=pypitest
27-
28-
TWINE=$(shell \
29-
if twine --version &>/dev/null; then \
30-
echo twine ;\
31-
elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \
32-
echo '~/Library/Python/3.7/bin/twine' ;\
33-
else \
34-
echo twine ;\
35-
fi \
36-
)
27+
TWINE=twine
3728

3829
# default target
3930
all: test
@@ -111,8 +102,15 @@ pyenv-install-versions: pyenv-is-installed
111102
export PYENV_VERSION=$$pyver; \
112103
pip install -U pip; \
113104
pip install -U pytest; \
114-
pip install -U twine; \
115105
done | grep -v 'Requirement already satisfied, skipping upgrade'
106+
# twine and wheel needed only under latest PYTHONS version for uploading to PYPI
107+
export PYENV_VERSION=$(shell \
108+
echo $(PYTHONS) | \
109+
tr ' ' '\n' | \
110+
tail -n1 \
111+
)
112+
pip install -U twine
113+
pip install -U wheel
116114
pyenv rehash
117115

118116
# for debugging the Makefile

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pip install intervaltree
2626
Features
2727
--------
2828

29-
* Supports Python 2.7 and Python 3.4+ (Tested under 2.7, and 3.4 thru 3.7)
29+
* Supports Python 2.7 and Python 3.5+ (Tested under 2.7, and 3.5 thru 3.8)
3030
* Initializing
3131
* blank `tree = IntervalTree()`
3232
* from an iterable of `Interval` objects (`tree = IntervalTree(intervals)`)
@@ -350,11 +350,12 @@ Based on
350350
* [konstantint/Konstantin Tretyakov][Konstantin intervaltree] of the University of Tartu (Estonia)
351351
* [siniG/Avi Gabay][siniG intervaltree]
352352
* [lmcarril/Luis M. Carril][lmcarril intervaltree] of the Karlsruhe Institute for Technology (Germany)
353+
* [depristo/MarkDePristo][depristo intervaltree]
353354

354355
Copyright
355356
---------
356357

357-
* [Chaim Leib Halbert][GH], 2013-2018
358+
* [Chaim Leib Halbert][GH], 2013-2020
358359
* Modifications, [Konstantin Tretyakov][Konstantin intervaltree], 2014
359360

360361
Licensed under the [Apache License, version 2.0][Apache].
@@ -369,6 +370,7 @@ The source code for this project is at https://github.com/chaimleib/intervaltree
369370
[Konstantin intervaltree]: https://github.com/konstantint/PyIntervalTree
370371
[siniG intervaltree]: https://github.com/siniG/intervaltree
371372
[lmcarril intervaltree]: https://github.com/lmcarril/intervaltree
373+
[depristo intervaltree]: https://github.com/depristo/intervaltree
372374
[Confuzzled AVL tree]: http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx
373375
[Wiki intervaltree]: http://en.wikipedia.org/wiki/Interval_tree
374376
[Kahn intervaltree]: http://zurb.com/forrst/posts/Interval_Tree_implementation_in_python-e0K

intervaltree/node.py

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ def l2(num):
3535

3636

3737
class Node(object):
38+
__slots__ = (
39+
'x_center',
40+
's_center',
41+
'left_node',
42+
'right_node',
43+
'depth',
44+
'balance'
45+
)
3846
def __init__(self,
3947
x_center=None,
4048
s_center=set(),

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ tag_svn_revision = false
55
[tool:pytest]
66
addopts = --doctest-modules --doctest-glob='README.md' --ignore=setup.py --ignore=*.pyc
77
norecursedirs=*.egg* *doc* .* _* htmlcov scripts dist bin test/data
8+
9+
[bdist_wheel]
10+
universal = 1

setup.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
import subprocess
3434

3535
## CONFIG
36-
target_version = '3.0.3'
36+
target_version = '3.1.0'
3737

3838

3939
def version_info(target_version):
4040
is_dev_version = 'PYPI' in os.environ and os.environ['PYPI'] == 'pypitest'
4141
if is_dev_version:
4242
p = subprocess.Popen('git describe --tag'.split(), stdout=subprocess.PIPE)
43-
git_describe = p.communicate()[0].strip()
43+
git_describe = str(p.communicate()[0]).strip()
4444
release, build, commitish = git_describe.split('-')
45-
version = "{0}.post{1}".format(release, build)
45+
version = "{0}a{1}".format(target_version, build)
4646
else: # This is a RELEASE version
4747
version = target_version
4848
return {
@@ -86,7 +86,7 @@ def run_tests(self):
8686
long_description=long_description,
8787
long_description_content_type='text/markdown',
8888
classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
89-
'Development Status :: 4 - Beta',
89+
'Development Status :: 5 - Production/Stable',
9090
'Programming Language :: Python :: Implementation :: PyPy',
9191
'Intended Audience :: Developers',
9292
'Intended Audience :: Information Technology',
@@ -95,10 +95,10 @@ def run_tests(self):
9595
'Programming Language :: Python :: 2',
9696
'Programming Language :: Python :: 2.7',
9797
'Programming Language :: Python :: 3',
98-
'Programming Language :: Python :: 3.4',
9998
'Programming Language :: Python :: 3.5',
10099
'Programming Language :: Python :: 3.6',
101100
'Programming Language :: Python :: 3.7',
101+
'Programming Language :: Python :: 3.8',
102102
'License :: OSI Approved :: Apache Software License',
103103
'Topic :: Scientific/Engineering :: Artificial Intelligence',
104104
'Topic :: Scientific/Engineering :: Bio-Informatics',

0 commit comments

Comments
 (0)