Skip to content

BuiltinTest.test_pow fails with Python-3.8 #474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sagitter opened this issue Jun 6, 2019 · 3 comments · Fixed by #578
Closed

BuiltinTest.test_pow fails with Python-3.8 #474

sagitter opened this issue Jun 6, 2019 · 3 comments · Fixed by #578

Comments

@sagitter
Copy link

sagitter commented Jun 6, 2019

Hi all.

This the output of a failed test (future c423752) with Python-3.8.0b1:

=================================== FAILURES ===================================
_____________________________ BuiltinTest.test_pow _____________________________

self = <test_future.test_builtins.BuiltinTest testMethod=test_pow>

    def test_pow(self):
        self.assertEqual(pow(0,0), 1)
        self.assertEqual(pow(0,1), 0)
        self.assertEqual(pow(1,0), 1)
        self.assertEqual(pow(1,1), 1)
    
        self.assertEqual(pow(2,0), 1)
        self.assertEqual(pow(2,10), 1024)
        self.assertEqual(pow(2,20), 1024*1024)
        self.assertEqual(pow(2,30), 1024*1024*1024)
    
        self.assertEqual(pow(-2,0), 1)
        self.assertEqual(pow(-2,1), -2)
        self.assertEqual(pow(-2,2), 4)
        self.assertEqual(pow(-2,3), -8)
    
        self.assertAlmostEqual(pow(0.,0), 1.)
        self.assertAlmostEqual(pow(0.,1), 0.)
        self.assertAlmostEqual(pow(1.,0), 1.)
        self.assertAlmostEqual(pow(1.,1), 1.)
    
        self.assertAlmostEqual(pow(2.,0), 1.)
        self.assertAlmostEqual(pow(2.,10), 1024.)
        self.assertAlmostEqual(pow(2.,20), 1024.*1024.)
        self.assertAlmostEqual(pow(2.,30), 1024.*1024.*1024.)
    
        self.assertAlmostEqual(pow(-2.,0), 1.)
        self.assertAlmostEqual(pow(-2.,1), -2.)
        self.assertAlmostEqual(pow(-2.,2), 4.)
        self.assertAlmostEqual(pow(-2.,3), -8.)
    
        for x in 2, int(2), 2.0:
            for y in 10, int(10), 10.0:
                for z in 1000, int(1000), 1000.0:
                    if isinstance(x, float) or \
                       isinstance(y, float) or \
                       isinstance(z, float):
                        self.assertRaises(TypeError, pow, x, y, z)
                    else:
                        self.assertAlmostEqual(pow(x, y, z), 24.0)
    
        self.assertAlmostEqual(pow(-1, 0.5), 1j)
        self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
    
        # Raises TypeError in Python < v3.5, ValueError in v3.5:
>       self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
E       AssertionError: (<class 'TypeError'>, <class 'ValueError'>) not raised by pow

tests/test_future/test_builtins.py:1289: AssertionError
=============================== warnings summary ===============================
tests/test_future/test_backports.py:13
tests/test_future/test_backports.py:13
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_backports.py:13: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from collections import Mapping, MutableMapping

tests/test_future/test_builtins.py:267
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_builtins.py:267: SyntaxWarning: invalid escape sequence \u
    (str(b'\u0663\u0661\u0664 ','raw-unicode-escape'), 314),

tests/test_future/test_builtins.py:289
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_builtins.py:289: SyntaxWarning: invalid escape sequence \u
    (str(b'\u0663\u0661\u0664 ','raw-unicode-escape'), 314),

build/lib/future/backports/test/support.py:1977
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/test/support.py:1977: SyntaxWarning: invalid escape sequence \d
    m = re.match("2.6.(\d{1,2})", kernel_version)

build/lib/future/backports/email/utils.py:68
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/email/utils.py:68: SyntaxWarning: invalid escape sequence \A
    '([^\ud800-\udbff]|\A)[\udc00-\udfff]([^\udc00-\udfff]|\Z)').search

build/lib/future/backports/urllib/parse.py:957
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/urllib/parse.py:957: SyntaxWarning: invalid escape sequence \?
    _queryprog = re.compile('^(.*)\?([^?]*)$')

tests/test_future/test_htmlparser.py:685
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_htmlparser.py:685: SyntaxWarning: invalid escape sequence \=
    "<a $><b $=%><c \=/>",

build/lib/future/backports/html/parser.py:31
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/html/parser.py:31: SyntaxWarning: invalid escape sequence \s
    tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*')

build/lib/future/backports/html/parser.py:79
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/html/parser.py:79: SyntaxWarning: invalid escape sequence \s
    endtagfind = re.compile('</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>')

tests/test_future/test_http_cookiejar.py:1034
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_http_cookiejar.py:1034: SyntaxWarning: invalid escape sequence \$
    self.assertRegex(h, "\$Port([^=]|$)",

tests/test_future/test_http_cookiejar.py:1373
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_http_cookiejar.py:1373: SyntaxWarning: invalid escape sequence \s
    '\s*\$Path="\/acme"')

tests/test_future/test_http_cookiejar.py:1375
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_http_cookiejar.py:1375: SyntaxWarning: invalid escape sequence \s
    '\s*\$Path="\/acme"')

build/lib/future/backports/http/client.py:1
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/http/client.py:1: SyntaxWarning: invalid escape sequence \_
    """HTTP/1.1 client library

build/lib/future/backports/email/feedparser.py:37
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/email/feedparser.py:37: SyntaxWarning: invalid escape sequence \Z
    NLCRE_eol = re.compile('(\r\n|\r|\n)\Z')

build/lib/future/backports/http/cookiejar.py:212
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/http/cookiejar.py:212: SyntaxWarning: invalid escape sequence \d
    "(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$", re.ASCII)

build/lib/future/backports/http/cookiejar.py:289
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/http/cookiejar.py:289: SyntaxWarning: invalid escape sequence \d
    """^

build/lib/future/backports/http/cookiejar.py:423
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/http/cookiejar.py:423: SyntaxWarning: invalid escape sequence \s
    non_junk, nr_junk_chars = re.subn("^[=\s;]*", "", text)

tests/test_future/test_range.py:9
tests/test_future/test_range.py:9
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_range.py:9: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from collections import Iterator, Sequence

tests/test_future/test_urllib.py:536
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib.py:536: SyntaxWarning: invalid escape sequence \^
    """Tests for urllib.quote() and urllib.quote_plus()

tests/test_future/test_urllib.py:611
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib.py:611: SyntaxWarning: invalid escape sequence \^
    should_quote.append('<>#%"{}|\^[]`')

tests/test_future/test_urllib_response.py:11
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_response.py:11: PytestWarning: cannot collect test class 'TestFile' because it has a __init__ constructor
    class TestFile(object):

tests/test_future/test_urllib_toplevel.py:551
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:551: SyntaxWarning: invalid escape sequence \^
    """Tests for urllib.quote() and urllib.quote_plus()

tests/test_future/test_urllib_toplevel.py:626
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:626: SyntaxWarning: invalid escape sequence \^
    should_quote.append('<>#%"{}|\^[]`')

build/lib/past/types/oldstr.py:18
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/past/types/oldstr.py:18: SyntaxWarning: invalid escape sequence \d
    """

build/lib/past/builtins/misc.py:79
tests/test_past/test_builtins.py::BuiltinTest::test_execfile
tests/test_past/test_builtins.py::BuiltinTest::test_execfile
tests/test_past/test_builtins.py::BuiltinTest::test_execfile
tests/test_past/test_builtins.py::BuiltinTest::test_execfile
tests/test_past/test_builtins.py::BuiltinTest::test_execfile
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/past/builtins/misc.py:79: DeprecationWarning: 'U' mode is deprecated
    with open(filename, "rbU") as fin:

tests/test_future/test_bytes.py::TestBytes::test_multiple_inheritance
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_bytes.py:709: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    class Foo(Base, collections.Container):

tests/test_future/test_int.py::IntTestCases::test_intconversion
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_int.py:360: DeprecationWarning: __int__ returned non-int (type Foo3).  The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
    self.assertEqual(int(Foo3()), 0)

tests/test_future/test_range.py::RangeTests::test_slice_zero_step
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_range.py:195: DeprecationWarning: Please use assertRaisesRegex instead.
    with self.assertRaisesRegexp(ValueError, msg):

tests/test_future/test_standard_library.py::TestStandardLibraryReorganization::test_reload
  /usr/lib64/python3.8/importlib/__init__.py:169: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    _bootstrap._exec(spec, module)

tests/test_future/test_urllib2.py::HandlerTests::test_http
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/future/backports/urllib/request.py:1224: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    if isinstance(data, collections.Iterable):

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1208: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'ab'),urllib_parse.splitpasswd('user:ab'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1209: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a\nb'),urllib_parse.splitpasswd('user:a\nb'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1210: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a\tb'),urllib_parse.splitpasswd('user:a\tb'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1211: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a\rb'),urllib_parse.splitpasswd('user:a\rb'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1212: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a\fb'),urllib_parse.splitpasswd('user:a\fb'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1213: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a\vb'),urllib_parse.splitpasswd('user:a\vb'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1214: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a:b'),urllib_parse.splitpasswd('user:a:b'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1215: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user', 'a b'),urllib_parse.splitpasswd('user:a b'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1216: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user 2', 'ab'),urllib_parse.splitpasswd('user 2:ab'))

tests/test_future/test_urllib_toplevel.py::Utility_Tests::test_splitpasswd
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllib_toplevel.py:1217: DeprecationWarning: urllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() instead
    self.assertEqual(('user+1', 'a+b'),urllib_parse.splitpasswd('user+1:a+b'))

tests/test_future/test_urllibnet.py::urlopenNetworkTests::test_getcode
tests/test_future/test_urllibnet.py::test_main
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/tests/test_future/test_urllibnet.py:103: DeprecationWarning: FancyURLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
    open_url = urllib_request.FancyURLopener().open(URL)

tests/test_past/test_oldstr.py::TestOldStr::test_unescape
  /builddir/build/BUILD/python-future-c423752879acc05eebc29b0bb9909327bd5c7308/python3/build/lib/past/types/oldstr.py:32: DeprecationWarning: invalid escape sequence '\c'
    return s.encode().decode('unicode_escape')

-- Docs: https://docs.pytest.org/en/latest/warnings.html
= 1 failed, 1004 passed, 53 skipped, 47 xfailed, 50 warnings in 30.28 seconds ==
@tirkarthi
Copy link

The ValueError behavior was changed in 3.8 beta 1 with PR python/cpython#13266

@sandrotosi
Copy link

this is still happening

balabit-sync pushed a commit to balabit-deps/balabit-os-8-python-future that referenced this issue Nov 14, 2022
python-future (0.18.2-2) unstable; urgency=medium

  * Drop python2 support; Closes: #937773

python-future (0.18.2-1) unstable; urgency=medium

  [ Ondřej Nový ]
  * Use debhelper-compat instead of debian/compat.
  * Bump Standards-Version to 4.4.1.

  [ Sandro Tosi ]
  * New upstream release
    - compatible with python 3.8; Closes: #948420
  * debian/copyright
    - update upstream copyright notice
  * debian/patches
    - refresh patches, drop Python3.7-support.patch (addressed upstream)
  * debian/rules
    - exclude test_pow test, currently failing; reported upstream at
      PythonCharmers/python-future#474
  * Use python3 sphinx to build the documentation, and as a
    PYBUILD_AFTER_BUILD_python3 target instead of overriding dh_sphinxdoc

python-future (0.16.0-1) unstable; urgency=medium

  * Team upload.
  * New upstream version
  * Standards-Version: 4.3.0

python-future (0.15.2-5) unstable; urgency=medium

  * Team upload.
  * Bump required version of dh-python because test autodetection is
    not working in older versions
  * Bumped debhelper compat version to 11
  * d/control: Set Vcs-* to salsa.debian.org
  * d/copyright: Use https protocol in Format field
  * Convert git repository from git-dpm to gbp layout
  * Add python3-lib2to3 to depends (Closes: #896216)
  * d/*.postinst: Prefer Python 3 version if both versions installed
    (Closes: #870038)
  * Add Python 3.7 support
  * Standards version is 4.2.0 now (no changes)

python-future (0.15.2-4) unstable; urgency=medium

  * d/p/0005-Fixed-bytes-unit-tests-fail-on-Python-3.5.patch:
    Fixed FTBFS on Python 3.5 (Closes: #835243)

python-future (0.15.2-3) unstable; urgency=medium

  [ Ondřej Nový ]
  * Removed version from python-all build dependency
  * Removed pre-depends on dpkg

  [ Vincent Bernat ]
  * Disable network access for Sphinx during build. Closes: #830602.

python-future (0.15.2-2) unstable; urgency=medium

  [ Ondřej Nový ]
  * Fixed VCS URL (https)

  [ Vincent Bernat ]
  * d/control: Bump Standards-Version.
  * d/control: Add a Testsuite field.
  * d/rules: Switch to pybuild. This removes dependency on the current
    Python version, hence closes: #822097.
  * d/copyright: Various fixes in license names and file format.
  * Add a patch to fix some failing tests with Python 3.5.
  * Remove configparser module and depends on python-configparser
    instead. Closes: #822157.

python-future (0.15.2-1) unstable; urgency=medium

  * New upstream release.
  * d/control:
    - Make DPMT the Maintainer and add myself to Uploaders.  (Closes: #797212)
    - Update Vcs-Git and Vcs-Browser headers to reflect the move to DPMT.
  * d/copyright: Fix multiple lintian warnings.
  * d/watch: Use pypi.debian.net redirector.
  * d/gbp.conf: Removed.
  * d/python{,3}-future.postrm: Removed to fix lintian warnings.  This
    duplicates functionality in the .prerm anyway, which is where lintian
    recommends the calls should go.
  * Converted to git-dpm as per DPMT (upcoming) standard.

python-future (0.14.3-1) unstable; urgency=medium

  * Initial release. (Closes: #782250)
balabit-sync pushed a commit to balabit-deps/balabit-os-9-python-future that referenced this issue Nov 14, 2022
python-future (0.18.2-5) unstable; urgency=medium

  * Team upload

  [ Ondřej Nový ]
  * d/control: Update Maintainer field with new Debian Python Team
    contact address.
  * d/control: Update Vcs-* fields with new Debian Python Team Salsa
    layout.

  [ Graham Inggs ]
  * Don't run the _dummy_thread tests, the module is deprecated since
    3.7, and removed in 3.9 (Closes: #973114)
  * Remove Barry Warsaw from Uploaders,
    thanks Barry for all your work! (Closes: #970149)
  * Add debian/clean to prevent FTBFSx2
  * Set Rules-Requires-Root: no
  * Bump Standards-Version to 4.5.1, no changes

python-future (0.18.2-4) unstable; urgency=medium

  * Team upload.

  [ Debian Janitor ]
  * Set upstream metadata fields: Bug-Database, Bug-Submit.
  * Update standards version to 4.5.0, no changes needed.
  * Apply multi-arch hints.
    + python-future-doc: Add Multi-Arch: foreign.

  [ Boyuan Yang ]
  * Set package python3-future as Multi-Arch: foreign.
    (Closes: #961042)
  * Bump debhelper compat to v13.
  * debian/rules: Use dh13 syntax.

python-future (0.18.2-2) unstable; urgency=medium

  * Drop python2 support; Closes: #937773

python-future (0.18.2-1) unstable; urgency=medium

  [ Ondřej Nový ]
  * Use debhelper-compat instead of debian/compat.
  * Bump Standards-Version to 4.4.1.

  [ Sandro Tosi ]
  * New upstream release
    - compatible with python 3.8; Closes: #948420
  * debian/copyright
    - update upstream copyright notice
  * debian/patches
    - refresh patches, drop Python3.7-support.patch (addressed upstream)
  * debian/rules
    - exclude test_pow test, currently failing; reported upstream at
      PythonCharmers/python-future#474
  * Use python3 sphinx to build the documentation, and as a
    PYBUILD_AFTER_BUILD_python3 target instead of overriding dh_sphinxdoc

python-future (0.16.0-1) unstable; urgency=medium

  * Team upload.
  * New upstream version
  * Standards-Version: 4.3.0

python-future (0.15.2-5) unstable; urgency=medium

  * Team upload.
  * Bump required version of dh-python because test autodetection is
    not working in older versions
  * Bumped debhelper compat version to 11
  * d/control: Set Vcs-* to salsa.debian.org
  * d/copyright: Use https protocol in Format field
  * Convert git repository from git-dpm to gbp layout
  * Add python3-lib2to3 to depends (Closes: #896216)
  * d/*.postinst: Prefer Python 3 version if both versions installed
    (Closes: #870038)
  * Add Python 3.7 support
  * Standards version is 4.2.0 now (no changes)

python-future (0.15.2-4) unstable; urgency=medium

  * d/p/0005-Fixed-bytes-unit-tests-fail-on-Python-3.5.patch:
    Fixed FTBFS on Python 3.5 (Closes: #835243)

python-future (0.15.2-3) unstable; urgency=medium

  [ Ondřej Nový ]
  * Removed version from python-all build dependency
  * Removed pre-depends on dpkg

  [ Vincent Bernat ]
  * Disable network access for Sphinx during build. Closes: #830602.

python-future (0.15.2-2) unstable; urgency=medium

  [ Ondřej Nový ]
  * Fixed VCS URL (https)

  [ Vincent Bernat ]
  * d/control: Bump Standards-Version.
  * d/control: Add a Testsuite field.
  * d/rules: Switch to pybuild. This removes dependency on the current
    Python version, hence closes: #822097.
  * d/copyright: Various fixes in license names and file format.
  * Add a patch to fix some failing tests with Python 3.5.
  * Remove configparser module and depends on python-configparser
    instead. Closes: #822157.

python-future (0.15.2-1) unstable; urgency=medium

  * New upstream release.
  * d/control:
    - Make DPMT the Maintainer and add myself to Uploaders.  (Closes: #797212)
    - Update Vcs-Git and Vcs-Browser headers to reflect the move to DPMT.
  * d/copyright: Fix multiple lintian warnings.
  * d/watch: Use pypi.debian.net redirector.
  * d/gbp.conf: Removed.
  * d/python{,3}-future.postrm: Removed to fix lintian warnings.  This
    duplicates functionality in the .prerm anyway, which is where lintian
    recommends the calls should go.
  * Converted to git-dpm as per DPMT (upcoming) standard.

python-future (0.14.3-1) unstable; urgency=medium

  * Initial release. (Closes: #782250)
@sagitter
Copy link
Author

I'm still obtaining the error in #474 (comment) with future-0.18.3 and python-3.11.1:

self = <test_future.test_builtins.BuiltinTest testMethod=test_pow>

    def test_pow(self):
        self.assertEqual(pow(0,0), 1)
        self.assertEqual(pow(0,1), 0)
        self.assertEqual(pow(1,0), 1)
        self.assertEqual(pow(1,1), 1)
    
        self.assertEqual(pow(2,0), 1)
        self.assertEqual(pow(2,10), 1024)
        self.assertEqual(pow(2,20), 1024*1024)
        self.assertEqual(pow(2,30), 1024*1024*1024)
    
        self.assertEqual(pow(-2,0), 1)
        self.assertEqual(pow(-2,1), -2)
        self.assertEqual(pow(-2,2), 4)
        self.assertEqual(pow(-2,3), -8)
    
        self.assertAlmostEqual(pow(0.,0), 1.)
        self.assertAlmostEqual(pow(0.,1), 0.)
        self.assertAlmostEqual(pow(1.,0), 1.)
        self.assertAlmostEqual(pow(1.,1), 1.)
    
        self.assertAlmostEqual(pow(2.,0), 1.)
        self.assertAlmostEqual(pow(2.,10), 1024.)
        self.assertAlmostEqual(pow(2.,20), 1024.*1024.)
        self.assertAlmostEqual(pow(2.,30), 1024.*1024.*1024.)
    
        self.assertAlmostEqual(pow(-2.,0), 1.)
        self.assertAlmostEqual(pow(-2.,1), -2.)
        self.assertAlmostEqual(pow(-2.,2), 4.)
        self.assertAlmostEqual(pow(-2.,3), -8.)
    
        for x in 2, int(2), 2.0:
            for y in 10, int(10), 10.0:
                for z in 1000, int(1000), 1000.0:
                    if isinstance(x, float) or \
                       isinstance(y, float) or \
                       isinstance(z, float):
                        self.assertRaises(TypeError, pow, x, y, z)
                    else:
                        self.assertAlmostEqual(pow(x, y, z), 24.0)
    
        self.assertAlmostEqual(pow(-1, 0.5), 1j)
        self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
    
        # Raises TypeError in Python < v3.5, ValueError in v3.5:
>       self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
E       AssertionError: (<class 'TypeError'>, <class 'ValueError'>) not raised by pow

tests/test_future/test_builtins.py:1307: AssertionError
============================================================================================================== warnings summary ==============================================================================================================
build/lib/future/standard_library/__init__.py:65
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/future/standard_library/__init__.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import imp

build/lib/future/backports/email/message.py:13
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/future/backports/email/message.py:13: DeprecationWarning: 'uu' is deprecated and slated for removal in Python 3.13
    import uu

build/lib/libfuturize/fixer_util.py:11
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/libfuturize/fixer_util.py:11: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
    from lib2to3.fixer_util import (FromImport, Newline, is_import,

tests/test_future/test_htmlparser.py::test_main
tests/test_future/test_htmlparser.py::test_main
tests/test_future/test_htmlparser.py::test_main
tests/test_future/test_htmlparser.py::test_main
tests/test_future/test_http_cookiejar.py::test_main
tests/test_future/test_http_cookiejar.py::test_main
tests/test_future/test_http_cookiejar.py::test_main
tests/test_future/test_http_cookiejar.py::test_main
tests/test_future/test_http_cookiejar.py::test_main
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/future/backports/test/support.py:1656: DeprecationWarning: unittest.makeSuite() is deprecated and will be removed in Python 3.13. Please use unittest.TestLoader.loadTestsFromTestCase() instead.
    suite.addTest(unittest.makeSuite(cls))

tests/test_future/test_httplib.py::SourceAddressTest::testHTTPSConnectionSourceAddress
tests/test_future/test_httplib.py::HTTPSTest::test_attributes
tests/test_future/test_httplib.py::HTTPSTest::test_host_port
tests/test_future/test_httplib.py::HTTPSTest::test_host_port
tests/test_future/test_httplib.py::HTTPSTest::test_host_port
tests/test_future/test_httplib.py::HTTPSTest::test_host_port
tests/test_future/test_httplib.py::HTTPSTest::test_host_port
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/future/backports/http/client.py:1218: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/tests/test_future/test_int.py:401: DeprecationWarning: The delegation of int() to __trunc__ is deprecated.
    int(TruncReturnsNonIntegral())

tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
tests/test_future/test_int.py::IntTestCases::test_intconversion
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/tests/test_future/test_int.py:421: DeprecationWarning: The delegation of int() to __trunc__ is deprecated.
    int(TruncReturnsBadInt())

tests/test_future/test_standard_library.py::TestStandardLibraryReorganization::test_reload
  /usr/lib64/python3.11/importlib/__init__.py:169: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    _bootstrap._exec(spec, module)

tests/test_past/test_oldstr.py::TestOldStr::test_unescape
  /home/sagitter/rpmbuild/BUILD/python-future-0.18.3/python3/build/lib/past/types/oldstr.py:37: DeprecationWarning: invalid escape sequence '\c'
    return s.encode().decode('unicode_escape')

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================== short test summary info ===========================================================================================================
FAILED tests/test_future/test_builtins.py::BuiltinTest::test_pow - AssertionError: (<class 'TypeError'>, <class 'ValueError'>) not raised by pow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants