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

python 3.9 test failures #44

Closed
graingert opened this issue Apr 17, 2020 · 6 comments
Closed

python 3.9 test failures #44

graingert opened this issue Apr 17, 2020 · 6 comments

Comments

@graingert
Copy link

python -m testtools.run fixtures.test_suite

/opt/python/3.9-dev/lib/python3.9/runpy.py:127: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this may result in unpredictable behaviour

  warn(RuntimeWarning(msg))

Tests running...

======================================================================

ERROR: fixtures.tests._fixtures.test_monkeypatch.TestMonkeyPatch.test_patch_classmethod_with_boundmethod

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/graingert/fixtures/fixtures/tests/_fixtures/test_monkeypatch.py", line 223, in test_patch_classmethod_with_boundmethod

    slf, cls = C.foo_cls()

TypeError: bar_two_args() missing 1 required positional argument: 'arg'

======================================================================

ERROR: fixtures.tests._fixtures.test_monkeypatch.TestMonkeyPatch.test_patch_classmethod_with_classmethod

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/graingert/fixtures/fixtures/tests/_fixtures/test_monkeypatch.py", line 191, in test_patch_classmethod_with_classmethod

    cls, target_class = C.foo_cls()

ValueError: not enough values to unpack (expected 2, got 1)


graingert added a commit to graingert/fixtures that referenced this issue Apr 17, 2020
@thomasgoirand
Copy link

Hi.

Now that Python 3.9 reached Debian (and Ubuntu), Fixtures fails to build:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973239

It'd be nice if this could be solved. I have to admit I'm not sure what's going on...

@cjwatson
Copy link
Contributor

cjwatson commented Nov 2, 2020

I bisected this to this Python commit: python/cpython@805f8f9

@cjwatson
Copy link
Contributor

cjwatson commented Nov 2, 2020

@alaski This seems to be an incompatibility between classmethod changes in Python 3.9 (see python/cpython@805f8f9) and your MonkeyPatch changes in 78527ff. Do you have any opinion on how it should best be fixed?

@fabaff
Copy link

fabaff commented Feb 17, 2021

Is there any progress here? Beside, Debian does this affect Fedora and NixOS as well.

@bnavigator
Copy link

#46

@cjwatson
Copy link
Contributor

Looks like this should have been closed by merging #46.

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

No branches or pull requests

5 participants