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 failed on Arch Linux against Python 3.12 #430

Open
cybaol opened this issue Apr 30, 2024 · 6 comments
Open

Test failed on Arch Linux against Python 3.12 #430

cybaol opened this issue Apr 30, 2024 · 6 comments

Comments

@cybaol
Copy link

cybaol commented Apr 30, 2024

Error Log: test-error.log

Note: python-orjson, python-rich are pre-installed on my machine.

@gaogaotiantian
Copy link
Owner

Please follow https://github.com/gaogaotiantian/viztracer/blob/master/.github/CONTRIBUTING.md for build and test. There are a couple of things I can notice from the log:

  • orjson has some issues, use the latest version from pip
  • loky is not installed
  • pytest is used instead of unittest - I know it is supposed to work, but that could cause issues
  • attach is not working - this is some black magic and is OS-dependent. If your Linux version is weird or too old, attach might not work.

Also, the project support is to make sure the library itself works on all platforms, not the tests.

@cybaol
Copy link
Author

cybaol commented May 19, 2024

Sorry so late for reply.
Now, I have passed all tests based on the minor changes I've made.
Following is my changes:

  # Avoid exceeding maximum recursion depth.
  sed -i "s|call_self(1000)|call_self(888)|g" tests/test_vcompressor.py

  # Disable external processor testing because we don't have it.
  sed -i "s|use_external_processor=True|use_external_processor=False|g" tests/test_viewer.py

  # Attach is not working, this is some black magic and is OS-dependent.
  rm tests/test_remote.py

For the first one, on my machine, the maximum recursion depth is exceeded when exceeding 996.

The full packaging script is here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-viztracer

@gaogaotiantian
Copy link
Owner

Free free to pick out the tests that do not suit you.

For the tests you found issues:

  1. That recursion test is not well written. The direct trigger is that you are using pytest which will introduce a few extra frames. That should be avoided and I'll probably fix that.
  2. The external processor is something that the script should download from google. It only enables the external processor so if you don't need that, you can skip the test.
  3. Attaching is some black magic and replies on VM. Arch Linux is not officially supported so yes it might not work.

Anyway, I probably won't change the tests except for the first one, but you can just do what you need to package it.

@cybaol
Copy link
Author

cybaol commented May 20, 2024

I noticed that there are still two test errors about orjson(latest version from pip).
Here is build.log.
Previous test is using json from python standard library.

@gaogaotiantian
Copy link
Owner

I can take a look this weekend probably.

@cybaol
Copy link
Author

cybaol commented May 21, 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

2 participants