{"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":"validation","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/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/functions/eager.py#L35-L71","documentation":"When concatenating frames with how='horizontal', `strict=False` (padding shorter frames with nulls) was deprecated and removed. polars now raises ValueError and directs users to how='horizontal_extend', which encodes that behavior explicitly.","triggerScenarios":"Calling `pl.concat([df1, df2], how='horizontal', strict=False)` after upgrading polars; code with `strict=strict` passed through from a config flag set to False.","commonSituations":"Version upgrade breaking previously working concat calls; library code forwarding a strict parameter to concat.","solutions":["Replace `strict=False` with `how='horizontal_extend'`","Remove the `strict` argument entirely if default (strict=True) behavior is fine","Note that `strict` cannot be combined with 'horizontal_extend'"],"exampleFix":"// before\npl.concat([df1, df2], how='horizontal', strict=False)\n// after\npl.concat([df1, df2], how='horizontal_extend')","handlingStrategy":"try-catch","validationCode":"if how == 'horizontal' and strict is False:\n    how = 'horizontal_extend'\n    strict = None","typeGuard":null,"tryCatchPattern":"try:\n    out = pl.concat(frames, how='horizontal', strict=strict)\nexcept ValueError:\n    out = pl.concat(frames, how='horizontal_extend')","preventionTips":["After polars upgrades, grep codebase for `strict=False` with how='horizontal'","Use 'horizontal_extend' directly when null-padding is intended","Do not forward strict flags blindly from config to concat"],"tags":["polars","value-error","deprecation","concat"],"backgroundTag":"deprecated-api-usage","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}