{"record":{"id":"3c78cdd41f762fde","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-index-buf-accessor","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.index_buf_accessor is deprecated; use sglang.kernels.ops.attention.dsa.index_buf_accessor instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.index_buf_accessor is deprecated; use sglang\\.kernels\\.ops\\.attention\\.dsa\\.index_buf_accessor instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/index_buf_accessor.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.index_buf_accessor instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.index_buf_accessor is deprecated; \"\n    \"use sglang.kernels.ops.attention.dsa.index_buf_accessor instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.kernels.ops.attention.dsa.index_buf_accessor import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/index_buf_accessor.py#L1-L11","documentation":"Import-time DeprecationWarning from a compat shim: the NSA index_buf_accessor module moved to sglang.kernels.ops.attention.dsa.index_buf_accessor. The shim re-exports the new module so behavior is unchanged, but the old path will be deleted.","triggerScenarios":"Importing sglang.srt.layers.attention.nsa.index_buf_accessor directly or through the nsa package __init__; any from-import of names like index_buf_accessor helpers from the old path.","commonSituations":"Upgrading SGLang where NSA (Native Sparse Attention) code was renamed to DSA; user scripts or plugins pinned to the old module path.","solutions":["Update imports to sglang.kernels.ops.attention.dsa.index_buf_accessor","Grep the repo for `attention.nsa` and fix all occurrences","Add a CI check that fails on DeprecationWarning to prevent regressions"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.index_buf_accessor import *\n# after\nfrom sglang.kernels.ops.attention.dsa.index_buf_accessor import *","handlingStrategy":"validation","validationCode":"import importlib.util\nassert importlib.util.find_spec(\"sglang.kernels.ops.attention.dsa.index_buf_accessor\"), \"upgrade sglang-kernels\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import from the dsa namespace directly","Fail CI on DeprecationWarning from sglang.srt.layers.attention.nsa"],"tags":["deprecation","sglang","nsa","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}