Skip to content

Commit

Permalink
One more example of non-public API
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Mar 27, 2023
1 parent 8e1f667 commit e254e08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
=========

v0.26.4
-------

* Further API documentation.


v0.26.3
-------

Expand Down
3 changes: 3 additions & 0 deletions docs/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ In the spirit of `having some explicit detail on Bowtie's public interfaces <reg
* The instantiation of any type with no public identifier, even if instances of it are returned by other public API.
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.
All of its public attributes are of course public, however.
* The concrete types within the signature of a callable whenever they differ from their documented types.
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.
Changes to the signature will continue to guarantee this return type (or a broader one) but indeed are free to change the concrete type.
* Any identifiers in any modules which are imported from other modules.
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.
This does not apply to any objects exposed directly on the ``referencing`` package (e.g. `referencing.Resource`), which are indeed public.
Expand Down

0 comments on commit e254e08

Please sign in to comment.