Skip to content

Commit e254e08

Browse files
committed
One more example of non-public API
1 parent 8e1f667 commit e254e08

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/changes.rst

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog
33
=========
44

5+
v0.26.4
6+
-------
7+
8+
* Further API documentation.
9+
10+
511
v0.26.3
612
-------
713

docs/compatibility.rst

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ In the spirit of `having some explicit detail on Bowtie's public interfaces <reg
2121
* The instantiation of any type with no public identifier, even if instances of it are returned by other public API.
2222
E.g., `referencing._core.Resolver` is not publicly exposed, and it is not public API to instantiate it in ways other than by calling `referencing.Registry.resolver` or an equivalent.
2323
All of its public attributes are of course public, however.
24+
* The concrete types within the signature of a callable whenever they differ from their documented types.
25+
In other words, if a function documents that it returns an argument of type ``Mapping[int, Sequence[str]]``, this is the promised return type, not whatever concrete type is returned which may be richer or have additional attributes and methods.
26+
Changes to the signature will continue to guarantee this return type (or a broader one) but indeed are free to change the concrete type.
2427
* Any identifiers in any modules which are imported from other modules.
2528
In other words, if ``referencing.foo`` imports ``bar`` from ``referencing.quux``, it is *not* public API to use ``referencing.foo.bar``; only ``referencing.quux.bar`` is public API.
2629
This does not apply to any objects exposed directly on the ``referencing`` package (e.g. `referencing.Resource`), which are indeed public.

0 commit comments

Comments
 (0)