Skip to content

fix: replace __builtins__.__import__ with builtins.__import__ in test_mlflow_manager#88

Open
s0wa48 wants to merge 1 commit intosentient-agi:mainfrom
s0wa48:fix/issue-72-tests-test-mlflow-manager-fa
Open

fix: replace __builtins__.__import__ with builtins.__import__ in test_mlflow_manager#88
s0wa48 wants to merge 1 commit intosentient-agi:mainfrom
s0wa48:fix/issue-72-tests-test-mlflow-manager-fa

Conversation

@s0wa48
Copy link

@s0wa48 s0wa48 commented Feb 21, 2026

Summary

  • In Python 3.12 on macOS (and other platforms), __builtins__ can be a dict rather than a module, so __builtins__.__import__ raises AttributeError: 'dict' object has no attribute '__import__', causing pytest to crash with an INTERNALERROR during collection.
  • The fix replaces __builtins__.__import__ with builtins.__import__ (via import builtins), which is always a module and always has __import__, making the behaviour consistent across all Python versions and platforms.

Fixes #72


This PR was auto-generated by Gittensor bot using Claude AI to fix a reported issue.

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

Successfully merging this pull request may close these issues.

[tests] test_mlflow_manager fails on Python 3.12 because __builtins__ is a dict

1 participant