[Python-modules-commits] [python-future] 02/03: merge patched into master

Ondřej Nový onovy at moszumanska.debian.org
Fri Sep 23 11:58:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

onovy pushed a commit to branch master
in repository python-future.

commit 3cf82ba82e4e23afc95a0fec30bb2d419f79fc80
Merge: c6ff02e 0bcd681
Author: Ondřej Nový <onovy at debian.org>
Date:   Fri Sep 23 13:53:41 2016 +0200

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 ...Fixed-bytes-unit-tests-fail-on-Python-3.5.patch | 55 ++++++++++++++++++++++
 debian/patches/do-not-use-bootstrap.patch          |  4 +-
 debian/patches/fix-tests-python3.5.patch           |  2 +-
 debian/patches/remove-configparser-module.patch    |  6 +--
 .../patches/removes-privacy-breach-in-docs.patch   |  4 +-
 debian/patches/series                              |  1 +
 tests/test_future/test_bytes.py                    | 10 ++--
 8 files changed, 72 insertions(+), 14 deletions(-)

diff --cc debian/.git-dpm
index 216cec1,0000000..2abeb8a
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 1c13f543c652141f38fb8f13ea264c548d7079c5
- 1c13f543c652141f38fb8f13ea264c548d7079c5
++0bcd681b0a83d8a6500def6b594aec3cb07d5a47
++0bcd681b0a83d8a6500def6b594aec3cb07d5a47
 +a221055395c07bbd060ef683775843da55465485
 +a221055395c07bbd060ef683775843da55465485
 +python-future_0.15.2.orig.tar.gz
 +431bf8ff160e8e785a2f76c3e57c1b6c2b13b41a
 +1583441
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/0005-Fixed-bytes-unit-tests-fail-on-Python-3.5.patch
index 0000000,0000000..f0d5b86
new file mode 100644
--- /dev/null
+++ b/debian/patches/0005-Fixed-bytes-unit-tests-fail-on-Python-3.5.patch
@@@ -1,0 -1,0 +1,55 @@@
++From 0bcd681b0a83d8a6500def6b594aec3cb07d5a47 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= <onovy at debian.org>
++Date: Fri, 23 Sep 2016 13:52:43 +0200
++Subject: Fixed bytes unit tests fail on Python 3.5
++
++Forwarded: https://github.com/PythonCharmers/python-future/pull/243
++---
++ tests/test_future/test_bytes.py | 10 ++++++----
++ 1 file changed, 6 insertions(+), 4 deletions(-)
++
++diff --git a/tests/test_future/test_bytes.py b/tests/test_future/test_bytes.py
++index f30e740..7413e1f 100644
++--- a/tests/test_future/test_bytes.py
+++++ b/tests/test_future/test_bytes.py
++@@ -7,6 +7,8 @@ from __future__ import absolute_import, unicode_literals, print_function
++ from future.builtins import *
++ from future import utils
++ 
+++import sys
+++
++ from numbers import Integral
++ from future.tests.base import unittest, expectedFailurePY2
++ 
++@@ -534,13 +536,14 @@ class TestBytes(unittest.TestCase):
++         self.assertRaises(ValueError, bytes.maketrans, b'abc', b'xyzq')
++         self.assertRaises(TypeError, bytes.maketrans, 'abc', 'def')
++ 
++-    @unittest.expectedFailure
++     def test_mod(self):
++         """
++         From Py3.5 test suite (post-PEP 461).
++ 
++         The bytes mod code is in _PyBytes_Format() in bytesobject.c in Py3.5.
++         """
+++        if sys.version_info[:2] < (3, 5):
+++            raise unittest.SkipTest('bytes % not yet implemented on Py < 3.5')
++         b = b'hello, %b!'
++         orig = b
++         b = b % b'world'
++@@ -551,13 +554,12 @@ class TestBytes(unittest.TestCase):
++         a = b % (b'seventy-nine', 79)
++         self.assertEqual(a, b'seventy-nine / 100 = 79%')
++ 
++-    @unittest.expectedFailure
++     def test_imod(self):
++         """
++         From Py3.5 test suite (post-PEP 461)
++         """
++-        # if (3, 0) <= sys.version_info[:2] < (3, 5):
++-        #     raise unittest.SkipTest('bytes % not yet implemented on Py3.0-3.4')
+++        if sys.version_info[:2] < (3, 5):
+++            raise unittest.SkipTest('bytes % not yet implemented on Py < 3.5')
++         b = bytes(b'hello, %b!')
++         orig = b
++         b %= b'world'
diff --cc debian/patches/do-not-use-bootstrap.patch
index 25aef26,0000000..84a106d
mode 100644,000000..100644
--- a/debian/patches/do-not-use-bootstrap.patch
+++ b/debian/patches/do-not-use-bootstrap.patch
@@@ -1,115 -1,0 +1,115 @@@
 +From 9cdb08a0d6fbce2b8621b3e3296045512d26e7c2 Mon Sep 17 00:00:00 2001
 +From: Thomas Goirand <zigo at debian.org>
 +Date: Tue, 15 Sep 2015 18:30:11 -0400
 +Subject: Do not use the bootstrap sphinx theme
 +
 + This patch removes the use of the bootstrap sphinx theme which isn't yet in
 + Debian (and for which I have no time to work on).
 +Forwarded: not-needed
 +Last-Update: 2015-04-10
 +
 +Patch-Name: do-not-use-bootstrap.patch
 +---
 + docs/_templates/sidebartoc.html |  2 +-
 + docs/conf.py                    | 74 -----------------------------------------
 + 2 files changed, 1 insertion(+), 75 deletions(-)
 +
 +diff --git a/docs/_templates/sidebartoc.html b/docs/_templates/sidebartoc.html
- index 0d119afcefac..2edf636db8d2 100644
++index 0d119af..2edf636 100644
 +--- a/docs/_templates/sidebartoc.html
 ++++ b/docs/_templates/sidebartoc.html
 +@@ -1 +1 @@
 +-{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
 ++{{ toctree(maxdepth=toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
 +diff --git a/docs/conf.py b/docs/conf.py
- index 67e92a8069d9..df36abee0208 100644
++index 67e92a8..df36abe 100644
 +--- a/docs/conf.py
 ++++ b/docs/conf.py
 +@@ -14,7 +14,6 @@
 + from __future__ import absolute_import, print_function
 + import sys, os
 + from future import __version__
 +-import sphinx_bootstrap_theme
 + 
 + # If extensions (or modules to document with autodoc) are in another directory,
 + # add these directories to sys.path here. If the directory is relative to the
 +@@ -98,79 +97,6 @@ pygments_style = 'sphinx'  # 'futureext.FutureStyle'
 + 
 + 
 + # -- Options for HTML output ---------------------------------------------------
 +-
 +-# The theme to use for HTML and HTML Help pages.  See the documentation for
 +-# a list of builtin themes.
 +-html_theme = 'bootstrap'
 +-html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
 +-
 +-# Theme options are theme-specific and customize the look and feel of a theme
 +-# further.  For a list of options available for each theme, see the
 +-# documentation.
 +-html_theme_options = {
 +-    # Navigation bar title. (Default: ``project`` value)
 +-    #'navbar_title': "Python-Future",
 +-
 +-    # Tab name for entire site. (Default: "Site")
 +-    'navbar_site_name': "Contents",
 +-
 +-    # A list of tuples containing pages or urls to link to.
 +-    # Valid tuples should be in the following forms:
 +-    #    (name, page)                 # a link to a page
 +-    #    (name, "/aa/bb", 1)          # a link to an arbitrary relative url
 +-    #    (name, "http://example.com", True) # arbitrary absolute url
 +-    # Note the "1" or "True" value above as the third argument to indicate
 +-    # an arbitrary url.
 +-    'navbar_links': [
 +-        ("Overview", "overview"),
 +-        ("Cheat Sheet", "compatible_idioms.html", True),
 +-        ("FAQ", "faq.html", True),
 +-        # ("Link", "http://example.com", True),
 +-    ],
 +-
 +-    # Render the next and previous page links in navbar. (Default: true)
 +-    'navbar_sidebarrel': False,
 +-
 +-    # Render the current pages TOC in the navbar. (Default: true)
 +-    'navbar_pagenav': True,
 +-
 +-    # Global TOC depth for "site" navbar tab. (Default: 1)
 +-    # Switching to -1 shows all levels.
 +-    'globaltoc_depth': 3,
 +-
 +-    # Include hidden TOCs in Site navbar?
 +-    #
 +-    # Note: If this is "false", you cannot have mixed ``:hidden:`` and
 +-    # non-hidden ``toctree`` directives in the same page, or else the build
 +-    # will break.
 +-    #
 +-    # Values: "true" (default) or "false"
 +-    'globaltoc_includehidden': "true",
 +-
 +-    # HTML navbar class (Default: "navbar") to attach to <div> element.
 +-    # For black navbar, do "navbar navbar-inverse"
 +-    'navbar_class': "navbar navbar-inverse",
 +-
 +-    # Fix navigation bar to top of page?
 +-    # Values: "true" (default) or "false"
 +-    'navbar_fixed_top': "true",
 +-
 +-    # Location of link to source.
 +-    # Options are "nav" (default), "footer" or anything else to exclude.
 +-    'source_link_position': "none",
 +-
 +-    # Bootswatch (http://bootswatch.com/) theme.
 +-    #
 +-    # Options are nothing with "" (default) or the name of a valid theme
 +-    # such as "amelia" or "cosmo" or "united".
 +-    'bootswatch_theme': "cerulean",
 +-
 +-    # Choose Bootstrap version.
 +-    # Values: "3" (default) or "2" (in quotes)
 +-    'bootstrap_version': "3",
 +-}
 +-
 +-
 + # Add any paths that contain custom themes here, relative to this directory.
 + #html_theme_path = []
 + 
diff --cc debian/patches/fix-tests-python3.5.patch
index d7c0071,0000000..80e88b0
mode 100644,000000..100644
--- a/debian/patches/fix-tests-python3.5.patch
+++ b/debian/patches/fix-tests-python3.5.patch
@@@ -1,38 -1,0 +1,38 @@@
 +From 1c13f543c652141f38fb8f13ea264c548d7079c5 Mon Sep 17 00:00:00 2001
 +From: Vincent Bernat <vincent at bernat.im>
 +Date: Tue, 3 May 2016 22:01:04 +0200
 +Subject: Properly fix assertion for pow and compile on Python 3.5
 +
 +Bug: https://github.com/PythonCharmers/python-future/pull/201
 +
 +Patch-Name: fix-tests-python3.5.patch
 +---
 + tests/test_future/test_builtins.py | 5 ++---
 + 1 file changed, 2 insertions(+), 3 deletions(-)
 +
 +diff --git a/tests/test_future/test_builtins.py b/tests/test_future/test_builtins.py
- index a6db4fdabc4c..05d597a5907c 100644
++index a6db4fd..05d597a 100644
 +--- a/tests/test_future/test_builtins.py
 ++++ b/tests/test_future/test_builtins.py
 +@@ -525,11 +525,10 @@ class BuiltinTest(unittest.TestCase):
 +         self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
 +         self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'single', 0xff)
 +         # Raises TypeError in Python < v3.5, ValueError in v3.5:
 +-        # self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
 ++        self.assertRaises((TypeError, ValueError), compile, chr(0), 'f', 'exec')
 +         self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
 +                           mode='eval', source='0', filename='tmp')
 +         compile('print("\xe5")\n', '', 'exec')
 +-        self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
 +         self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
 + 
 +         # test the optimize argument
 +@@ -1287,7 +1286,7 @@ class BuiltinTest(unittest.TestCase):
 +         self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
 + 
 +         # Raises TypeError in Python < v3.5, ValueError in v3.5:
 +-        # self.assertRaises(TypeError, pow, -1, -2, 3)
 ++        self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
 +         self.assertRaises(ValueError, pow, 1, 2, 0)
 + 
 +         self.assertRaises(TypeError, pow)
diff --cc debian/patches/remove-configparser-module.patch
index 056aca4,0000000..600f670
mode 100644,000000..100644
--- a/debian/patches/remove-configparser-module.patch
+++ b/debian/patches/remove-configparser-module.patch
@@@ -1,71 -1,0 +1,71 @@@
 +From 6e3c0d5f332a2f591c36d477e5c254849b7d40f5 Mon Sep 17 00:00:00 2001
 +From: Vincent Bernat <bernat at debian.org>
 +Date: Tue, 3 May 2016 21:51:13 +0200
 +Subject: Do not ship a configparser module
 +
 +This module is already backported in python-configparser package.
 +
 +Bug-Debian: https://bugs.debian.org/822157
 +Bug: https://github.com/PythonCharmers/python-future/issues/118
 +
 +Patch-Name: remove-configparser-module.patch
 +---
 + setup.py                                   |  2 --
 + src/configparser/__init__.py               | 13 -------------
 + tests/test_future/test_standard_library.py |  3 ---
 + 3 files changed, 18 deletions(-)
 + delete mode 100644 src/configparser/__init__.py
 +
 +diff --git a/setup.py b/setup.py
- index 7c81a099c132..1b2380c85dae 100755
++index 7c81a09..1b2380c 100755
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -58,7 +58,6 @@ PACKAGES = ["future",
 + if sys.version_info[:2] < (3, 0):
 +     PACKAGES += [
 +             "builtins",
 +-            "configparser",
 +             "copyreg",
 +             "html",
 +             "http",
 +@@ -134,7 +133,6 @@ try:
 +                           '_markupbase',
 +                           '_thread',
 +                           'builtins',
 +-                          'configparser',
 +                           'copyreg',
 +                           'html',
 +                           'http',
 +diff --git a/src/configparser/__init__.py b/src/configparser/__init__.py
 +deleted file mode 100644
- index 3642c5ec19df..000000000000
++index 3642c5e..0000000
 +--- a/src/configparser/__init__.py
 ++++ /dev/null
 +@@ -1,13 +0,0 @@
 +-from __future__ import absolute_import
 +-import sys
 +-
 +-if sys.version_info[0] < 3:
 +-    from ConfigParser import *
 +-    try:
 +-        from ConfigParser import (_Chainmap, Error, InterpolationMissingOptionError)
 +-    except ImportError:
 +-        pass
 +-else:
 +-    raise ImportError('This package should not be accessible on Python 3. '
 +-                      'Either you are trying to run from the python-future src folder '
 +-                      'or your installation of python-future is corrupted.')
 +diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py
- index 399d587fcb53..62b40a251a5d 100644
++index 399d587..62b40a2 100644
 +--- a/tests/test_future/test_standard_library.py
 ++++ b/tests/test_future/test_standard_library.py
 +@@ -271,9 +271,6 @@ class TestStandardLibraryReorganization(CodeHandler):
 +         with self.assertRaises(CalledProcessError):
 +             output = self._run_test_script('importme1.py')
 + 
 +-    def test_configparser(self):
 +-        import configparser
 +-    
 +     def test_copyreg(self):
 +         import copyreg
 + 
diff --cc debian/patches/removes-privacy-breach-in-docs.patch
index 4e9f371,0000000..001b6c9
mode 100644,000000..100644
--- a/debian/patches/removes-privacy-breach-in-docs.patch
+++ b/debian/patches/removes-privacy-breach-in-docs.patch
@@@ -1,51 -1,0 +1,51 @@@
 +From 00f16bd6a1abb37119c4bbbd01d7c50848332926 Mon Sep 17 00:00:00 2001
 +From: Thomas Goirand <zigo at debian.org>
 +Date: Tue, 15 Sep 2015 18:30:12 -0400
 +Subject: Removes privacy breach in docs
 +
 + This patch removes links to external websites when generating Sphinx docs.
 + Note to the author: using google-analytics in a Sphinx doc is just horrible.
 + Please stop doing this!
 +Forwarded: no
 +Last-Update: 2015-04-10
 +
 +Patch-Name: removes-privacy-breach-in-docs.patch
 +---
 + README.rst                  | 3 ---
 + docs/_templates/layout.html | 9 ---------
 + 2 files changed, 12 deletions(-)
 +
 +diff --git a/README.rst b/README.rst
- index da8539f288fd..7d40e337c8eb 100644
++index da8539f..7d40e33 100644
 +--- a/README.rst
 ++++ b/README.rst
 +@@ -22,9 +22,6 @@ are `Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy
 + Features
 + --------
 + 
 +-.. image:: https://travis-ci.org/PythonCharmers/python-future.svg?branch=master
 +-       :target: https://travis-ci.org/PythonCharmers/python-future
 +-
 + -   ``future.builtins`` package (also available as ``builtins`` on Py2) provides
 +     backports and remappings for 20 builtins with different semantics on Py3
 +     versus Py2
 +diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
- index c979ab2d1df0..57b385c0a8e4 100644
++index c979ab2..57b385c 100644
 +--- a/docs/_templates/layout.html
 ++++ b/docs/_templates/layout.html
 +@@ -13,15 +13,6 @@
 + {% block footer %}
 + {{ super() }}
 + <div class="footer">
 +-<script type="text/javascript">
 +-  (function() {
 +-    var ga = document.createElement('script');
 +-    ga.src = ('https:' == document.location.protocol ?
 +-              'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 +-    ga.setAttribute('async', 'true');
 +-    document.documentElement.firstChild.appendChild(ga);
 +-  })();
 +-</script>
 + </div>
 + {% endblock %}
 + 
diff --cc debian/patches/series
index 2e4fd2e,0000000..4eee330
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,4 -1,0 +1,5 @@@
 +do-not-use-bootstrap.patch
 +removes-privacy-breach-in-docs.patch
 +remove-configparser-module.patch
 +fix-tests-python3.5.patch
++0005-Fixed-bytes-unit-tests-fail-on-Python-3.5.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-future.git



More information about the Python-modules-commits mailing list