Repository navigation
Closed
Labels
Description
=================================== FAILURES ===================================
________________________ FuturesTest.test_future_import ________________________
Traceback (most recent call last):
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/runner.py", line 241, in <lambda>
lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
yield from thread_exception_runtest_hook()
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
yield
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
yield from unraisable_exception_runtest_hook()
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
yield
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/logging.py", line 850, in pytest_runtest_call
yield from self._runtest_for(item, "call")
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/logging.py", line 833, in _runtest_for
yield
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/capture.py", line 878, in pytest_runtest_call
return (yield)
^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
return (yield)
^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/runner.py", line 183, in pytest_runtest_call
raise e
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
item.runtest()
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/python.py", line 1632, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/nix/store/130vq5jz29v89na1hj9x2kgkhlj3ysbc-python3.12-pluggy-1.5.0-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/lfj9h46jsidlg7mg4yy33rspmls6a046-python3.12-pytest-8.2.2-aarch64-unknown-linux-gnu/lib/python3.12/site-packages/_pytest/python.py", line 162, in pytest_pyfunc_call
result = testfunction(**testargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/Mako-1.3.5/test/test_template.py", line 1756, in test_future_import
assert result_lines(t.render(x=12, y=5)) == ["2.4"]
AssertionError: assert ['2.3999999999999999'] == ['2.4']
At index 0 diff: '2.3999999999999999' != '2.4'
Full diff:
[
- '2.4',
+ '2.3999999999999999',
]
=============================== warnings summary ===============================
test/ext/test_babelplugin.py: 32 warnings
/nix/store/hv4r766mi1ldavss9dg5nagb80cgifs1-python3.12-babel-2.15.0/lib/python3.12/site-packages/babel/messages/extract.py:643: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
if isinstance(body, ast.Str):
test/ext/test_babelplugin.py: 31 warnings
/nix/store/hv4r766mi1ldavss9dg5nagb80cgifs1-python3.12-babel-2.15.0/lib/python3.12/site-packages/babel/messages/extract.py:644: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
return body.s
test/ext/test_linguaplugin.py::MakoExtractTest::test_extract
/nix/store/4svh14lbp62c25jc3073sgkddh8dr5i9-python3.12-lingua-4.15.0/lib/python3.12/site-packages/lingua/extractors/__init__.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import DistributionNotFound
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/test_template.py::FuturesTest::test_future_import - AssertionError: assert ['2.3999999999999999'] == ['2.4']
=========== 1 failed, 449 passed, 49 skipped, 64 warnings in 18.87s ============
/nix/store/b4jyim3n8vlq4nqcasfhq8kqs3y80wkc-stdenv-linux/setup: line 1641: pop_var_context: head of shell_variables not a function context
Discovered with Nix
Activity
zzzeek commentedon Jul 27, 2024
I cant reproduce , note python 3.12 below
RossComputerGuy commentedon Jul 27, 2024
Interesting, are you on aarch64? I'm doing this on NixOS on an aarch64 system (Apple Silicon M1 Pro). I've tried running this test multiple times and it consistently. I also am using an LLVM built environment so I wonder if some sort of optimization could have caused this.
zzzeek commentedon Jul 27, 2024
OK so this is some kind of CPU thing? im on x86_64. if this is doing a pure FP comparison then the test should be changed to use rounding or something, feel free to send a PR.
RossComputerGuy commentedon Jul 27, 2024
Possibly, I am not 100% sure. I'm going to try an x86_64 machine as well.
alyssais commentedon Feb 4, 2025
This happens to me on Apple Silicon also. Not in the default environment, and not in the LLVM one that @RossComputerGuy is using, but in a musl cross compliation environment. It does not happen in a musl native environment.
alyssais commentedon Feb 4, 2025
Confirmed it happens on a non-Apple Silicon aarch64 machine too.
sqla-tester commentedon Feb 4, 2025
Mike Bayer has proposed a fix for this issue in the main branch:
update future import test https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5683
alyssais commentedon Feb 4, 2025
Proposed patch solves my problem.
update future import test