From 59f25a45a7faf3f72935d96cc63fd417f7907c45 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 14:12:39 +0200 Subject: [PATCH 1/6] setup.cfg: use default format for sdist (.tar.gz), see #25 --- setup.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index e053fef..a3f8b20 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,3 @@ -[sdist] -formats=bztar - [build_sphinx] source-dir = rst build-dir = doc - From a58be2bd84fc040d214457babbb8a7c5e1b80442 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 14:19:45 +0200 Subject: [PATCH 2/6] we need a very recent cython to support python 3.9 there were some incompatible changes in python 3.9, thus code generated by old cython versions won't compile. --- rst/install.rst | 2 +- setup.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rst/install.rst b/rst/install.rst index b7ca4f1..f1d656e 100644 --- a/rst/install.rst +++ b/rst/install.rst @@ -62,7 +62,7 @@ Development Version If you have checked out the unstable development version from the repository, a bit more effort is required. You need to also have -Cython_ (0.24 or newer) and Sphinx_ (1.1 or newer) installed, and the +Cython_ (0.29.21 or newer) and Sphinx_ (1.1 or newer) installed, and the necessary commands are:: python setup.py build_cython diff --git a/setup.py b/setup.py index a1a616b..a8223f8 100755 --- a/setup.py +++ b/setup.py @@ -231,8 +231,9 @@ def run(self): raise SystemExit('Cython needs to be installed for this command') hit = re.match('^Cython version (.+)$', version) - if not hit or LooseVersion(hit.group(1)) < "0.24": - raise SystemExit('Need Cython 0.24 or newer, found ' + version) + if not hit or LooseVersion(hit.group(1)) < "0.29": + # in fact, we need a very recent Cython version (like 0.29.21) to support py39 + raise SystemExit('Need Cython 0.29 or newer, found ' + version) cmd = ['cython', '-Wextra', '--force', '-3', '--fast-fail', '--directive', 'embedsignature=True', '--include-dir', From c8d83be25cfd071c0a1078f57b7b3818db9de6da Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 14:29:16 +0200 Subject: [PATCH 3/6] fix typo in changelog it still worked for py38, but py39 was broken because they removed some deprecated stuff still present in the old cython-generated C code. --- Changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changes.rst b/Changes.rst index 3555586..4e38185 100644 --- a/Changes.rst +++ b/Changes.rst @@ -11,7 +11,7 @@ module instead. Release 1.3.7 (2020-10-04) ========================== -* Rebuild with Cython 0.29.21 for Python 3.8 compatibility. +* Rebuild with Cython 0.29.21 for Python 3.9 compatibility. Release 1.3.6 (2019-02-14) ========================== From 72b9fd367a106776f55f59cc623d6bea06e37a07 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 14:37:04 +0200 Subject: [PATCH 4/6] travis: testing on all python versions also: on differently old linux dists --- .travis.yml | 27 ++++++++++++++++++++++----- test/travis-install.sh | 3 ++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b30fc28..1c4f5ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,27 @@ sudo: required -dist: xenial +language: python + +matrix: + include: + - python: "3.4" + os: linux + dist: trusty + - python: "3.5" + os: linux + dist: xenial + - python: "3.6" + os: linux + dist: bionic + - python: "3.7" + os: linux + dist: bionic + - python: "3.8" + os: linux + dist: focal + - python: "3.9-dev" + os: linux + dist: focal -language: - - python -python: - - "3.6" addons: apt: packages: diff --git a/test/travis-install.sh b/test/travis-install.sh index 32c6fec..4d98d12 100755 --- a/test/travis-install.sh +++ b/test/travis-install.sh @@ -2,5 +2,6 @@ set -e -pip install pytest cython sphinx +# as long as we test on python 3.4, we need pytest < 5.0 +pip install 'pytest<5.0' pytest-catchlog cython sphinx cython --version From 3000f1f5f74b2f1765a04b1b57317f23aceab6a1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 14:26:18 +0200 Subject: [PATCH 5/6] pypi metadata: be more precise about python versions Note: I used the same python versions as for borgbackup because I run extensive release testing for these versions (which indirectly tests llfuse also) plus python 3.9 which should also work after fixing llfuse's cythonized code for it. There might be a need to drop 3.4 and 3.5 later again because they are EOL, but for right now, they're still working and tested. --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index a8223f8..e248585 100755 --- a/setup.py +++ b/setup.py @@ -140,6 +140,13 @@ def main(): classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Programming Language :: Python', + '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', + 'Programming Language :: Python :: 3.9', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Filesystems', 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', From 98fc9119f0f2ac489db72f1ed16db5cee5749faa Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 4 Oct 2020 15:24:29 +0200 Subject: [PATCH 6/6] disable developer mode on travis-ci --- setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e248585..4e19cfe 100755 --- a/setup.py +++ b/setup.py @@ -46,8 +46,13 @@ basedir = os.path.abspath(os.path.dirname(sys.argv[0])) sys.path.insert(0, os.path.join(basedir, 'util')) -# When running from HG repo, enable all warnings -DEVELOPER_MODE = os.path.exists(os.path.join(basedir, 'MANIFEST.in')) +ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') is not None + +# when running on developer machine / from a repo checkout: +# enable all warnings, abort on some warnings. +# when running on travis-ci, do not use developer mode, so it +# can compile and test even if there are e.g. deprecation warnings. +DEVELOPER_MODE = os.path.exists(os.path.join(basedir, 'MANIFEST.in')) and not ON_TRAVIS if DEVELOPER_MODE: print('found MANIFEST.in, running in developer mode') warnings.resetwarnings()