File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ def _import_versioned_module():
2929
3030
3131def _patch_rlcompleter_for_cython_properties ():
32+ # TODO: This can be removed when Python 3.13 is our minimum-supported version:
33+ # https://github.com/python/cpython/pull/149577
34+
3235 # Cython @property on cdef class compiles to a C-level getset_descriptor,
3336 # which rlcompleter's narrow isinstance(..., property) check misses; the
3437 # fallback getattr() then invokes the descriptor and any non-AttributeError
@@ -37,15 +40,11 @@ def _patch_rlcompleter_for_cython_properties():
3740 # interactive mode so library users running scripts see no global
3841 # rlcompleter side effect.
3942 import os
40- import sys
4143
4244 if os .environ .get ("CUDA_CORE_DONT_FIX_TAB_COMPLETION" ):
4345 # Explicit opt-out for users who don't want the global rlcompleter
4446 # side effect, even in an interactive session.
4547 return
46- if not (hasattr (sys , "ps1" ) or sys .flags .inspect ):
47- # Plain `python script.py`, `python -c ...`, pytest, etc.
48- return
4948
5049 import rlcompleter
5150 from types import GetSetDescriptorType , MemberDescriptorType
You can’t perform that action at this time.
0 commit comments