From 71fbc62ede215c240c17b71dd0d8e021ab25b351 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 27 Nov 2019 18:46:58 +0000 Subject: [PATCH 01/11] configure universal wheels --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 216ccef..bc2a4c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,3 +5,6 @@ tag_svn_revision = false [tool:pytest] addopts = --doctest-modules --doctest-glob='README.md' --ignore=setup.py --ignore=*.pyc norecursedirs=*.egg* *doc* .* _* htmlcov scripts dist bin test/data + +[bdist_wheel] +universal = 1 From 76963fb6f4c7f122e2cdd1cc920fe6a1cfe02f08 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Fri, 31 Jul 2020 18:19:05 -0700 Subject: [PATCH 02/11] v3.1.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 32bc151..1c03841 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ import subprocess ## CONFIG -target_version = '3.0.3' +target_version = '3.1.0' def version_info(target_version): From ae06393f2134dc8f46263627c1f0d0f05a0bc435 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Fri, 31 Jul 2020 19:07:29 -0700 Subject: [PATCH 03/11] fix: convert bytes from git describe --tag to str --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1c03841..27bd415 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def version_info(target_version): is_dev_version = 'PYPI' in os.environ and os.environ['PYPI'] == 'pypitest' if is_dev_version: p = subprocess.Popen('git describe --tag'.split(), stdout=subprocess.PIPE) - git_describe = p.communicate()[0].strip() + git_describe = str(p.communicate()[0]).strip() release, build, commitish = git_describe.split('-') version = "{0}.post{1}".format(release, build) else: # This is a RELEASE version From 8f0438bf9df0aa29bc5ac68403797f439ba00827 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Fri, 31 Jul 2020 20:01:19 -0700 Subject: [PATCH 04/11] drop python 3.4, add 3.8 --- .travis.yml | 4 ++-- CHANGELOG.md | 6 +++--- Makefile | 2 +- README.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5232a2..8127d16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: python matrix: include: - python: 2.7 - - python: 3.4 - python: 3.5 - python: 3.6 - python: 3.7 + - python: 3.8 dist: xenial sudo: true - - python: 3.8-dev + - python: 3.9-dev env: FAILOK=y dist: xenial sudo: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ecf32c..626481c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change log +## Version 3.1.0 +- Dropped support for Python 3.4, added Python 3.8 + ## Version 3.0.2 - Fixed: - 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 +174,3 @@ - Added tests - Bug fix: interval addition via [] was broken in Python 2.7 (see http://bugs.python.org/issue21785) - Added intervaltree.bio subpackage, adding some utilities for use in bioinformatics - -## Version 0.2.2b -- Forked from https://github.com/MusashiAharon/PyIntervalTree diff --git a/Makefile b/Makefile index 7d25130..9efde6a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ TEMPS=$(shell \ -o \( -type d -name '__pycache__' \) \ ) -PYTHONS:=2.7.15 3.4.9 3.5.6 3.6.7 3.7.1 +PYTHONS:=2.7.18 3.5.9 3.6.11 3.7.8 3.8.5 PYTHON_MAJORS:=$(shell \ echo "$(PYTHONS)" | \ tr ' ' '\n' | cut -d. -f1 | \ diff --git a/README.md b/README.md index 90096d5..da1607b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ pip install intervaltree Features -------- -* Supports Python 2.7 and Python 3.4+ (Tested under 2.7, and 3.4 thru 3.7) +* Supports Python 2.7 and Python 3.5+ (Tested under 2.7, and 3.5 thru 3.8) * Initializing * blank `tree = IntervalTree()` * from an iterable of `Interval` objects (`tree = IntervalTree(intervals)`) From 36ee1f6dbdd83bf68210873165801cd47655de19 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:03:23 -0700 Subject: [PATCH 05/11] __slots__ in node.py from depristo #55 --- README.md | 4 +++- intervaltree/node.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da1607b..2b49917 100644 --- a/README.md +++ b/README.md @@ -350,11 +350,12 @@ Based on * [konstantint/Konstantin Tretyakov][Konstantin intervaltree] of the University of Tartu (Estonia) * [siniG/Avi Gabay][siniG intervaltree] * [lmcarril/Luis M. Carril][lmcarril intervaltree] of the Karlsruhe Institute for Technology (Germany) + * [depristo/MarkDePristo][depristo intervaltree] Copyright --------- -* [Chaim Leib Halbert][GH], 2013-2018 +* [Chaim Leib Halbert][GH], 2013-2020 * Modifications, [Konstantin Tretyakov][Konstantin intervaltree], 2014 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 [Konstantin intervaltree]: https://github.com/konstantint/PyIntervalTree [siniG intervaltree]: https://github.com/siniG/intervaltree [lmcarril intervaltree]: https://github.com/lmcarril/intervaltree +[depristo intervaltree]: https://github.com/depristo/intervaltree [Confuzzled AVL tree]: http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx [Wiki intervaltree]: http://en.wikipedia.org/wiki/Interval_tree [Kahn intervaltree]: http://zurb.com/forrst/posts/Interval_Tree_implementation_in_python-e0K diff --git a/intervaltree/node.py b/intervaltree/node.py index ff04959..fc8e35d 100644 --- a/intervaltree/node.py +++ b/intervaltree/node.py @@ -35,6 +35,14 @@ def l2(num): class Node(object): + __slots__ = ( + 'x_center', + 's_center', + 'left_node', + 'right_node', + 'depth', + 'balance' + ) def __init__(self, x_center=None, s_center=set(), From 6147ca84e1aaf8a7c8ee83561ecc4e274a016f05 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:07:30 -0700 Subject: [PATCH 06/11] upd python version support and set production status in setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 27bd415..f0a6dc6 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def run_tests(self): long_description=long_description, long_description_content_type='text/markdown', classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: Implementation :: PyPy', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', @@ -95,10 +95,10 @@ def run_tests(self): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: Apache Software License', 'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Topic :: Scientific/Engineering :: Bio-Informatics', From 5f0138b85f51faaa37ce30686499143bc4dadfaa Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:11:07 -0700 Subject: [PATCH 07/11] upd changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 626481c..346726c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Version 3.1.0 - Dropped support for Python 3.4, added Python 3.8 +- Add `__slots__` optimization in Node class, should give performance improvement +- Fixed: + - Restore universal wheels + - Fix bytes/str type incompatibility in setup.py ## Version 3.0.2 - Fixed: From 9084b9caffd276e8b91a96b9f354e201edf74a48 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:19:24 -0700 Subject: [PATCH 08/11] change version number scheme for distutils --- CHANGELOG.md | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 346726c..761ab2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ - Add `__slots__` optimization in Node class, should give performance improvement - Fixed: - Restore universal wheels - - Fix bytes/str type incompatibility in setup.py + - Bytes/str type incompatibility in setup.py + - New version of distutils rejects version suffixes of `.postNN`, use `aNN` instead ## Version 3.0.2 - Fixed: diff --git a/setup.py b/setup.py index f0a6dc6..faa6c56 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def version_info(target_version): p = subprocess.Popen('git describe --tag'.split(), stdout=subprocess.PIPE) git_describe = str(p.communicate()[0]).strip() release, build, commitish = git_describe.split('-') - version = "{0}.post{1}".format(release, build) + version = "{0}a{1}".format(target_version, build) else: # This is a RELEASE version version = target_version return { From 655dcc83ae6a88ab3f40de1f97166bc08299d8d5 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:28:20 -0700 Subject: [PATCH 09/11] use latest python for twine upload --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9efde6a..27060e9 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ PYTHON_MINORS:=$(shell \ PYPI=pypitest TWINE=$(shell \ + pyenv shell $(shell echo "$(PYTHONS)" | tr ' ' '\n' | tail -n1) ;\ if twine --version &>/dev/null; then \ echo twine ;\ elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \ From 9d58a888011fb766729b2ec4e8579a4547c49b84 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:38:28 -0700 Subject: [PATCH 10/11] install wheel pkg --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 27060e9..d6704d0 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,7 @@ pyenv-install-versions: pyenv-is-installed pip install -U pip; \ pip install -U pytest; \ pip install -U twine; \ + pip install -U wheel; \ done | grep -v 'Requirement already satisfied, skipping upgrade' pyenv rehash From c4bc2afdd15d1594a61c8833b7a30b8a46a7cf87 Mon Sep 17 00:00:00 2001 From: Chaim Halbert Date: Mon, 3 Aug 2020 00:50:24 -0700 Subject: [PATCH 11/11] only install twine and wheel under latest PYTHONS version --- Makefile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d6704d0..10c3af1 100644 --- a/Makefile +++ b/Makefile @@ -24,17 +24,7 @@ PYTHON_MINORS:=$(shell \ # PyPI server name, as specified in ~/.pypirc # See http://peterdowns.com/posts/first-time-with-pypi.html PYPI=pypitest - -TWINE=$(shell \ - pyenv shell $(shell echo "$(PYTHONS)" | tr ' ' '\n' | tail -n1) ;\ - if twine --version &>/dev/null; then \ - echo twine ;\ - elif [[ -x ~/Library/Python/3.7/bin/twine ]]; then \ - echo '~/Library/Python/3.7/bin/twine' ;\ - else \ - echo twine ;\ - fi \ -) +TWINE=twine # default target all: test @@ -112,9 +102,15 @@ pyenv-install-versions: pyenv-is-installed export PYENV_VERSION=$$pyver; \ pip install -U pip; \ pip install -U pytest; \ - pip install -U twine; \ - pip install -U wheel; \ done | grep -v 'Requirement already satisfied, skipping upgrade' + # twine and wheel needed only under latest PYTHONS version for uploading to PYPI + export PYENV_VERSION=$(shell \ + echo $(PYTHONS) | \ + tr ' ' '\n' | \ + tail -n1 \ + ) + pip install -U twine + pip install -U wheel pyenv rehash # for debugging the Makefile