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

6.0.0: test_cimport_support fails #2355

Open
mtelka opened this issue Jan 31, 2025 · 4 comments
Open

6.0.0: test_cimport_support fails #2355

mtelka opened this issue Jan 31, 2025 · 4 comments

Comments

@mtelka
Copy link

mtelka commented Jan 31, 2025

I do see this failure of the test_cimport_support test:

E         
E           import copy
E         + import cython
E           import datetime
E           import inspect  # used by JavascriptBindings.__SetObjectMethods()
E           import json
E           import os
E           import platform
E           import random
E           import re
E           import sys
E           import time
E           import traceback 
E           import types 
E           import urllib
E         - 
E         - import cython
E           
E           if sys.version_info.major == 2:
E               import urlparse

[...snip...]

E           # You can't use "void" along with cpdef function returning None, it is planned to be
E           # added to Cython in the future, creating this virtual type temporarily. If you
E           # change it later to "void" then don't forget to add "except *".
E           ctypedef object py_void
E           ctypedef long WindowHandle
E
E         + # preincrement and dereference must be "as" otherwise not seen.
E         + from cython.operator cimport dereference as deref
E         + from cython.operator cimport preincrement as preinc
E         +
E           cimport ctime
E           from cpython cimport PyLong_FromVoidPtr
E           from cpython cimport bool as py_bool
E         - # preincrement and dereference must be "as" otherwise not seen.
E         - from cython.operator cimport dereference as deref
E         - from cython.operator cimport preincrement as preinc
E           from libc.stdint cimport uint64_t, uintptr_t
E           from libc.stdlib cimport atoi, calloc, free, malloc
E           from libc.string cimport memcpy, strlen
E           from libcpp cimport bool as cpp_bool
E           from libcpp.map cimport map as cpp_map
E           from libcpp.pair cimport pair as cpp_pair
E           from libcpp.string cimport string as cpp_string
@staticdev
Copy link
Collaborator

hi @mtelka, where do you see that? our CI runs all unit tests for all supported versions of python. could you please give more details?

@mtelka
Copy link
Author

mtelka commented Feb 3, 2025

@staticdev I do see that locally while running pytest during packaging of isort for OpenIndiana. In total I see seven tests failed:

=========================== short test summary info ============================
FAILED tests/integration/test_setting_combinations.py::test_isort_is_idempotent 
FAILED tests/integration/test_setting_combinations.py::test_isort_doesnt_lose_imports_or_comments
FAILED tests/unit/test_deprecated_finders.py::TestRequirementsFinder::test_requirements_dir
FAILED tests/unit/test_deprecated_finders.py::test_requirements_finder - Asse...
FAILED tests/unit/test_isort.py::test_cimport_support - AssertionError: asser...
FAILED tests/unit/test_ticketed_features.py::test_isort_supports_shared_profiles_issue_970
FAILED tests/unit/test_ticketed_features.py::test_sort_configurable_sort_issue_1732
= 7 failed, 554 passed, 1 skipped, 1 xfailed, 654 warnings in 144.62s (0:02:24) =

Six of these failures are already reported as #2129 so I reported the new one only here.

@staticdev
Copy link
Collaborator

@mtelka I believe something is wrong with your local environment, since tests are passing on my machine and on CI. How are you running pytest?

@mtelka
Copy link
Author

mtelka commented Feb 3, 2025

This is the full command:

(cd /data/builds/oi-userland/components/python/isort/build/amd64-3.9 ; \
        /usr/bin/env -i PATH="/usr/gcc/14/bin:/usr/clang/19/bin:/usr/ruby/3.2/bin:/usr/jdk/openjdk21/bin:/usr/postgres/16/bin:/usr/mariadb/10.6/bin:/usr/openssl/3/bin:/usr/bin/amd64:/usr/bin:/usr/gnu/bin:/usr/sbin/amd64:/usr/sbin" CC="/usr/gcc/14/bin/gcc" CFLAGS="-m64 -O3 " CXX="/usr/gcc/14/bin/g++" CXXFLAGS="-m64 -O3 " LDFLAGS="-m64" PKG_CONFIG_PATH="/usr/mariadb/10.6/lib/amd64/pkgconfig:/usr/openssl/3/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig" PYTHONPATH=/data/builds/oi-userland/components/python/isort/build/prototype/i386//usr/lib/python3.9/vendor-packages PATH=/data/builds/oi-userland/components/python/isort/build/prototype/i386//usr/bin:/usr/gcc/14/bin:/usr/clang/19/bin:/usr/ruby/3.2/bin:/usr/jdk/openjdk21/bin:/usr/postgres/16/bin:/usr/mariadb/10.6/bin:/usr/openssl/3/bin:/usr/bin/amd64:/usr/bin:/usr/gnu/bin:/usr/sbin/amd64:/usr/sbin PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="benchmark,hypothesispytest,pytest_mock" \
        /usr/bin/python3.9 -m pytest \
        --verbose --color=no --ignore tests/integration/test_hypothesmith.py --ignore tests/unit/test_pylama_isort.py )

and there are few patches used: https://github.com/OpenIndiana/oi-userland/tree/oi/hipster/components/python/isort/patches. It means that projects patched out from the dev dependency group are not installed when the testing is run.

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