From 9df0e61f795d60159a6beb5ca651274d3175a798 Mon Sep 17 00:00:00 2001 From: pamaron Date: Tue, 6 Oct 2020 18:11:55 +0200 Subject: [PATCH] add python3.9 testing and related llfuse changes (backport to 1.1-maint) (#5389) also: do brew update again with dev/null redirect to avoid "too much log output" on travis-ci --- .travis.yml | 16 ++++++++++++---- .travis/install.sh | 17 +++++++++-------- Vagrantfile | 4 ++-- requirements.d/fuse.txt | 4 ++-- setup.py | 15 +++++---------- tox.ini | 2 +- 6 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index d8bd24d77..cab372fa8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,6 @@ cache: matrix: fast_finish: true include: - - python: "3.4" - os: linux - dist: trusty - env: TOXENV=flake8 - python: "3.4" os: linux dist: trusty @@ -31,6 +27,18 @@ matrix: os: linux dist: xenial env: TOXENV=py38 + - python: "3.9-dev" + os: linux + dist: xenial + env: TOXENV=py39 + - python: "3.9-dev" + os: linux + dist: focal + env: TOXENV=py39 + - python: "3.6" + os: linux + dist: xenial + env: TOXENV=flake8 - language: generic os: osx osx_image: xcode8.3 # This is the latest working xcode image with osxfuse compatibility; later images come with an OS X version which doesn't allow kernel extensions diff --git a/.travis/install.sh b/.travis/install.sh index e713f4591..71a0615c5 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -11,9 +11,8 @@ then # Update brew itself export HOMEBREW_NO_AUTO_UPDATE=1 # Auto-updating everything would take too much time - brew update + brew update > /dev/null brew cleanup # Preempt possible scheduled clean-up so it doesn't clutter the log later - # Install and/or upgrade dependencies brew install lz4 || brew upgrade lz4 brew install xz || brew upgrade xz # Required for Python lzma module @@ -61,14 +60,16 @@ python -m pip install virtualenv python -m virtualenv ~/.venv source ~/.venv/bin/activate +# Install requirements +pip install -r requirements.d/development.txt +pip install codecov +python setup.py --version + # Recent versions of OS X don't allow kernel extensions which makes the osxfuse tests fail; those versions are marked with SKIPFUSE=true in .travis.yml if [ "${SKIPFUSE}" = "true" ] then truncate -s 0 requirements.d/fuse.txt + pip install -e . +else + pip install -e .[fuse] fi - -# Install requirements -pip install -r requirements.d/development.lock.txt -pip install codecov -python setup.py --version -pip install -e .[fuse] diff --git a/Vagrantfile b/Vagrantfile index d54a8c9b0..8d9fb01ad 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -317,10 +317,10 @@ def run_tests(boxname) # otherwise: just use the system python if which fakeroot 2> /dev/null; then echo "Running tox WITH fakeroot -u" - fakeroot -u tox --skip-missing-interpreters + fakeroot -u tox --skip-missing-interpreters -e py35,py36,py37,py38,py39 else echo "Running tox WITHOUT fakeroot -u" - tox --skip-missing-interpreters + tox --skip-missing-interpreters -e py35,py36,py37,py38,py39 fi EOF end diff --git a/requirements.d/fuse.txt b/requirements.d/fuse.txt index 0df0f3381..08dee4582 100644 --- a/requirements.d/fuse.txt +++ b/requirements.d/fuse.txt @@ -1,4 +1,4 @@ # low-level FUSE support library for "borg mount" # please see the comments in setup.py about llfuse. -llfuse<2.0 - +llfuse >=1.3.4, <1.3.7; python_version <"3.9" # broken on py39 +llfuse >=1.3.7, <2.0; python_version >="3.9" # broken on freebsd diff --git a/setup.py b/setup.py index b1c7daf8f..0f7dea4e1 100644 --- a/setup.py +++ b/setup.py @@ -52,17 +52,12 @@ extras_require = { # llfuse 1.2 (tested shortly, looks ok), needs FUSE version >= 2.8.0 # llfuse 1.3 (tested shortly, looks ok), needs FUSE version >= 2.8.0 # llfuse 2.0 will break API - 'fuse': ['llfuse<2.0', ], + 'fuse': [ + 'llfuse >=1.3.4, <1.3.7; python_version <"3.9"', # broken on py39 + 'llfuse >=1.3.7, <2.0; python_version >="3.9"', # broken on freebsd + ], } -if sys.platform.startswith('freebsd'): - # llfuse was frequently broken / did not build on freebsd - # llfuse 0.41.1, 1.1 are ok - extras_require['fuse'] = ['llfuse <2.0, !=0.42.*, !=0.43, !=1.0', ] - -if my_python >= (3, 7): - extras_require['fuse'][0] += ', >=1.3.4' - from setuptools import setup, find_packages, Extension from setuptools.command.sdist import sdist from distutils.command.clean import clean @@ -89,7 +84,6 @@ cython_c_sources = [ hashindex_source, item_source, checksums_source, - platform_posix_source, platform_linux_source, platform_syncfilerange_source, @@ -870,6 +864,7 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Security :: Cryptography', 'Topic :: System :: Archiving :: Backup', ], diff --git a/tox.ini b/tox.ini index 1ec50b5b3..521d9b98d 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # fakeroot -u tox --recreate [tox] -envlist = py{34,35,36,37,38},flake8 +envlist = py{34,35,36,37,38,39},flake8 [testenv] deps =