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

tests broken on Python 3.12 #95

Open
goffi-contrib opened this issue Jul 21, 2024 · 5 comments
Open

tests broken on Python 3.12 #95

goffi-contrib opened this issue Jul 21, 2024 · 5 comments

Comments

@goffi-contrib
Copy link

Hello,

tests are broken on Python 3.12 due to the use of deprecated plural variant of method names such as assertEquals, see Python 3.12 release notes for details: https://docs.python.org/3.12/whatsnew/3.12.html#id3

One example line where it's used: https://github.com/cocagne/txdbus/blob/master/tests/test_authentication.py#L439

The fix is straightforward, the final s must be removed on the methods listed in the documentation above.

Thanks!

@goffi-contrib
Copy link
Author

Here are the patches used in Debian to fix this issue and #96 https://salsa.debian.org/python-team/packages/txdbus/-/tree/debian/master/debian/patches?ref_type=heads

@WhyNotHugo
Copy link
Collaborator

This was fixed in 2204dce

We need to cut a new release.

@WhyNotHugo
Copy link
Collaborator

Actually, only the assertEquals part was fixed, but tests still fail on 3.12.

WhyNotHugo added a commit that referenced this issue Jul 22, 2024
Fixes authentication tests for Python >= 3.12.

See: #95
@WhyNotHugo
Copy link
Collaborator

See: #97

I still have one test failing:

[ERROR]
Traceback (most recent call last):
  File "/home/hugo/src/github.com/cocagne/txdbus/tests/client_tests.py", line 2347, in test_call_with_two_UNIX_FD_args
    result = yield ro.callRemote(
twisted.internet.error.ConnectionDone: Connection was closed cleanly.

tests.test_client_against_native_bus.UnixFDArgumentsTester.test_call_with_two_UNIX_FD_args

Unsure what's causing this.

WhyNotHugo added a commit that referenced this issue Jul 22, 2024
Fixes authentication tests for Python >= 3.12.

See: #95
WhyNotHugo added a commit that referenced this issue Jul 22, 2024
Fixes authentication tests for Python >= 3.12.

See: #95
WhyNotHugo added a commit that referenced this issue Jul 23, 2024
Fixes authentication tests for Python >= 3.12.

See: #95
@gudnimg
Copy link
Contributor

gudnimg commented Aug 12, 2024

Hi I found that the test passes with this change:

This only seems to be an issue when the signature is hh. A simple h works fine. Sounds like an issue in parsing somewhere if ii works.

image

Edit:
To add more info… I could reproduce the issue using WSL with Ubuntu 24.04. It used Python 3.12.3. To use the session d-bus I had to use loginctl. The session bus isnt enabled by default on WSL.

I also tried downgrading Twisted as far back as I could. I could install everything above 19.7.0. The issue persistent with every release. I’m not convinced this is a twisted issue.

cocagne added a commit that referenced this issue Sep 13, 2024
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

3 participants