Skip to content
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

Test failure in FrameInfoTest::testCallInfo on Python 3.13 #91

Open
musicinmybrain opened this issue May 15, 2024 · 0 comments · May be fixed by #92
Open

Test failure in FrameInfoTest::testCallInfo on Python 3.13 #91

musicinmybrain opened this issue May 15, 2024 · 0 comments · May be fixed by #92

Comments

@musicinmybrain
Copy link

What I did:

  1. Check out current main, 966cce8
  2. Run tox -e py313

What I expect to happen:

All tests pass, as they do for tox -e py312.

What actually happened:

============================================================================================ test session starts ============================================================================================
platform linux -- Python 3.13.0b1, pytest-8.2.0, pluggy-1.5.0
cachedir: .tox/py313/.pytest_cache
rootdir: /home/ben/src/forks/venusian
configfile: setup.cfg
testpaths: tests
plugins: cov-5.0.0
collected 47 items                                                                                                                                                                                          

tests/test_advice.py F..                                                                                                                                                                              [  6%]
tests/test_venusian.py ............................................                                                                                                                                   [100%]

================================================================================================= FAILURES ==================================================================================================
________________________________________________________________________________________ FrameInfoTest.testCallInfo _________________________________________________________________________________________

self = <tests.test_advice.FrameInfoTest testMethod=testCallInfo>

    def testCallInfo(self):
        (kind, module, f_locals, f_globals, codeinfo) = advice.getFrameInfo(
            sys._getframe()
        )
        self.assertEqual(kind, "function call")
>       self.assertTrue(f_locals is locals())  # ???
E       AssertionError: False is not true

tests/test_advice.py:96: AssertionError

----------- coverage: platform linux, python 3.13.0-beta-1 -----------
Name                       Stmts   Miss   Cover   Missing
---------------------------------------------------------
src/venusian/__init__.py     178      0 100.00%
src/venusian/advice.py        24      0 100.00%
src/venusian/compat.py         7      2  71.43%   5-6
---------------------------------------------------------
TOTAL                        209      2  99.04%

========================================================================================== short test summary info ==========================================================================================
FAILED tests/test_advice.py::FrameInfoTest::testCallInfo - AssertionError: False is not true
======================================================================================= 1 failed, 46 passed in 0.21s ========================================================================================

This is related to PEP 667. The frame.f_locals is now a write-through proxy object of type FrameLocalsProxy.

The same issue exists due to the same assertion in zope.interface as zopefoundation/zope.interface#292 and is being worked on in zopefoundation/zope.interface#294.

musicinmybrain added a commit to musicinmybrain/venusian that referenced this issue May 15, 2024
The `frame.f_locals` is now a write-through proxy object of type
`FrameLocalsProxy`; see PEP 667. This fix is based on
zopefoundation/zope.interface#294 and
specifically on
zopefoundation/zope.interface#294 (comment).

Fixes Pylons#91.
musicinmybrain added a commit to musicinmybrain/venusian that referenced this issue May 15, 2024
The `frame.f_locals` is now a write-through proxy object of type
`FrameLocalsProxy`; see PEP 667. This fix is based on
zopefoundation/zope.interface#294 and
specifically on
zopefoundation/zope.interface#294 (comment).

Fixes Pylons#91.
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.

1 participant