{"record":{"id":"fecc1b26e8bce755","repo":"tqdm/tqdm","slug":"this-function-will-be-removed-in-tqdm-5-0-0-pleas","errorCode":null,"errorMessage":"This function will be removed in tqdm==5.0.0\nPlease use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`","messagePattern":"This function will be removed in tqdm==5\\.0\\.0\nPlease use `tqdm\\.notebook\\.tqdm` instead of `tqdm\\.tqdm_notebook`","errorType":"console","errorClass":"TqdmDeprecationWarning","httpStatus":null,"severity":"warning","filePath":"tqdm/__init__.py","lineNumber":25,"sourceCode":"    TqdmDeprecationWarning, TqdmExperimentalWarning, TqdmKeyError, TqdmMonitorWarning,\n    TqdmTypeError, TqdmWarning, tqdm, trange)\nfrom .version import __version__\n\n__all__ = ['tqdm', 'tqdm_gui', 'trange', 'tgrange', 'tqdm_pandas',\n           'tqdm_notebook', 'tnrange', 'main', 'TMonitor',\n           'TqdmTypeError', 'TqdmKeyError',\n           'TqdmWarning', 'TqdmDeprecationWarning',\n           'TqdmExperimentalWarning',\n           'TqdmMonitorWarning', 'TqdmSynchronisationWarning',\n           '__version__']\n\n\ndef tqdm_notebook(*args, **kwargs):  # pragma: no cover\n    \"\"\"See tqdm.notebook.tqdm for full documentation\"\"\"\n    from warnings import warn\n\n    from .notebook import tqdm as _tqdm_notebook\n    warn(\"This function will be removed in tqdm==5.0.0\\n\"\n         \"Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`\",\n         TqdmDeprecationWarning, stacklevel=2)\n    return _tqdm_notebook(*args, **kwargs)\n\n\ndef tnrange(*args, **kwargs):  # pragma: no cover\n    \"\"\"Shortcut for `tqdm.notebook.tqdm(range(*args), **kwargs)`.\"\"\"\n    from warnings import warn\n\n    from .notebook import trange as _tnrange\n    warn(\"Please use `tqdm.notebook.trange` instead of `tqdm.tnrange`\",\n         TqdmDeprecationWarning, stacklevel=2)\n    return _tnrange(*args, **kwargs)\n","sourceCodeStart":7,"sourceCodeEnd":39,"githubUrl":"https://github.com/tqdm/tqdm/blob/96f2e60e4584cdab57a23602e27043d0465254ad/tqdm/__init__.py#L7-L39","documentation":"tqdm.tnrange (top-level shortcut for notebook range bars) is deprecated with a TqdmDeprecationWarning directing you to tqdm.notebook.trange; it forwards to the notebook implementation but will be removed.","triggerScenarios":"from tqdm import tnrange; tnrange(100) — top-level notebook range alias.","commonSituations":"Legacy notebook code using tnrange(...); old StackOverflow answers.","solutions":["Use from tqdm.notebook import trange","Or from tqdm.auto import trange","Update shared snippets to the new import path"],"exampleFix":"# before\nfrom tqdm import tnrange\nfor i in tnrange(10):\n# after\nfrom tqdm.notebook import trange\nfor i in trange(10):","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    from tqdm import tnrange\nexcept Exception:\n    from tqdm.notebook import trange as tnrange","preventionTips":["Prefer trange from tqdm.notebook or tqdm.auto","Update legacy snippets copied from old notebooks"],"tags":["tqdm","notebook","range","deprecation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"96f2e60e4584cdab57a23602e27043d0465254ad","analyzedAt":"2026-08-28T11:23:10.474Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}