{"record":{"id":"738c2ba4d5fbff72","repo":"pola-rs/polars","slug":"strict-false-is-no-longer-supported-for-how-ho","errorCode":null,"errorMessage":"`strict=False` is no longer supported for `how='horizontal'`. Use `how='horizontal_extend'` to pad shorter frames with `null`.","messagePattern":"`strict=False` is no longer supported for `how='horizontal'`\\. Use `how='horizontal_extend'` to pad shorter frames with `null`\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/functions/eager.py","lineNumber":53,"sourceCode":") -> ConcatMethod:\n    \"\"\"Normalize deprecated horizontal concat arguments.\"\"\"\n    if how == \"horizontal\":\n        match strict:\n            case None:\n                return \"horizontal\"\n            case True:\n                issue_deprecation_warning(\n                    f\"the `strict` parameter for `{function_name}` is deprecated. \"\n                    \"`how='horizontal'` already requires equal heights; omit `strict`.\",\n                    version=\"2.0.0\",\n                )\n                return \"horizontal\"\n            case False:\n                msg = (\n                    \"`strict=False` is no longer supported for `how='horizontal'`. \"\n                    \"Use `how='horizontal_extend'` to pad shorter frames with `null`.\"\n                )\n                raise ValueError(msg)\n\n    if how == \"horizontal_extend\" and strict is not None:\n        msg = \"`strict` cannot be used with `how='horizontal_extend'`\"\n        raise ValueError(msg)\n\n    return how\n\n\ndef concat(\n    items: Iterable[PolarsType],\n    *,\n    how: ConcatMethod = \"vertical\",\n    rechunk: bool = False,\n    parallel: bool = True,\n    strict: bool | None = None,\n) -> PolarsType:\n    \"\"\"\n    Combine multiple DataFrames, LazyFrames, or Series into a single object.","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/py-polars/src/polars/functions/eager.py#L35-L71","documentation":"ValueError raised by polars' concat normalization when strict=False is combined with how='horizontal'. Padding shorter frames with null on horizontal concatenation was split into a dedicated how='horizontal_extend' mode, so the old strict=False escape hatch is rejected with a pointer to the new mode.","triggerScenarios":"pl.concat([df1, df2], how='horizontal', strict=False) — frames of differing widths or lengths with the legacy flag.","commonSituations":"Post-upgrade breakage: code that relied on strict=False to align DataFrames of unequal column counts/lengths side by side; old notebooks concatenating batches with ragged schemas.","solutions":["Switch to pl.concat([...], how='horizontal_extend') which pads with nulls","Or make frames equal-length/equal-width first (df.hstack, with_columns(pl.lit(None))) if strict horizontal semantics are wanted","Remove strict entirely if all frames already match"],"exampleFix":"# before\npl.concat([df1, df2], how='horizontal', strict=False)\n# after\npl.concat([df1, df2], how='horizontal_extend')","handlingStrategy":"validation","validationCode":"if how == 'horizontal' and strict is False:\n    how, strict = 'horizontal_extend', None","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use horizontal_extend for unequal frames","Remove stale strict flags from config-driven concat calls","Test concat paths after upgrades"],"tags":["python","polars","concat","horizontal","migration"],"backgroundTag":"removed-parameter-combination","analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-28T18:02:35.179Z","contentChangedAt":"2026-08-28T18:02:35.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}