mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-10 06:03:38 +00:00
Merge pull request #7857 from ThomasWaldmann/misc-updates-1.2
misc. updates (1.2-maint)
This commit is contained in:
commit
bc553b1258
7 changed files with 29 additions and 25 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -65,7 +65,7 @@ jobs:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
toxenv: py311-fuse2
|
toxenv: py311-fuse2
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
python-version: '3.12-dev'
|
python-version: '3.12'
|
||||||
toxenv: py312-fuse3
|
toxenv: py312-fuse3
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|
7
Vagrantfile
vendored
7
Vagrantfile
vendored
|
@ -158,6 +158,7 @@ end
|
||||||
def install_pythons(boxname)
|
def install_pythons(boxname)
|
||||||
return <<-EOF
|
return <<-EOF
|
||||||
. ~/.bash_profile
|
. ~/.bash_profile
|
||||||
|
pyenv install 3.12.0 # tests, version supporting openssl 1.1
|
||||||
pyenv install 3.11.1 # tests, version supporting openssl 1.1
|
pyenv install 3.11.1 # tests, version supporting openssl 1.1
|
||||||
pyenv install 3.10.2 # tests, version supporting openssl 1.1
|
pyenv install 3.10.2 # tests, version supporting openssl 1.1
|
||||||
pyenv install 3.9.18 # tests, version supporting openssl 1.1, binary build
|
pyenv install 3.9.18 # tests, version supporting openssl 1.1, binary build
|
||||||
|
@ -226,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.9.18 3.10.2 3.11.1
|
pyenv global 3.9.18 3.10.2 3.11.1 3.12.0
|
||||||
pyenv local 3.9.18 3.10.2 3.11.1
|
pyenv local 3.9.18 3.10.2 3.11.1 3.12.0
|
||||||
fi
|
fi
|
||||||
# otherwise: just use the system python
|
# otherwise: just use the system python
|
||||||
# avoid that git complains about dubious ownership if we use fakeroot:
|
# avoid that git complains about dubious ownership if we use fakeroot:
|
||||||
|
@ -343,7 +344,7 @@ Vagrant.configure(2) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "stretch64" do |b|
|
config.vm.define "stretch64" do |b|
|
||||||
b.vm.box = "debian/stretch64"
|
b.vm.box = "generic/debian9"
|
||||||
b.vm.provider :virtualbox do |v|
|
b.vm.provider :virtualbox do |v|
|
||||||
v.memory = 1024 + $wmem
|
v.memory = 1024 + $wmem
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools", "wheel", "pkgconfig", "Cython", "setuptools_scm>=1.7,<8"]
|
requires = ["setuptools", "wheel", "pkgconfig", "Cython", "setuptools_scm>=1.7"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
setuptools==65.6.3
|
setuptools==68.2.2
|
||||||
setuptools-scm==7.1.0
|
setuptools-scm==8.0.4
|
||||||
pip==22.3.1
|
pip==23.2.1
|
||||||
virtualenv==20.17.1
|
virtualenv==20.24.5
|
||||||
pkgconfig==1.5.5
|
pkgconfig==1.5.5
|
||||||
tox==4.0.18
|
tox==4.11.3
|
||||||
pytest==7.2.0
|
pytest==7.4.2
|
||||||
pytest-xdist==3.1.0
|
pytest-xdist==3.3.1
|
||||||
pytest-cov==4.0.0
|
pytest-cov==4.1.0
|
||||||
pytest-benchmark==4.0.0
|
pytest-benchmark==4.0.0
|
||||||
Cython==0.29.36
|
Cython==0.29.36
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
setuptools >=45, !=60.6.0, !=60.7.0
|
setuptools >=45, !=60.6.0, !=60.7.0
|
||||||
setuptools_scm <8
|
setuptools_scm
|
||||||
pip
|
pip
|
||||||
virtualenv
|
virtualenv
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
|
|
@ -6,7 +6,7 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from setuptools import Command
|
from setuptools import Command
|
||||||
|
@ -460,10 +460,8 @@ class build_man(Command):
|
||||||
self.write_heading(write, description, double_sided=True)
|
self.write_heading(write, description, double_sided=True)
|
||||||
# man page metadata
|
# man page metadata
|
||||||
write(':Author: The Borg Collective')
|
write(':Author: The Borg Collective')
|
||||||
write(
|
source_date_epoch = int(os.environ.get("SOURCE_DATE_EPOCH", time.time()))
|
||||||
':Date:',
|
write(':Date:', datetime.fromtimestamp(source_date_epoch, timezone.utc).date().isoformat())
|
||||||
datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).date().isoformat(),
|
|
||||||
)
|
|
||||||
write(':Manual section: 1')
|
write(':Manual section: 1')
|
||||||
write(':Manual group: borg backup tool')
|
write(':Manual group: borg backup tool')
|
||||||
write()
|
write()
|
||||||
|
|
|
@ -1084,6 +1084,11 @@ def test_swidth_slice_mixed_characters():
|
||||||
assert swidth_slice(string, 6) == '나윤a'
|
assert swidth_slice(string, 6) == '나윤a'
|
||||||
|
|
||||||
|
|
||||||
|
def utcfromtimestamp(timestamp):
|
||||||
|
"""Returns a naive datetime instance representing the timestamp in the UTC timezone"""
|
||||||
|
return datetime.fromtimestamp(timestamp, timezone.utc).replace(tzinfo=None)
|
||||||
|
|
||||||
|
|
||||||
def test_safe_timestamps():
|
def test_safe_timestamps():
|
||||||
if SUPPORT_32BIT_PLATFORMS:
|
if SUPPORT_32BIT_PLATFORMS:
|
||||||
# ns fit into int64
|
# ns fit into int64
|
||||||
|
@ -1095,9 +1100,9 @@ def test_safe_timestamps():
|
||||||
# datetime won't fall over its y10k problem
|
# datetime won't fall over its y10k problem
|
||||||
beyond_y10k = 2 ** 100
|
beyond_y10k = 2 ** 100
|
||||||
with pytest.raises(OverflowError):
|
with pytest.raises(OverflowError):
|
||||||
datetime.utcfromtimestamp(beyond_y10k)
|
utcfromtimestamp(beyond_y10k)
|
||||||
assert datetime.utcfromtimestamp(safe_s(beyond_y10k)) > datetime(2038, 1, 1)
|
assert utcfromtimestamp(safe_s(beyond_y10k)) > datetime(2038, 1, 1)
|
||||||
assert datetime.utcfromtimestamp(safe_ns(beyond_y10k) / 1000000000) > datetime(2038, 1, 1)
|
assert utcfromtimestamp(safe_ns(beyond_y10k) / 1000000000) > datetime(2038, 1, 1)
|
||||||
else:
|
else:
|
||||||
# ns fit into int64
|
# ns fit into int64
|
||||||
assert safe_ns(2 ** 64) <= 2 ** 63 - 1
|
assert safe_ns(2 ** 64) <= 2 ** 63 - 1
|
||||||
|
@ -1108,9 +1113,9 @@ def test_safe_timestamps():
|
||||||
# datetime won't fall over its y10k problem
|
# datetime won't fall over its y10k problem
|
||||||
beyond_y10k = 2 ** 100
|
beyond_y10k = 2 ** 100
|
||||||
with pytest.raises(OverflowError):
|
with pytest.raises(OverflowError):
|
||||||
datetime.utcfromtimestamp(beyond_y10k)
|
utcfromtimestamp(beyond_y10k)
|
||||||
assert datetime.utcfromtimestamp(safe_s(beyond_y10k)) > datetime(2262, 1, 1)
|
assert utcfromtimestamp(safe_s(beyond_y10k)) > datetime(2262, 1, 1)
|
||||||
assert datetime.utcfromtimestamp(safe_ns(beyond_y10k) / 1000000000) > datetime(2262, 1, 1)
|
assert utcfromtimestamp(safe_ns(beyond_y10k) / 1000000000) > datetime(2262, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
class TestPopenWithErrorHandling:
|
class TestPopenWithErrorHandling:
|
||||||
|
|
Loading…
Add table
Reference in a new issue