zope.dottedname is a Python library that provides a single `resolve()` function for converting strings containing Python dotted names (e.g., 'os.path.join') into the corresponding Python object (module, class, function, etc.). It is currently at version 7.1 and is actively maintained by the Zope Foundation, with several releases per year to add new Python version support and address maintenance.
pip install zope.dottednameVerified import paths — ran on the pinned version, not inferred.
The `resolve` function is the core of `zope.dottedname`. It takes a dotted name string and returns the corresponding Python object. It can handle both absolute and relative dotted names, with relative names requiring an additional `relative_to` argument.
Ensure your project fully supports PEP 420 namespace packages and update any custom tooling that might still depend on `pkg_resources` for namespace resolution.
Always check the `requires_python` metadata on PyPI or the project's documentation when upgrading `zope.dottedname` to ensure compatibility with your Python environment. Update to a supported Python version if necessary.
For relative dotted names (e.g., starting with a dot), always supply the `relative_to` argument, which should be the dotted name of the module or package from which the relative import is intended.
Double-check the spelling of the module name. Ensure the module is installed and accessible in your Python environment. If it's a sub-module, verify the full dotted path (e.g., 'package.submodule').
Verify the spelling of the attribute. Confirm that the attribute is indeed exposed by the module and that you are using the correct full dotted path to it.
When resolving relative dotted names, always specify the `relative_to` argument with the full dotted name of the module or package against which the relative path should be resolved. For example: `resolve('.some_function', relative_to='my_package.my_module')`.No dependency data recorded yet.