From 650622bc03d9d6345edf4a7a31a9a547ba63596c Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 16 Oct 2023 16:16:16 -0400 Subject: [PATCH] update docs describing new public class path for converter types --- docs/asdf/extending/converters.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/asdf/extending/converters.rst b/docs/asdf/extending/converters.rst index 9ac8c94e7..c2bc60b57 100644 --- a/docs/asdf/extending/converters.rst +++ b/docs/asdf/extending/converters.rst @@ -26,12 +26,12 @@ characters up to a ``/``, or ``**``, which matches any sequence of characters. The `~asdf.util.uri_match` method can be used to test URI patterns. `Converter.types` - a list of Python types or fully-qualified Python type names handled -by the converter. Note that a string name must reflect the actual location of the -class's implementation and not just a module where it is imported for convenience. -For example, if class ``Foo`` is implemented in ``example_package.foo.Foo`` but -imported as ``example_package.Foo`` for convenience, it is the former name that -must be used. The `~asdf.util.get_class_name` method will return the name that -`asdf` expects. +by the converter. For strings, the private or public path can be used. For example, +if class ``Foo`` is implemented in ``example_package.foo.Foo`` but imported +as ``example_package.Foo`` for convenience either ``example_package.foo.Foo`` +or ``example_package.Foo`` can be used. As most libraries do not consider moving +where a class is implemented it is preferred to use the "public" location +where the class is imported (in this example ``example_package.Foo``). The string type name is recommended over a type object for performance reasons, see :ref:`extending_converters_performance`.