Repository navigation
Replace emport with an in-tree import_file - #4
Merged
Merged
Conversation
emport's import_file registers a file's parent package with SourceFileLoader.load_module(), which Python 3.14 deprecates (removal in 3.15). With DeprecationWarning promoted to an error, importing a slashconf directory fails on 3.14. emport's latest release still has the call, so port its import_file into slash.utils.import_utils using exec_module() and drop the dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nakulj
added this pull request to stack #5
October 7, 2026 23:19
|
@nakulj My Claude says that 1.4.1 is fine and the problem is slash pinning 1.3.1 |
ps-groscoe
reviewed
Oct 8, 2026
ps-groscoe
reviewed
Oct 8, 2026
Co-authored-by: Geordie Roscoe <137822494+ps-groscoe@users.noreply.github.com>
ps-groscoe
reviewed
Oct 8, 2026
ps-groscoe
reviewed
Oct 8, 2026
Co-authored-by: Geordie Roscoe <137822494+ps-groscoe@users.noreply.github.com>
Co-authored-by: Geordie Roscoe <137822494+ps-groscoe@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
CI fails on Python 3.14 in
test_local_conf_with_slashconf_dir. emport'simport_fileregisters a file's parent package withSourceFileLoader.load_module(), which 3.14 deprecates (it's removed in 3.15), and pytest turnsDeprecationWarninginto an error. emport's latest release (1.4.1) still makes that call, and emport is the only thing slash uses it for.Description
Port emport's
import_fileintoslash/utils/import_utils.py, registering the parent package withexec_module()instead ofload_module(), and drop the emport dependency. The loader, local config and plugin manager use the new helper. emport is BSD-licensed and by the same author as slash; the module docstring credits it.Verification
tests/test_import_utils.py, including its no-warnings test, and added a test that a failed package import doesn't stay insys.modules.🤖 Generated with Claude Code