浏览代码

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 年之前
父节点
当前提交
a5c6a50ebe
共有 11 个文件被更改,包括 30 次插入30 次删除
  1. 1 9
      .travis.yml
  2. 0 4
      .travis/install.sh
  3. 5 3
      Vagrantfile
  4. 10 0
      docs/changes.rst
  5. 2 2
      docs/development.rst
  6. 6 6
      docs/installation.rst
  7. 1 1
      docs/usage_general.rst.inc
  8. 1 2
      setup.py
  9. 2 2
      src/borg/archiver.py
  10. 1 0
      src/borg/helpers.py
  11. 1 1
      tox.ini

+ 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.
 matrix:
     include:
-        - python: 3.4
-          os: linux
-          dist: trusty
-          env: TOXENV=py34
         - python: 3.5.2
           os: linux
           dist: trusty
@@ -21,7 +17,7 @@ matrix:
           os: linux
           dist: trusty
           env: TOXENV=py36
-        - python: 3.4
+        - python: 3.5.2
           os: linux
           dist: trusty
           env: TOXENV=flake8
@@ -29,10 +25,6 @@ matrix:
           os: linux
           dist: trusty
           env: TOXENV=py36
-        - language: generic
-          os: osx
-          osx_image: xcode6.4
-          env: TOXENV=py34
         - language: generic
           os: osx
           osx_image: xcode6.4

+ 0 - 4
.travis/install.sh

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

+ 5 - 3
Vagrantfile

@@ -128,6 +128,7 @@ def packages_openbsd
     pkg_add lz4
     pkg_add git  # no fakeroot
     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/python
     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 fuse  # llfuse supports netbsd, but is still buggy.
     # 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
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python
     ln -s /usr/pkg/bin/python3.4 /usr/pkg/bin/python3
@@ -164,6 +166,7 @@ end
 def packages_openindiana
   return <<-EOF
     #pkg update  # XXX needs separate provisioning step + reboot
+    # TODO python 3.5 or 3.6
     pkg install python-34 clang-3.4 lz4 git
     python3 -m ensurepip
     pip3 install -U setuptools pip wheel virtualenv
@@ -246,7 +249,6 @@ end
 def install_pythons(boxname)
   return <<-EOF
     . ~/.bash_profile
-    pyenv install 3.4.0  # tests
     pyenv install 3.5.0  # tests
     pyenv install 3.6.0  # tests
     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
     if which pyenv 2> /dev/null; then
       # 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
     # otherwise: just use the system python
     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
 =========
 
+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)
 -----------------------------
 

+ 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):
   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
 
@@ -315,7 +315,7 @@ Checklist:
 - check version number of upcoming release in ``CHANGES.rst``
 - verify that ``MANIFEST.in`` and ``setup.py`` are complete
 - ``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
   <https://github.com/borgbackup/borg/issues/2123>`_)
 - 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
 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
   optional install.
 * OpenSSL_ >= 1.0.0, plus development headers.
@@ -181,7 +181,7 @@ group, log out and log in again.
 Fedora / Korora
 +++++++++++++++
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 Install the dependencies with development headers::
 
@@ -196,7 +196,7 @@ Install the dependencies with development headers::
 openSUSE Tumbleweed / Leap
 ++++++++++++++++++++++++++
 
-.. todo:: Add zeromq
+.. todo:: Add zeromq, use python 3.5 or 3.6
 
 Install the dependencies automatically using zypper::
 
@@ -213,7 +213,7 @@ Alternatively, you can enumerate all build dependencies in the command line::
 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
 dependencies::
@@ -231,7 +231,7 @@ FUSE for OS X, which is available as a pre-release_.
 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,
 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
     (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::
 

+ 1 - 1
docs/usage_general.rst.inc

@@ -215,7 +215,7 @@ Please note:
   (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:
 

+ 1 - 2
setup.py

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

+ 2 - 2
src/borg/archiver.py

@@ -2022,11 +2022,11 @@ class Archiver:
 
         {now}
             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}
             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}
             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:
     from os import scandir
 except ImportError:
+    # TODO: we removed official support for Python 3.4, so we could drop this.
     try:
         # Try python-scandir on Python 3.4
         from scandir import scandir

+ 1 - 1
tox.ini

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