Skip to content

Commit

Permalink
Do not suppress CinderX import errors by default
Browse files Browse the repository at this point in the history
Summary: CinderX failing to initialize correctly can lead to cryptic errors in some tests which waste a lot of time tracking down. We suppressed these by default because we had some issues, I think particularly with the OSS build, with bootstrapping during the build. As we don't use the OSS build anymore we should no longer need to do this most of the time.

Reviewed By: alexmalyshev

Differential Revision: D59889831

fbshipit-source-id: b89082c1b5ab3aaa277c044ebea37cf661435cc2
  • Loading branch information
jbower-fb authored and facebook-github-bot committed Jul 20, 2024
1 parent 48359f2 commit e73e6ed
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,20 +582,6 @@ def execusercustomize():
(err.__class__.__name__, err))


# TODO(T172877814) remove
def init_cinder():
# ensure the CinderX pure-Python code is importable (only needed for in-repo
# builds; Buck installs CinderX alongside the stdlib)
cinderx_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'cinderx/PythonLib'))
if os.path.isdir(cinderx_dir):
sys.path.append(cinderx_dir)
try:
import cinderx
cinderx.init()
except (ImportError, AttributeError):
pass


def main():
"""Add standard site-specific directories to the module search path.
Expand All @@ -621,7 +607,8 @@ def main():
sethelper()
if not sys.flags.isolated:
enablerlcompleter()
init_cinder()
import cinderx
cinderx.init()
execsitecustomize()
if ENABLE_USER_SITE:
execusercustomize()
Expand Down

0 comments on commit e73e6ed

Please sign in to comment.