Drop the re-exports so there is one import path per symbol - #241
Merged
Conversation
3.8.1 re-exported baseproc's resolvers and suppression from `ezmsg.sigproc.util.*` for backwards compatibility with 3.8.0, which had defined them there. That compatibility is worth less than the confusion it buys: two import paths for one thing, and -- while 3.8.0 was current -- two *different* ContextVars behind the same name, so a downstream package could enter one suppression context and be silenced by neither. Both releases are a day old and the symbols never existed before them. From here: * resolvers and suppress_axis_deprecation come from ezmsg.baseproc * AXIS_REMOVAL_VERSION and warn_axis_deprecated stay in ezmsg.sigproc.util.deprecation The remaining warn_axis_deprecated is not a re-export: it binds baseproc's to this distribution and its removal release so ~27 call sites stay one line. The sample-message re-exports in util.message are untouched; those predate all of this and have real users.
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.
Follow-up to #240, taking you up on the offer to break 3.8.0/3.8.1's added surface rather than live with two import paths.
What was wrong with the re-exports
3.8.1 re-exported baseproc's resolvers and
suppress_axis_deprecationfromezmsg.sigproc.util.*for compatibility with 3.8.0, which had defined them there. That compatibility bought less than the confusion it cost.The concrete failure: while 3.8.0 was current there were two different
ContextVars behind the same name.ezmsg-evententered baseproc's suppression context, sigproc's warning checked sigproc's — so nothing was suppressed and the forwarding warned twice. CI caught it; my local editable install had masked it. The fix at the time was a four-line comment in event and learn explaining which of two mechanisms to reach for. That comment is what this PR deletes.Both releases are a day old and none of these symbols existed before them.
The end state
resolve_chunk_dim,resolve_feature_dim,resolve_transform_dim,resolve_configured_chunk_dim,STREAMING_DIMSezmsg.baseprocsuppress_axis_deprecationezmsg.baseprocAXIS_REMOVAL_VERSION,warn_axis_deprecatedezmsg.sigproc.util.deprecationThe remaining
warn_axis_deprecatedis not a re-export — it binds baseproc's to this distribution and its removal release, so ~27 call sites stay one line and every message agrees on when the setting goes away. Its docstring now says so explicitly.The sample-message re-exports in
util.message(SampleMessage,SampleTriggerMessage,is_sample_message) are untouched: those predate all of this and have real users.Notes
Net −12 lines across 34 files; ruff collapsed the split imports back into single
from ezmsg.baseproc import (...)blocks, so most files got shorter.One import my rewrite pattern missed:
util/channels.pyusedfrom .message import resolve_feature_dim— relative withinutil/, so it didn't matchfrom .util.message import. Collection failed loudly and it's fixed.Testing
4285 unit + 51 integration pass; ruff clean. Verified the surface is actually gone rather than just unused —
ezmsg.sigproc.util.messageand.deprecationno longer expose any resolver or the suppression context.Downstream,
ezmsg-eventandezmsg-learnnow import suppression from baseproc and pin>=3.8.1; both suites pass against the real 3.8.1 wheel.