{"record":{"id":"871cdac41ac7bdd1","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-utils-is-deprecate","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.utils is deprecated; use sglang.srt.layers.attention.dsa.utils instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.utils is deprecated; use sglang\\.srt\\.layers\\.attention\\.dsa\\.utils instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/utils.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.utils instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.utils is deprecated; \"\n    \"use sglang.srt.layers.attention.dsa.utils instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.srt.layers.attention.dsa.utils import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/utils.py#L1-L11","documentation":"DeprecationWarning from the nsa.utils compat shim: utils moved to sglang.srt.layers.attention.dsa.utils (still under srt.layers, unlike the kernel modules moved to sglang.kernels). The shim star-imports the new module.","triggerScenarios":"`import sglang.srt.layers.attention.nsa.utils` or from-imports of its helpers.","commonSituations":"Utility imports for sparse attention bookkeeping on older code paths after upgrading SGLang.","solutions":["Import from sglang.srt.layers.attention.dsa.utils","Update all `nsa.utils` references project-wide","Watch for the removal release and migrate before upgrading to it"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.utils import *\n# after\nfrom sglang.srt.layers.attention.dsa.utils import *","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import utils from sglang.srt.layers.attention.dsa.utils","Note this one stays under srt.layers (not sglang.kernels)"],"tags":["deprecation","sglang","utils","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}