-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Debugging problems in Python 3.10 due to use of old Cython #47429
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
Comments
Hi, thanks for your report. We are already using the newest cython version. You can track the next release at #46610 |
Hi Patrick, thanks for your quick response. So pandas 1.4.3 will be built with the newest Cython version, that's a great relief. :) From what I understand, 1.4.3 was scheduled for the end of April but still faces some unresolved challenges, so it is unclear when it will be released. I was wondering if it is an option for pandas to release a stable version in the meantime, that fixes the debugging issue I described. Since you seem to be already building using the newest Cython, this should not involve much manual work? It would certainly be very appreciated (at least by me, but I gather there are quite some more affected in the community). |
@cartisan releases will happen when they happen |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Executing this code works as expected. But when I place a PyCharm debugger breakpoint on any line after
dtype = numeric.dtype(float)
and run in PyCharm debug mode I get the following exception:This behavior has been observed in numpy ( numpy/numpy#21008 ) and determined to be related to a Cython issue. The issue has been resolved by the latest Cython release (0.29.30) and the newest numpy release (1.22.4) that was built using that Cython version seems to be doing fine.
Would it be possible to expedite a minor pandas version update, completely similar to 1.4.2 but built using the new Cython? This has been a major pain point for ML development at my company for quite some time, so I wanted to check in and see if perhaps anything can be done.
Expected Behavior
I can use the debugger on the above code.
Installed Versions
Traceback (most recent call last):
File "", line 1, in
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/pandas/util/_print_versions.py", line 109, in show_versions
deps = _get_dependency_info()
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/pandas/util/_print_versions.py", line 88, in _get_dependency_info
mod = import_optional_dependency(modname, errors="ignore")
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/pandas/compat/_optional.py", line 138, in import_optional_dependency
module = importlib.import_module(name)
File "/home/leonid/.pyenv/versions/3.10.5/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/setuptools/init.py", line 8, in
import _distutils_hack.override # noqa: F401
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/_distutils_hack/override.py", line 1, in
import('_distutils_hack').do_override()
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/_distutils_hack/init.py", line 72, in do_override
ensure_local_distutils()
File "/home/leonid/.local/share/virtualenvs/prism_ada-nMYNssaU/lib/python3.10/site-packages/_distutils_hack/init.py", line 59, in ensure_local_distutils
assert '_distutils' in core.file, core.file
AssertionError: /home/leonid/.pyenv/versions/3.10.5/lib/python3.10/distutils/core.py
The text was updated successfully, but these errors were encountered: