Repository navigation
0.22.0 (2026-11-25)
0.22.0 gives every timestamp one clock. On 12 March 2023, New York moved its clocks from 02:00 to 03:00, so that Sunday had 23 hours. Ask for a one-day window ending at noon that Sunday and there are two answers: from Saturday noon (23 hours) or from Saturday 11:00 (24 hours). mloda had no rule for this, so every backend picked its own. This release writes the rule down once and makes every backend follow it. Seconds, minutes and hours are elapsed time. Days, weeks, months and years follow the calendar of the column's own zone. A timestamp keeps its zone when it moves between backends, or the move fails and names the column. Docs: Time zone computation rule.
🕰 What each backend did with a zone
- DuckDB read every zone back as UTC. A
+05:00orEurope/Berlincolumn went into aDuckdbRelationand came out in UTC. The relation now remembers the zone and hands it back (#2972, #3016). - Polars called
+05:00UTC and failed with a rawComputeErroron+05:30. It now keeps whole-hour offsets asEtc/GMT-5and names the column when it cannot hold an offset (#2976, #3083). - Spark stored the instant and dropped the zone. The zone now travels in the field metadata and comes back on the way out (#3030, #3045).
- One environment variable moved the clock. pandera and pandas-on-Spark set
PYARROW_IGNORE_TIMEZONE, which made PyArrow read a wall time as UTC and store the wrong instant. mloda now converts to UTC first and keeps the zone (#3012, #3030, #3041). - A column with two zones took the first one. It now fails and names the column and both zones. So does a column that mixes naive and aware values.
pd.NaTcounts as missing (#3055, #3073, #3083, #3094). - A month was 30 days. A
1_monthwindow now starts on the same day of the previous month. The pandas time window got faster on the way: a1_daywindow over 200,000 minute rows in New York went from 5.1 s to 0.13 s, a1_monthmedian from 196 s to 2.7 s (#2979, #3014, #3028).
If you build a backend on mloda.testing, the type and append suites now run these zoned cases against it.
✨ Also new
- Planning warns when a context option never reaches the input feature group that declares it, and says how to pass it (#3071, #3081, #3096).
- A global filter on an output part (
<base>~<part>) now filters. Before, it was dropped with a warning and the run returned unfiltered rows (#2950, #2973). - Plugin authors import from public modules:
arrow_arrayandarrow_tablefrommloda.user.pyarrow,DuckdbRelation,SqliteRelationand the SQL window helpers frommloda.user.duckdbandmloda.user.sqlite,TimeRule,source_identity,is_credential_abortandis_non_negative_numberfrommloda.provider(#3058, #3064, #3069, #2979, #3057, #3013, #3085). - Faster runs: THREADING runs wait for a finished step instead of checking nonstop (#2947), multiprocessing workers load feature group modules before their first step (#3052), and text cleaning loads nltk only when it removes stopwords, about 1.3 s less per process (#3042).
Since 0.21.0: 5 days, 65 commits, 64 merged pull requests, four people. Thank you @Aschenbath, @mercael91 and @Viraj-Anand.
⚠ Breaking changes
- Month and year follow the calendar. In time windows and forecast steps,
monthandyearwere 30 and 365 days. They are now calendar months and years; a day missing from the month moves to its last day (31 March minus one month is 28 February). On a zone with daylight saving time,dayandweekare calendar days and weeks too. Naive, UTC and fixed-offset columns keep theirdayandweekresults, andsecond,minute,hourand24_hourdo not change. To keep the old lengths, setOptions(group={"time_rule": {"calendar_units": "fixed_length"}})on the feature. If you subclass these groups:_perform_window_operationgets aWindowSpaninstead of atimedelta,_get_time_deltais now_window_span, and forecastingperformcallbacks get the rule as one more argument (#2979). Docs: Choosing another rule for a feature. - Zones stay, or the run fails.
DuckdbRelation.df()returns a zoned column in its own zone, not UTC (#3016). On Spark, a column that arrives with a zone is now aware: a naive filter on it raises, and it no longer fits aTIMESTAMP_MICROSdeclaration (#3030). Polars keeps+05:00asEtc/GMT-5instead of UTC (#3083). A column with two zones, or with naive and aware values, raises aValueErrornaming the column (#3055, #3073, #3083). - Plan locks need one rewrite. Plans now mark a step that moves data onto pandas or SQLite, which cannot tell NaN from null (
potential_nan_null_loss, shown byexplain). A committed plan lock with such a step failscheck_plan_lockonce. Rewrite it withwrite_plan_lock(#3066). Docs: Frameworks that hold NaN as null. - Sklearn artifacts moved to a private folder. Without
artifact_storage_path,SklearnArtifactnow saves to~/.cache/mloda/sklearn_artifacts(or under$XDG_CACHE_HOME), readable only by you. It used the shared temp folder before, so artifacts saved there are not found anymore. Where HOME is not writable, setartifact_storage_path(#3029). - Copies with different values no longer share one call. A feature group without name patterns that got the same feature twice, with different values for a declared context key, ran once, and one side read the other's value. Now each value runs on its own, or planning fails with "reached twice with differing values" and names the key (#3088). For keys a group sets by hand on its input, declare them with
Feature(..., split_context_keys=...)(#3077). Docs: Feature chain parser. - Plugin test kit checks more. An output type the check cannot resolve fails unless a
gaprecord covers it, and agaprecord no longer excuses a wrong type; use atyperecord for that (#3027).DataTypeValidatorSuiteandAppendColumnsSuiteadd zoned cases: keep instants and zone, raise naming the column, or list the case inunsupported_cases(#3012, #3055, #3073, #3083). A source whose access holds a credential must return it frommatch_credentials(#2965). Docs: Feature group testing. - Smaller changes. A
DECLAREDsource route claims only its declared names and prefixes, no longer its class name orfeature_names_supported()(#2943). The artifact saver now runs inside the calculate step, before transform, filtering and output validation (#3037).time_ruleand othergroup_onlykeys are refused inOptions(context=...)(#3009).read_credential(None)raisesCredentialReadRefusednaming the unset option (#2965).check_subclass_scopereports a deferred-binding steal as a note, not a failure (#2986). The text cleaning modules no longer havenltkandnltk_availableglobals (#3042). Thedocsextra needs Python 3.11.5 or newer and no longer installsnotebook(#3078, #3086). If this broke your setup, please tell us in an issue or just write me a message.
Also: soupsieve 4.0 in the docs extra clears three advisories (not a runtime dependency) (#3078), the publish jobs run in their own PyPI environments (#3023), and new docs on savers that write several artifacts (#3039).
Full changelog (auto-generated from the commits)
🎯 Minor Release
- define the time zone computation rule and apply it to time windows and forecasting (#2979) (f5836fd)
✨ Features
- a compute framework declares that NaN is null, and the plan marks a possible NaN/null loss (#3066) (c442a39)
- let a property_spec declare a key group-only, refused in the context at plan time (#3009) (1496de5)
- public source_identity for provider identities, non-Optional scope helper types (#3057) (59806a8)
- publish arrow_array and arrow_table from mloda.user.pyarrow (#3058) (fafaa6b)
- publish DuckdbRelation and SqliteRelation from their mloda.user backend modules (#3064) (974dbbd)
- publish the SQL window primitives, quote_ident and pick_helper_column_name from mloda.user.duckdb and mloda.user.sqlite (#3069) (a35aeb1)
- scalar-only PropertySpec values and is_non_negative_number (#3085) (3f107cc)
- split calls by hand-set or renamed input context with split_context_keys (#3077) (1eed31c)
♻️ Improvements
⚡️ Improvements
- import nltk only when text cleaning removes stopwords (#3042) (c3ec40f)
- pre-warm feature group modules in multiprocessing standby workers (#3052) (b191161)
- roll pandas time windows whose start moves back without a per-row recompute (#3028) (f360cde)
- vectorize calendar lower bounds in the pandas time window (#3014) (306d9c9)
🐛 Bug Fixes
- a pinned global filter no longer hides the default-equivalent warning for a double request (#2984) (f014bd9)
- an injected filter twin no longer warns as a default-equivalent double request (#2978) (5875651)
- an injected index twin no longer warns as a default-equivalent double request (#2967) (f450380)
- an unreadable feature name binds no declared key in the twin context check (#3098) (00a01a5)
- attach a global filter on a declared output part to the group serving that part (#2950) (852223d)
- compare pass-through inputs with the adapter's readback and excuse a zero-row output that follows a reframed input (#3093) (b871d6c)
- DECLARED source routes claim only declared names and prefixes (#2943) (40ac1ea)
- deps: raise the soupsieve floor to 4.0 and mark the docs notebook extras for Python 3.11.5+ (#3078) (c763d9d)
- DuckdbRelation keeps a tz-aware column's source zone (#2972) (16cb7f3)
- DuckdbRelation.df() returns tz-aware columns in their recorded zone (#3016) (852f5fa)
- excuse an input column the adapter frames differently on zero rows in the shape check (#3035) (8e6f319)
- fail an undeclared unresolved type in the shape check and scope its excuses (#3027) (94542ca)
- fold parts-only child-options twins whose requested parts differ into their narrower-framework twin (#2954) (1d5d717)
- keep eliminations in resolve_feature when a FeatureResolutionError escaped (#2955) (c1c13d0)
- keep instants and zone in feature group Arrow builds under PYARROW_IGNORE_TIMEZONE (#3041) (5edb758)
- keep instants and zone of aware test data under PYARROW_IGNORE_TIMEZONE, cover a DST zone and a sub-hour offset in the dtype suite (#3012) (59ff4bd)
- keep one zone per aware datetime column or reject it naming the column, type naive Spark columns as TimestampNTZ (#3055) (4cf5a11)
- keep tests within budget under a loaded parallel run (#3034) (2463167)
- keep the part column name for a global filter on an implicit vec~N column (#2973) (6aad0fc)
- keep the timezone across framework transfers and carry it on ColumnSemantics (#3030) (20080bd)
- keep the zone of aware Spark dict, append and zero-row columns and report ns for DuckDB TIMESTAMPTZ_NS (#3045) (51e1daa)
- keep whole-hour fixed offsets in Polars builds and reject a column mixing naive and aware datetimes (#3083) (ee387b9)
- name a config-path group the request selects but that misses a required key (#3101) (bec02a4)
- plugin scope checks note deferred_binding selectors and cover sibling backends under an inert base (#2986) (c7c8e51)
- probe the foreign name without in_features on a mixin group's configuration path in the shape check (#3044) (a629ed6)
- raise a clear ValueError for sub-hour fixed-offset timestamps in the Polars transfer (#2976) (ae5974e)
- record a consumer's own declaration for a Feature object shared by several consumers in the lost context key warning (#3096) (341ada2)
- refuse a narrower-twin fold that forces a consumer to convert a restricted producer's frame (#3068) (a70efc5)
- reject a mixed-zone aware datetime column in Polars dict builds and appends (#3073) (8c5a386)
- route the connection conflict through worker dispatch and expose is_credential_abort (#3013) (2d2ab5c)
- run the artifact saver inside the instrumented calculate call so extenders see its credential reads (#3037) (6e462f3)
- serve a declared part of a declared-prefix source name as base plus part (#2952) (ffd65f1)
- show a registered declared handle name in the frame_for no-frame error (#2985) (d4cfd74)
- SklearnArtifact defaults to a private per-user cache dir and saves atomically (#3029) (4d85cfd)
- split or reject copies of a group without name patterns that differ in a declared context key (#3088) (4a863e5)
- the shape check flags an optional binder whose access holds a credential match_credentials does not return (#2965) (4813c56)
- track delivered context keys per consumer and input pair in the lost context key warning (#3081) (9bb73d6)
- treat pd.NaT as a missing value in aware datetime lists (#3094) (8ed986d)
- type activate() with-block values as non-Optional (#3018) (cad9014)
- wait for a finished step thread instead of re-checking nonstop in THREADING runs (#2947) (2d34445)
- warn on post-resolution default-equivalent folds and guard whole/part folds by their consumers (#3059) (f4f4ce5)
- warn when a context option does not reach the input group that declares it as a group option (#3071) (7c2c7bf)
👷 CI
📚 Documentation
- explain artifact_value for multi-artifact savers and the one binding per FeatureSet (#3039) (ded9042)
- note that the uv bundled with tox must meet required-version (#3080) (dc3e4d1)
- record SQLite as value-fit for exact type readback in the framework adapter (#3022) (c5217ca)