{"id":1517,"library":"ipython-genutils","title":"IPython Generic Utilities","description":"ipython-genutils (version 0.2.0) is a collection of IPython-specific utility functions and modules that were extracted from the main IPython project. It served as a dependency for older IPython components and related projects during the Python 2 to 3 transition. It is considered vestigial, no longer actively developed, with its last release in 2017. New projects should avoid direct reliance on it.","status":"deprecated","version":"0.2.0","language":"en","source_language":"en","source_url":"https://github.com/ipython/ipython_genutils","tags":["ipython","utility","deprecated","jupyter"],"install":[{"cmd":"pip install ipython-genutils","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"Provides version details for ipython-genutils itself.","symbol":"version_info","correct":"from ipython_genutils.version import version_info"},{"note":"A boolean indicating if running on Python 3. Part of the Python 2/3 compatibility layer, largely irrelevant for modern Python development.","symbol":"PY3","correct":"from ipython_genutils.py3compat import PY3"},{"note":"Retrieves the IPython configuration directory. For modern Jupyter/IPython installations, consider `jupyter_core.paths` instead.","symbol":"get_ipython_dir","correct":"from ipython_genutils.path import get_ipython_dir"},{"note":"Provides a context manager for temporary directories. Python's standard library `tempfile.TemporaryDirectory` should be preferred.","symbol":"TemporaryDirectory","correct":"from ipython_genutils.tempdir import TemporaryDirectory"}],"quickstart":{"code":"from ipython_genutils.version import version_info\nfrom ipython_genutils.py3compat import PY3\nfrom ipython_genutils.path import get_ipython_dir\n\nprint(f\"ipython-genutils version: {'.'.join(map(str, version_info))}\")\nprint(f\"Running on Python 3: {PY3}\")\n\n# Note: This path utility is largely internal to IPython/Jupyter now.\n# For new projects, consider `jupyter_core.paths` or `pathlib`.\nipython_dir = get_ipython_dir()\nprint(f\"Detected IPython directory (if configured): {ipython_dir}\")\n","lang":"python","description":"This quickstart demonstrates importing and using a few common utilities from ipython-genutils, such as checking its version, verifying Python 3 compatibility, and retrieving the IPython directory path. It highlights that the library's functions are typically low-level or superseded."},"warnings":[{"fix":"New projects should avoid using `ipython-genutils` directly. Migrate to `pathlib`, `tempfile`, or `jupyter_core.paths` as appropriate for similar functionality.","message":"This library is considered vestigial and is no longer actively maintained. Its utilities have largely been superseded by modern Python standard library features (e.g., `pathlib`, `tempfile`) or integrated into other active projects (e.g., `jupyter_core.paths` for path utilities).","severity":"deprecated","affected_versions":"0.2.0 and prior"},{"fix":"Rely on standard library features or actively maintained third-party libraries for similar functionality to ensure long-term compatibility and security patches.","message":"Due to its lack of maintenance, `ipython-genutils` does not receive updates for new Python versions. While it currently works on recent Python 3, future Python versions may introduce incompatibilities that will not be addressed.","severity":"gotcha","affected_versions":"0.2.0 and prior, especially on Python 3.8+"},{"fix":"Review the source code of specific utilities before use to understand their purpose and limitations. Prefer higher-level abstractions or actively maintained libraries where available.","message":"The utilities within `ipython-genutils` were extracted from IPython's internal codebase and are generally low-level. They are not intended for direct end-user application development in most cases and may have unexpected edge cases or limited scope.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}