Skip to content

Commit 63a3d18

Browse files
committed
docs: version hazard
1 parent 2dd3841 commit 63a3d18

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

oeps/best-practices/oep-0068-bp-content-identifiers.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ as a type annotation wherever it's known.
260260
``Key`` for historical reasons. This distinction can be ignored by consumers—they're all
261261
``_keys``. We plan to rename all ``*Locator`` classes to ``*Key`` in the future.
262262

263+
⚠️ **Historical hazard:** Older types like ``CourseLocator`` can represent both
264+
version-aware and version-agnostic identifiers. This has led to all sorts of bugs and is
265+
widely considered a mistake. New OpaqueKey classes should refer to exactly one kind of
266+
resource—version information must be either always present or always absent, never optional.
267+
263268
.. _openedx/opaque-keys: https://github.com/openedx/opaque-keys
264269

265270
UUIDs

0 commit comments

Comments
 (0)