Reading position, not mastery.
Reading settings
Line spacing
Text width
Saved only in this browser. Theme and colors are in Appearance.
Explore, understand, practice

Versioning: why yesterday's code can differ with today's installation

16 of 174 subtitles documented + 1 independent supplementary unit(s) · Writing progress, not your learning progress · Videos not visually reviewed

Objective and entry question

Find the installed version, distinguish requirements from a lockfile, and plan an upgrade check. If a video's import fails, must you have made a typing mistake?

Entry answer

No. The installed package or version may differ. Identify the interpreter, package name, and version before inspecting the import path.

Why use version numbers?

Applications depend on library contracts: function names, accepted inputs, result types, and documented behavior. When a library changes, consumers need a signal about possible code changes. Unrecorded installations can give two people different environments for the same source. Versioning and dependency locking address this general software problem, not something unique to AI.

SemVer communicates public-API changes. In MAJOR.MINOR.PATCH, incompatible changes affect major, compatible functionality affects minor, and compatible bug fixes affect patch. A stable public API is not assumed for 0.x releases. SemVer 2.0.0

This is not a guarantee against defects. Regressions, transitive dependencies, or reliance on private implementation details may still break an application. A version number informs a decision; it does not replace testing.

Invented examples

Change Contract-based interpretation Our practical action
1.2.3 → 1.2.4 Compatible fix Review changes and run relevant checks
1.2.3 → 1.3.0 Compatible functionality Review release notes and affected features
1.2.3 → 2.0.0 Potential incompatible public API Read migration guidance and adapt code

These numbers are teaching examples, not actual LangChain release claims. Compatibility concerns the declared public API; private internals may be outside that commitment.

Three records, three responsibilities

  • pyproject.toml declares requirements. A range differs from an exact version.
  • uv.lock records resolved dependencies. The subtitles say “uv.log”; this is corrected here.
  • The installed environment shows what actually runs now. A lockfile alone does not prove the IDE uses its corresponding environment.

Inspect the version in the environment running the example:

python -c "from importlib.metadata import version; print(version('langchain-core'))"

For a uv-managed environment, use uv run python ... with the same command body. Our current experiments used langchain-core version 1.5.2. This identifies the core package, not the version of the separate langchain package.

Limits of the instructor's version claims

Lecture 016 mentions 1.0.2, whereas the introduction's subtitles mentioned 1.3. Different recording dates could explain this, but subtitles alone do not establish the cause. Neither number is presented as today's latest release.

An unconstrained installation does not necessarily reproduce the course environment. Reproduction needs source, environment, resolved dependencies, and sometimes model/service settings. A lockfile does not stabilize every factor affecting a language model's response.

How should we check an upgrade?

Our suggested process: record current versions and expected behavior; make the change in a separate environment; read release/migration notes; rerun important examples; record results and the updated lockfile. Upgrading every package is not a prerequisite for understanding a lesson.

Example dependencies were not upgraded during this step. The LangChain v1 migration guide informs the following lessons about agent APIs rather than justifying unrelated environment changes.

Independent practice

  1. One person reports core 1.5.2, another reports langchain 1.0.2. Do those numbers alone prove incompatible environments?
  2. Why might identical pyproject.toml files with open ranges produce different installed versions?
  3. A patch upgrade breaks your check. Should SemVer make you ignore the failure?
Answer 1

No. They identify different packages. Inspect the complete dependency set and those packages' compatibility constraints.

Answer 2

A range permits several choices; resolution can vary with time and environment. A lockfile records more specific resolved choices.

Answer 3

No. Investigate the failure. The versioning contract communicates release intent; your check measures actual behavior relevant to the application.

Recall and continuation

Without the text, distinguish installed versions, requirements, and locking. If you can investigate an import failure step by step, continue to agents and the search project. Otherwise, design an interpreter/version mismatch and identify where you would inspect it.

Course basis: the complete lecture 016 subtitles. Examples and upgrade guidance are supplementary. Standard and official guidance checked on 2026-10-16. Video not visually reviewed.