Merge pull request #5987 from ThomasWaldmann/require-py38

require python 3.8+, fixes #5975
This commit is contained in:
TW 2021-10-02 21:22:04 +02:00 committed by GitHub
commit 4605078bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 28 deletions

View File

@ -51,12 +51,9 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-20.04
python-version: '3.7'
toxenv: py37-fuse2
- os: ubuntu-20.04 - os: ubuntu-20.04
python-version: '3.8' python-version: '3.8'
toxenv: py38-fuse3 toxenv: py38-fuse2
- os: ubuntu-20.04 - os: ubuntu-20.04
python-version: '3.9' python-version: '3.9'
toxenv: py39-fuse3 toxenv: py39-fuse3
@ -64,10 +61,8 @@ jobs:
python-version: '3.10-dev' python-version: '3.10-dev'
toxenv: py310-fuse3 toxenv: py310-fuse3
- os: macos-latest - os: macos-latest
# note: it seems that 3.8 and 3.9 are currently broken, python-version: '3.8'
# neverending RuntimeError crashes... toxenv: py38-fuse2
python-version: '3.7'
toxenv: py37-fuse2
env: env:
# Configure pkg-config to use OpenSSL from Homebrew # Configure pkg-config to use OpenSSL from Homebrew

19
Vagrantfile vendored
View File

@ -52,10 +52,10 @@ def packages_freebsd
pkg install -y fusefs-libs || true pkg install -y fusefs-libs || true
pkg install -y fusefs-libs3 || true pkg install -y fusefs-libs3 || true
pkg install -y git bash # fakeroot causes lots of troubles on freebsd pkg install -y git bash # fakeroot causes lots of troubles on freebsd
# for building python: # for building python (for the tests we use pyenv built pythons):
pkg install -y python37 py37-sqlite3 py37-virtualenv py37-pip pkg install -y python38 py38-sqlite3 py38-virtualenv py38-pip
# make sure there is a python3 command # make sure there is a python3 command
ln -sf /usr/local/bin/python3.7 /usr/local/bin/python3 ln -sf /usr/local/bin/python3.8 /usr/local/bin/python3
# make bash default / work: # make bash default / work:
chsh -s bash vagrant chsh -s bash vagrant
mount -t fdescfs fdesc /dev/fd mount -t fdescfs fdesc /dev/fd
@ -129,12 +129,10 @@ def packages_openindiana
return <<-EOF return <<-EOF
# needs separate provisioning step + reboot: # needs separate provisioning step + reboot:
#pkg update #pkg update
# already installed: #pkg install gcc-7 python-39 setuptools-39
#pkg install python-37 python-35 virtualenv-35 pip-35 clang-40 lz4 zstd git ln -sf /usr/bin/python3.9 /usr/bin/python3
pkg install gcc-7
ln -sf /usr/bin/python3.7 /usr/bin/python3
python3 -m ensurepip python3 -m ensurepip
ln -sf /usr/bin/pip3.7 /usr/bin/pip3 ln -sf /usr/bin/pip3.9 /usr/bin/pip3
pip3 install virtualenv pip3 install virtualenv
EOF EOF
end end
@ -164,7 +162,6 @@ def install_pythons(boxname)
pyenv install 3.10-dev # tests, version supporting openssl 1.1 pyenv install 3.10-dev # tests, version supporting openssl 1.1
pyenv install 3.9.7 # tests, version supporting openssl 1.1, binary build pyenv install 3.9.7 # tests, version supporting openssl 1.1, binary build
pyenv install 3.8.0 # tests, version supporting openssl 1.1 pyenv install 3.8.0 # tests, version supporting openssl 1.1
pyenv install 3.7.0 # tests, version supporting openssl 1.1
pyenv rehash pyenv rehash
EOF EOF
end end
@ -232,8 +229,8 @@ def run_tests(boxname, skip_env)
. ../borg-env/bin/activate . ../borg-env/bin/activate
if which pyenv 2> /dev/null; then if which pyenv 2> /dev/null; then
# for testing, use the earliest point releases of the supported python versions: # for testing, use the earliest point releases of the supported python versions:
pyenv global 3.7.0 3.8.0 3.9.7 3.10-dev pyenv global 3.8.0 3.9.7 3.10-dev
pyenv local 3.7.0 3.8.0 3.9.7 3.10-dev pyenv local 3.8.0 3.9.7 3.10-dev
fi fi
# otherwise: just use the system python # otherwise: just use the system python
# some OSes can only run specific test envs, e.g. because they miss FUSE support: # some OSes can only run specific test envs, e.g. because they miss FUSE support:

View File

@ -182,7 +182,7 @@ Some more advanced examples::
# verify a changed tox.ini (run this after any change to tox.ini): # verify a changed tox.ini (run this after any change to tox.ini):
fakeroot -u tox --recreate fakeroot -u tox --recreate
fakeroot -u tox -e py37 # run all tests, but only on python 3.7 fakeroot -u tox -e py38 # run all tests, but only on python 3.8
fakeroot -u tox borg.testsuite.locking # only run 1 test module fakeroot -u tox borg.testsuite.locking # only run 1 test module

View File

@ -271,7 +271,6 @@ setup(
'Operating System :: POSIX :: Linux', 'Operating System :: POSIX :: Linux',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.10',
@ -299,5 +298,5 @@ setup(
setup_requires=['setuptools_scm>=1.7'], setup_requires=['setuptools_scm>=1.7'],
install_requires=install_requires, install_requires=install_requires,
extras_require=extras_require, extras_require=extras_require,
python_requires='>=3.7', python_requires='>=3.8',
) )

View File

@ -79,11 +79,7 @@ def sysinfo():
except AttributeError: except AttributeError:
uname = None uname = None
if sys.platform.startswith('linux'): if sys.platform.startswith('linux'):
try: linux_distribution = ('Unknown Linux', '', '')
linux_distribution = platform.linux_distribution() # noqa
except:
# platform.linux_distribution() is deprecated since py 3.5 and removed in 3.7.
linux_distribution = ('Unknown Linux', '', '')
else: else:
linux_distribution = None linux_distribution = None
try: try:

View File

@ -2,7 +2,7 @@
# fakeroot -u tox --recreate # fakeroot -u tox --recreate
[tox] [tox]
envlist = py{37,38,39,310}-{none,fuse2,fuse3} envlist = py{38,39,310}-{none,fuse2,fuse3}
minversion = 3.2 minversion = 3.2
requires = requires =
pkgconfig pkgconfig