Przeglądaj źródła

increase Python minimum requirement to 3.5.0

also:
- drop testing on 3.4
- add some TODO for the docs and vagrant machines
Thomas Waldmann 7 lat temu
rodzic
commit
a5c6a50ebe

+ 1 - 9
.travis.yml

@@ -9,10 +9,6 @@ cache:
 # note: use py 3.5.2, it has lzma support. 3.5(.0) on travis.org/trusty does not.
 # note: use py 3.5.2, it has lzma support. 3.5(.0) on travis.org/trusty does not.
 matrix:
 matrix:
     include:
     include:
-        - python: 3.4
-          os: linux
-          dist: trusty
-          env: TOXENV=py34
         - python: 3.5.2
         - python: 3.5.2
           os: linux
           os: linux
           dist: trusty
           dist: trusty
@@ -21,7 +17,7 @@ matrix:
           os: linux
           os: linux
           dist: trusty
           dist: trusty
           env: TOXENV=py36
           env: TOXENV=py36
-        - python: 3.4
+        - python: 3.5.2
           os: linux
           os: linux
           dist: trusty
           dist: trusty
           env: TOXENV=flake8
           env: TOXENV=flake8
@@ -29,10 +25,6 @@ matrix:
           os: linux
           os: linux
           dist: trusty
           dist: trusty
           env: TOXENV=py36
           env: TOXENV=py36
-        - language: generic
-          os: osx
-          osx_image: xcode6.4
-          env: TOXENV=py34
         - language: generic
         - language: generic
           os: osx
           os: osx
           osx_image: xcode6.4
           osx_image: xcode6.4

+ 0 - 4
.travis/install.sh

@@ -21,10 +21,6 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
     brew install Caskroom/cask/osxfuse
     brew install Caskroom/cask/osxfuse
 
 
     case "${TOXENV}" in
     case "${TOXENV}" in
-        py34)
-            pyenv install 3.4.5
-            pyenv global 3.4.5
-            ;;
         py35)
         py35)
             pyenv install 3.5.2
             pyenv install 3.5.2
             pyenv global 3.5.2
             pyenv global 3.5.2

+ 5 - 3
Vagrantfile

@@ -128,6 +128,7 @@ def packages_openbsd
     pkg_add lz4
     pkg_add lz4
     pkg_add git  # no fakeroot
     pkg_add git  # no fakeroot
     pkg_add py3-setuptools
     pkg_add py3-setuptools
+    # TODO: python 3.5 or 3.6
     ln -sf /usr/local/bin/python3.4 /usr/local/bin/python3
     ln -sf /usr/local/bin/python3.4 /usr/local/bin/python3
     ln -sf /usr/local/bin/python3.4 /usr/local/bin/python
     ln -sf /usr/local/bin/python3.4 /usr/local/bin/python
     easy_install-3.4 pip
     easy_install-3.4 pip
@@ -152,6 +153,7 @@ def packages_netbsd
     pkg_add pkg-config  # avoids some "pkg-config missing" error msg, even without fuse pkg
     pkg_add pkg-config  # avoids some "pkg-config missing" error msg, even without fuse pkg
     # 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
+    # TODO: python 3.5 or 3.6
     pkg_add python34 py34-setuptools
     pkg_add python34 py34-setuptools
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python3
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python3
@@ -164,6 +166,7 @@ end
 def packages_openindiana
 def packages_openindiana
   return <<-EOF
   return <<-EOF
     #pkg update  # XXX needs separate provisioning step + reboot
     #pkg update  # XXX needs separate provisioning step + reboot
+    # TODO python 3.5 or 3.6
     pkg install python-34 clang-3.4 lz4 git
     pkg install python-34 clang-3.4 lz4 git
     python3 -m ensurepip
     python3 -m ensurepip
     pip3 install -U setuptools pip wheel virtualenv
     pip3 install -U setuptools pip wheel virtualenv
@@ -246,7 +249,6 @@ end
 def install_pythons(boxname)
 def install_pythons(boxname)
   return <<-EOF
   return <<-EOF
     . ~/.bash_profile
     . ~/.bash_profile
-    pyenv install 3.4.0  # tests
     pyenv install 3.5.0  # tests
     pyenv install 3.5.0  # tests
     pyenv install 3.6.0  # tests
     pyenv install 3.6.0  # tests
     pyenv install 3.5.3  # binary build, use latest 3.5.x release
     pyenv install 3.5.3  # binary build, use latest 3.5.x release
@@ -330,8 +332,8 @@ def run_tests(boxname)
     . ../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.4.0 3.5.0 3.6.0
-      pyenv local 3.4.0 3.5.0 3.6.0
+      pyenv global 3.5.0 3.6.0
+      pyenv local 3.5.0 3.6.0
     fi
     fi
     # otherwise: just use the system python
     # otherwise: just use the system python
     if which fakeroot 2> /dev/null; then
     if which fakeroot 2> /dev/null; then

+ 10 - 0
docs/changes.rst

@@ -131,6 +131,16 @@ The best check that everything is ok is to run a dry-run extraction::
 Changelog
 Changelog
 =========
 =========
 
 
+Version 1.2.0dev0 (not released yet)
+------------------------------------
+
+Compatibility notes:
+
+- dropped support and testing for Python 3.4, minimum requirement is 3.5.0.
+  In case your OS does not provide Python >= 3.5, consider using our binary,
+  which does not need an external Python interpreter.
+
+
 Version 1.1.0rc1 (2017-07-24)
 Version 1.1.0rc1 (2017-07-24)
 -----------------------------
 -----------------------------
 
 

+ 2 - 2
docs/development.rst

@@ -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 py34  # run all tests, but only on python 3.4
+  fakeroot -u tox -e py35  # run all tests, but only on python 3.5
 
 
   fakeroot -u tox borg.testsuite.locking  # only run 1 test module
   fakeroot -u tox borg.testsuite.locking  # only run 1 test module
 
 
@@ -315,7 +315,7 @@ Checklist:
 - check version number of upcoming release in ``CHANGES.rst``
 - check version number of upcoming release in ``CHANGES.rst``
 - verify that ``MANIFEST.in`` and ``setup.py`` are complete
 - verify that ``MANIFEST.in`` and ``setup.py`` are complete
 - ``python setup.py build_usage ; python setup.py build_man`` and
 - ``python setup.py build_usage ; python setup.py build_man`` and
-  commit (be sure to build with Python 3.4 or 3.5 as Python 3.6 added `more
+  commit (be sure to build with Python 3.5 as Python 3.6 added `more
   guaranteed hashing algorithms
   guaranteed hashing algorithms
   <https://github.com/borgbackup/borg/issues/2123>`_)
   <https://github.com/borgbackup/borg/issues/2123>`_)
 - tag the release::
 - tag the release::

+ 6 - 6
docs/installation.rst

@@ -136,7 +136,7 @@ Dependencies
 To install |project_name| from a source package (including pip), you have to install the
 To install |project_name| from a source package (including pip), you have to install the
 following dependencies first:
 following dependencies first:
 
 
-* `Python 3`_ >= 3.4.0, plus development headers. Even though Python 3 is not
+* `Python 3`_ >= 3.5.0, plus development headers. Even though Python 3 is not
   the default Python version on most systems, it is usually available as an
   the default Python version on most systems, it is usually available as an
   optional install.
   optional install.
 * OpenSSL_ >= 1.0.0, plus development headers.
 * OpenSSL_ >= 1.0.0, plus development headers.
@@ -181,7 +181,7 @@ group, log out and log in again.
 Fedora / Korora
 Fedora / Korora
 +++++++++++++++
 +++++++++++++++
 
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 
 Install the dependencies with development headers::
 Install the dependencies with development headers::
 
 
@@ -196,7 +196,7 @@ Install the dependencies with development headers::
 openSUSE Tumbleweed / Leap
 openSUSE Tumbleweed / Leap
 ++++++++++++++++++++++++++
 ++++++++++++++++++++++++++
 
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 
 Install the dependencies automatically using zypper::
 Install the dependencies automatically using zypper::
 
 
@@ -213,7 +213,7 @@ Alternatively, you can enumerate all build dependencies in the command line::
 Mac OS X
 Mac OS X
 ++++++++
 ++++++++
 
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 
 Assuming you have installed homebrew_, the following steps will install all the
 Assuming you have installed homebrew_, the following steps will install all the
 dependencies::
 dependencies::
@@ -231,7 +231,7 @@ FUSE for OS X, which is available as a pre-release_.
 FreeBSD
 FreeBSD
 ++++++++
 ++++++++
 
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 
 Listed below are packages you will need to install Borg, its dependencies,
 Listed below are packages you will need to install Borg, its dependencies,
 and commands to make FUSE work for using the mount command.
 and commands to make FUSE work for using the mount command.
@@ -264,7 +264,7 @@ Cygwin
     Running under Cygwin is experimental and has only been tested with Cygwin
     Running under Cygwin is experimental and has only been tested with Cygwin
     (x86-64) v2.5.2. Remote repositories are known broken, local repositories should work.
     (x86-64) v2.5.2. Remote repositories are known broken, local repositories should work.
 
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 
 Use the Cygwin installer to install the dependencies::
 Use the Cygwin installer to install the dependencies::
 
 

+ 1 - 1
docs/usage_general.rst.inc

@@ -215,7 +215,7 @@ Please note:
   (e.g. mode 600, root:root).
   (e.g. mode 600, root:root).
 
 
 
 
-.. _INI: https://docs.python.org/3.4/library/logging.config.html#configuration-file-format
+.. _INI: https://docs.python.org/3.5/library/logging.config.html#configuration-file-format
 
 
 .. _file-systems:
 .. _file-systems:
 
 

+ 1 - 2
setup.py

@@ -764,7 +764,7 @@ setup(
     license='BSD',
     license='BSD',
     platforms=['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD', ],
     platforms=['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD', ],
     classifiers=[
     classifiers=[
-        'Development Status :: 4 - Beta',
+        'Development Status :: 2 - Pre-Alpha',
         'Environment :: Console',
         'Environment :: Console',
         'Intended Audience :: System Administrators',
         'Intended Audience :: System Administrators',
         'License :: OSI Approved :: BSD License',
         'License :: OSI Approved :: BSD License',
@@ -775,7 +775,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.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.6',
         'Topic :: Security :: Cryptography',
         'Topic :: Security :: Cryptography',

+ 2 - 2
src/borg/archiver.py

@@ -2022,11 +2022,11 @@ class Archiver:
 
 
         {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.4/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.5/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.4/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.5/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.

+ 1 - 0
src/borg/helpers.py

@@ -2022,6 +2022,7 @@ def scandir_generic(path='.'):
 try:
 try:
     from os import scandir
     from os import scandir
 except ImportError:
 except ImportError:
+    # TODO: we removed official support for Python 3.4, so we could drop this.
     try:
     try:
         # Try python-scandir on Python 3.4
         # Try python-scandir on Python 3.4
         from scandir import scandir
         from scandir import scandir

+ 1 - 1
tox.ini

@@ -2,7 +2,7 @@
 # fakeroot -u tox --recreate
 # fakeroot -u tox --recreate
 
 
 [tox]
 [tox]
-envlist = py{34,35,36},flake8
+envlist = py{35,36},flake8
 
 
 [testenv]
 [testenv]
 deps =
 deps =