mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 06:01:54 +00:00
Merge pull request #6363 from ThomasWaldmann/require-py39
require python >= 3.9, fixes #6315
This commit is contained in:
commit
d1bcea9e61
7 changed files with 24 additions and 26 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.9
|
||||||
- name: Lint with flake8
|
- name: Lint with flake8
|
||||||
run: |
|
run: |
|
||||||
pip install flake8
|
pip install flake8
|
||||||
|
@ -51,18 +51,15 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
|
||||||
python-version: '3.8'
|
|
||||||
toxenv: py38-fuse2
|
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
toxenv: py39-fuse3
|
toxenv: py39-fuse2
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
toxenv: py310-fuse3
|
toxenv: py310-fuse3
|
||||||
- os: macos-10.15 # macos-latest is macos 11.6.2 and hanging at test_fuse, #6099
|
- os: macos-10.15 # macos-latest is macos 11.6.2 and hanging at test_fuse, #6099
|
||||||
python-version: '3.8'
|
python-version: '3.9'
|
||||||
toxenv: py38-fuse2
|
toxenv: py39-fuse2
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Configure pkg-config to use OpenSSL from Homebrew
|
# Configure pkg-config to use OpenSSL from Homebrew
|
||||||
|
|
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
|
@ -33,7 +33,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
|
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
|
|
15
Vagrantfile
vendored
15
Vagrantfile
vendored
|
@ -42,9 +42,11 @@ def packages_freebsd
|
||||||
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 the tests we use pyenv built pythons):
|
# for building python (for the tests we use pyenv built pythons):
|
||||||
pkg install -y python38 py38-sqlite3 py38-virtualenv py38-pip
|
pkg install -y python39 py39-sqlite3
|
||||||
# make sure there is a python3 command
|
# make sure there is a python3 command
|
||||||
ln -sf /usr/local/bin/python3.8 /usr/local/bin/python3
|
ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
|
||||||
|
python3 -m ensurepip
|
||||||
|
pip3 install virtualenv
|
||||||
# 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
|
||||||
|
@ -91,8 +93,6 @@ def packages_netbsd
|
||||||
pkg_add pkg-config
|
pkg_add pkg-config
|
||||||
# pkg_add fuse # llfuse supports netbsd, but is still buggy.
|
# pkg_add fuse # llfuse supports netbsd, but is still buggy.
|
||||||
# https://bitbucket.org/nikratio/python-llfuse/issues/70/perfuse_open-setsockopt-no-buffer-space
|
# https://bitbucket.org/nikratio/python-llfuse/issues/70/perfuse_open-setsockopt-no-buffer-space
|
||||||
pkg_add python38 py38-sqlite3 py38-pip py38-virtualenv py38-expat
|
|
||||||
ln -s /usr/pkg/lib/python3.8/_sysconfigdata_netbsd9.py /usr/pkg/lib/python3.8/_sysconfigdata__netbsd9_.py # bug in netbsd 9.2, expected filename not there.
|
|
||||||
pkg_add python39 py39-sqlite3 py39-pip py39-virtualenv py39-expat
|
pkg_add python39 py39-sqlite3 py39-pip py39-virtualenv py39-expat
|
||||||
ln -s /usr/pkg/bin/python3.9 /usr/pkg/bin/python
|
ln -s /usr/pkg/bin/python3.9 /usr/pkg/bin/python
|
||||||
ln -s /usr/pkg/bin/python3.9 /usr/pkg/bin/python3
|
ln -s /usr/pkg/bin/python3.9 /usr/pkg/bin/python3
|
||||||
|
@ -159,7 +159,6 @@ def install_pythons(boxname)
|
||||||
. ~/.bash_profile
|
. ~/.bash_profile
|
||||||
pyenv install 3.10.0 # tests, version supporting openssl 1.1
|
pyenv install 3.10.0 # tests, version supporting openssl 1.1
|
||||||
pyenv install 3.9.10 # tests, version supporting openssl 1.1, binary build
|
pyenv install 3.9.10 # tests, version supporting openssl 1.1, binary build
|
||||||
pyenv install 3.8.0 # tests, version supporting openssl 1.1
|
|
||||||
pyenv rehash
|
pyenv rehash
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
@ -228,8 +227,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.8.0 3.9.10 3.10.0
|
pyenv global 3.9.10 3.10.0
|
||||||
pyenv local 3.8.0 3.9.10 3.10.0
|
pyenv local 3.9.10 3.10.0
|
||||||
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:
|
||||||
|
@ -423,6 +422,6 @@ Vagrant.configure(2) do |config|
|
||||||
b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("openindiana64", ".*fuse.*")
|
b.vm.provision "run tests", :type => :shell, :privileged => false, :inline => run_tests("openindiana64", ".*fuse.*")
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: create more VMs with python 3.8+ and openssl 1.1 or 3.0.
|
# TODO: create more VMs with python 3.9+ and openssl 1.1 or 3.0.
|
||||||
# See branch 1.1-maint for a better equipped Vagrantfile (but still on py35 and openssl 1.0).
|
# See branch 1.1-maint for a better equipped Vagrantfile (but still on py35 and openssl 1.0).
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 py38 # run all tests, but only on python 3.8
|
fakeroot -u tox -e py39 # run all tests, but only on python 3.9
|
||||||
|
|
||||||
fakeroot -u tox borg.testsuite.locking # only run 1 test module
|
fakeroot -u tox borg.testsuite.locking # only run 1 test module
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ Dependencies
|
||||||
To install Borg from a source package (including pip), you have to install the
|
To install Borg from a source package (including pip), you have to install the
|
||||||
following dependencies first:
|
following dependencies first:
|
||||||
|
|
||||||
* `Python 3`_ >= 3.8.0 (interpreter plus development headers)
|
* `Python 3`_ >= 3.9.0, plus development headers.
|
||||||
* Libraries (library plus development headers):
|
* Libraries (library plus development headers):
|
||||||
|
|
||||||
- OpenSSL_ >= 1.1.1
|
- OpenSSL_ >= 1.1.1
|
||||||
|
@ -395,9 +395,9 @@ If you need to use a different version of Python you can install this using ``py
|
||||||
|
|
||||||
...
|
...
|
||||||
# create a virtual environment
|
# create a virtual environment
|
||||||
pyenv install 3.8.0 # minimum, preferably use something more recent!
|
pyenv install 3.9.0 # minimum, preferably use something more recent!
|
||||||
pyenv global 3.8.0
|
pyenv global 3.9.0
|
||||||
pyenv local 3.8.0
|
pyenv local 3.9.0
|
||||||
virtualenv --python=${pyenv which python} borg-env
|
virtualenv --python=${pyenv which python} borg-env
|
||||||
source borg-env/bin/activate # always before using!
|
source borg-env/bin/activate # always before using!
|
||||||
...
|
...
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -260,7 +260,6 @@ def members_appended(*ds):
|
||||||
'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.8',
|
|
||||||
'Programming Language :: Python :: 3.9',
|
'Programming Language :: Python :: 3.9',
|
||||||
'Programming Language :: Python :: 3.10',
|
'Programming Language :: Python :: 3.10',
|
||||||
'Topic :: Security :: Cryptography',
|
'Topic :: Security :: Cryptography',
|
||||||
|
@ -287,5 +286,5 @@ def members_appended(*ds):
|
||||||
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.8',
|
python_requires='>=3.9',
|
||||||
)
|
)
|
||||||
|
|
|
@ -2457,11 +2457,11 @@ def do_break_lock(self, args, repository):
|
||||||
|
|
||||||
{now}
|
{now}
|
||||||
The current local date and time, by default in ISO-8601 format.
|
The current local date and time, by default in ISO-8601 format.
|
||||||
You can also supply your own `format string <https://docs.python.org/3.8/library/datetime.html#strftime-and-strptime-behavior>`_, e.g. {now:%Y-%m-%d_%H:%M:%S}
|
You can also supply your own `format string <https://docs.python.org/3.9/library/datetime.html#strftime-and-strptime-behavior>`_, e.g. {now:%Y-%m-%d_%H:%M:%S}
|
||||||
|
|
||||||
{utcnow}
|
{utcnow}
|
||||||
The current UTC date and time, by default in ISO-8601 format.
|
The current UTC date and time, by default in ISO-8601 format.
|
||||||
You can also supply your own `format string <https://docs.python.org/3.8/library/datetime.html#strftime-and-strptime-behavior>`_, e.g. {utcnow:%Y-%m-%d_%H:%M:%S}
|
You can also supply your own `format string <https://docs.python.org/3.9/library/datetime.html#strftime-and-strptime-behavior>`_, e.g. {utcnow:%Y-%m-%d_%H:%M:%S}
|
||||||
|
|
||||||
{user}
|
{user}
|
||||||
The user name (or UID, if no name is available) of the user running borg.
|
The user name (or UID, if no name is available) of the user running borg.
|
||||||
|
@ -4300,7 +4300,7 @@ def define_borg_mount(parser):
|
||||||
+++++++++++++++++++++++++++
|
+++++++++++++++++++++++++++
|
||||||
|
|
||||||
The ``--format`` option uses python's `format string syntax
|
The ``--format`` option uses python's `format string syntax
|
||||||
<https://docs.python.org/3.8/library/string.html#formatstrings>`_.
|
<https://docs.python.org/3.9/library/string.html#formatstrings>`_.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
::
|
::
|
||||||
|
|
Loading…
Reference in a new issue