Changelog#

All notable changes to labapi are documented here in release order.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. This changelog is written for package users and maintainers, so entries call out user-visible behavior, supported runtime changes, and release-engineering details that affect development workflows.

Unreleased#

1.3.0 - 2026-11-18#

Added#

  • Support for Python 3.14.

  • Client(ssl_host_bundle=True) verifies TLS certificates against the operating system’s trust store via truststore, for networks behind a TLS-inspecting proxy whose root CA is installed only in the OS store. It requires the new labapi[truststore] extra.

  • NotebookPage.copy_to() and NotebookDirectory.copy_to() accept strict=True, which makes an entry that fails to copy abort the copy instead of being warned about and skipped.

  • A changelog page in the documentation, rendered from CHANGELOG.md.

Changed#

  • Network failures (DNS, connect, TLS, proxy, timeout, or a stream broken mid-read) now raise the new labapi.TransportError, a subclass of ApiError, instead of requests exceptions. Its message names only the exception type and the endpoint path, and it chains no original exception, so the signed request URL no longer reaches tracebacks or logs.

  • HTTP error messages no longer include the request’s query string or the response body. They carry the status code, the endpoint path, and LabArchives’ error code and description; for a non-XML body, its Content-Type and size instead.

  • When copy_to() fails partway, the page or directory it created is moved to API Deleted Items instead of being left in the destination.

  • User.get_max_upload_size() returns at most 250 MiB, the largest file the attachment upload endpoint accepts, even when the account reports a higher limit.

  • Attachment.from_file() raises TypeError for a path-like object whose path is bytes, where it used to fail an assert.

  • Unit tests now run on Windows and macOS as well as Linux.

  • Refreshed the locked dependencies and the development tools (ruff 0.17.5, ty 0.0.104, pyright 1.1.414, pytest 9.2.0). The only runtime requirements that changed are the ones listed under Security.

Deprecated#

  • The Client(strict_cert=...) option. Passing it explicitly now emits a DeprecationWarning; behavior is otherwise unchanged, and it has no effect when ssl_host_bundle=True. Use ssl_host_bundle=True instead.

Removed#

  • Support for Python 3.10, which reached end of life in October 2026, and for Python 3.11.0 through 3.11.4. labapi now requires Python 3.11.5 or newer, the oldest version the security fixes for the locked pillow, filelock and soupsieve dependencies are published for.

Fixed#

  • Entries.create_json_entry() now serializes every value its JsonData type accepts: other sequence and mapping types (such as range or MappingProxyType) are converted to lists and dicts instead of raising TypeError. Bytes-like values are rejected with a clear TypeError.

  • Any 2xx HTTP status counts as success. A 201, 202 or 204 response used to raise ApiError.

  • Query parameters with an empty value are kept when a request URL is signed, instead of being dropped.

  • Browser login no longer hangs when another program connects to the local callback port without sending a request, and no longer loses the authentication code when the browser closes the connection early.

  • When LA_AUTH_BROWSER is set and listing the installed browsers fails, labapi falls back to automatic browser detection instead of raising.

  • Client.login() keeps a notebook whose default-notebook flag is missing or malformed. It used to leave that notebook out of user.notebooks.

  • "name" in container is True for an existing empty directory, and Index.Name: "name" in user.notebooks is False when no notebook has that name.

  • The TraversalError raised for a path that passes through a page names the page, not the full requested path.

  • Notebook.backup() downloads to a temporary file and replaces the destination only when the download completes, so an interrupted backup no longer destroys an existing archive.

  • Notebook.export() shortens file and directory names to 240 UTF-8 bytes, so long names in non-ASCII scripts no longer exceed the filesystem’s limit, and exports a backup attachment that has no stored filename as attachment_<id> instead of failing with TypeError.

  • copy.copy() and copy.deepcopy() of an Attachment or a StreamingResponse no longer raise RecursionError, and an Attachment can be pickled.

  • The temporary file behind an attachment is closed when reading or downloading it fails partway.

  • A failed streaming request reads at most 64 KiB of the error response instead of the whole body.

  • Examples: populate_notebook.py no longer reports a false authentication error on Windows consoles that cannot print ✓; the model_logging and notebook_logging loggers no longer raise NodeExistsError for two logs in the same second; and NotebookLogger works without IPython installed.

Security#

  • Raised the minimum cryptography (to 50.0.0), lxml (to 6.1.1), and requests (to 2.33.0) requirements to versions carrying published security fixes: cryptography’s PKCS#7 padding-oracle fix (CVE-2026-69247), lxml’s xlink:href sanitization and bundled libxslt fixes (CVE-2026-49825, CVE-2025-7424, CVE-2025-11731), and requests’ extract_zipped_paths fix (CVE-2026-25645).

1.2.0 - 2026-08-19#

Added#

  • Entries now expose optional read-only creation, update, and version metadata.

  • Client accepts a timeout parameter, applied to every request it makes.

  • Notebook.backup() downloads a notebook’s native LabArchives backup archive or JSON response, with options to omit attachment payloads.

  • Notebook.export() materializes a notebook as a local directory tree, preserving empty directories and pages, entry ordering, attachments, and per-page metadata. The optional labapi[export] extra reads native backup archives; the default source falls back to the live API when needed.

  • Notebook.url and NotebookPage.url return authenticated LabArchives Web UI links, backed by a new Client.web_url.

  • Entries returned by Notebook.search() now carry the same created_at, updated_at, and version metadata as entries loaded from a page.

  • to_datetime() converts LabArchives ISO-8601 timestamps and can be used as an extract_etree() mapper.

Changed#

  • The project is now distributed under the MIT License, replacing CC0-1.0.

  • Client base URLs now discard fragments and warn when they contain query parameters that cannot be preserved in API requests.

  • Versioned documentation shows only the newest release candidate and keeps the root and latest/ aliases on the newest final release.

  • The LabArchives 4999 error is no longer reproducible against the current API and has been removed from the limitations guide. The handling in AttachmentEntry.content is unchanged.

  • extract_etree(..., raise_missing=False) now omits a value its mapper rejects, warning rather than raising ExtractionError, so one malformed optional value no longer aborts the whole extraction. Strict extraction is unchanged.

  • Updated the locked indirect Pillow dependency from 12.2.0 to 12.3.0.

  • Updated the locked cryptography dependency from 48.0.1 to 50.0.0.

Fixed#

  • Authentication honors configured timeouts and token expiry, and LA_AUTH_BROWSER=edge reliably selects Microsoft Edge.

  • Tree traversal correctly handles escaped names, membership checks with Index.Name, notebook-path hashing, and relative paths rooted at a notebook.

  • Attachment uploads rewind seekable files when needed; cached attachment downloads stream in chunks; and attachment updates report LabArchives error 4999 with actionable context.

  • json_sync preserves JSON attachments with duplicate basenames and records failures for individual attachment downloads instead of abandoning the entry.

  • create_json_entry() raises PartialEntryCreateError when an attachment is orphaned, and unsupported entry wrappers are rejected before creation.

  • XML responses retain their original encoding, EntrySearch tolerates disappearing result pages, and extraction errors handle mappers without a __name__ attribute.

  • PlainTextEntry.content rejects non-string values before an API request, the public parse exceptions are available from labapi, and the API Deleted Items directory cannot be deleted accidentally.

  • Attachment downloads recover the original filename from a redirected Amazon S3 URL when the response headers omit one.

  • Attachment entries keep the filename LabArchives reports in page and search listings, and the filename supplied at upload time, in preference to a generated download filename.

  • Entry parsing tolerates missing optional fields: extract_etree() accepts raise_missing=False, and pages load entries that omit entry-data or caption.

  • Browser detection falls back to the remaining candidates when a configured browser probe raises an error, instead of failing outright.

  • default_authenticate() reports missing labapi[builtin-auth] dependencies only for browser setup, so an unrelated ImportError raised later in the authentication flow is no longer masked by that message.

  • The model-logging example escapes metadata and uses an ASCII-safe success message.

  • The csv_table example preserves spaces around inline markup.

Security#

  • ApiError masks sensitive URL query parameters in its messages and tracebacks.

  • The built-in authentication callback uses an unguessable loopback path and a plain-text response.

1.1.1 - 2026-07-05#

Fixed#

  • Fixed README documentation links that returned 404 by publishing a stable latest/ docs alias alongside the versioned directories.

  • Corrected documentation errors: the enumerate_all() depth example, create(parents=False) raising ValueError for any multi-segment path, the exception hierarchy (PathError, ExtractionError, TreeChildParseError), User.notebooks caching, the scope of strict_cert=False (relaxes strict X.509 validation only, not certificate verification), the folder-download output layout diagram, and UnknownEntry vs UnimplementedEntry wrapping.

Changed#

  • Expanded documentation: full Notebook.search() coverage (lazy EntrySearch, zero-based page() access, result-page metadata) and a new “Obtain API Keys” section.

  • Copy-edited the documentation and public docstrings for precision and concision.

Security#

  • Raised the minimum cryptography requirement to 48.0.1 and updated the locked version, dropping wheels that bundle a vulnerable OpenSSL (Dependabot alert 15).

1.1.0 - 2026-06-02#

Added#

  • Attachment.from_file() now accepts filesystem str or Path objects in addition to file-like objects.

  • Notebook.search() for paginated LabArchives entry search results using normal entry objects.

  • Support for escaped separators (\/) in notebook paths, enabling access to and creation of notebook nodes with literal slashes in their names.

  • Official support for Python 3.10 and 3.11.

  • typing-extensions as a runtime dependency so code can use backported typing helpers such as Self, override, and Buffer while supporting Python 3.10.

  • Lazy environment-variable loading through labapi.util.env.getenv(). When python-dotenv is installed, .env is loaded on first credential lookup instead of during labapi.client import.

Changed#

  • Refactored the json_sync example into a reusable utility with comprehensive tests.

  • Rewrote the csv_table example for improved clarity and usability.

  • Refactored the folder_download example into clearer reusable download logic.

  • Reworked entry factory fallback handling. Unknown upstream LabArchives part types now load as UnknownEntry, while recognized but unimplemented part types load as UnimplementedEntry; both still reject unsupported updates.

  • Updated attachment cloning to use an explicit random-access capability check instead of requiring every file-like object to expose a reliable seekable() method.

  • Kept spooled attachment buffers open after Attachment.from_file() returns, while still preserving the caller’s original file cursor position.

Fixed#

  • Fixed runtime typing in Attachment.from_file() to support both file-like and path-like inputs correctly.

  • Improved Attachment.from_file() support for random-access binary streams that do not expose seekable().

  • Fixed relative path resolution bugs when using the / operator with absolute and relative NotebookPath objects.

1.0.3 - 2026-04-15#

Changed#

  • Refined the client auth flow and browser detection behavior.

  • Simplified tree path handling.

  • Switched the 1.0 type-check workflow from mypy to ty.

  • Refreshed package metadata, README content, and Zenodo configuration.

  • Updated pillow and pytest.

Fixed#

  • Restored datetime-based URL signing support.

  • Improved browser detection robustness when detectable values arrive with incorrect types.

  • Fixed test compatibility issues in the 1.0 maintenance branch.

  • Reduced tree creation complexity in the v1.0.3 stabilization pass.

1.0.2 - 2026-04-10#

Changed#

  • Cleaned up the PyPI README and related package metadata.

1.0.1 - 2026-04-10#

Added#

  • Initial TestPyPI publishing workflow.

  • GitHub issue templates.

  • Reusable GitHub Actions checks and broader local tooling support.

Changed#

  • Improved versioning and generated documentation metadata.

  • Refreshed contributor and Sphinx configuration docs.

  • Updated cryptography, pygments, and requests.

1.0.0 - 2026-04-01#

Added#

  • Initial stable release of labapi.

  • Support for LabArchives authentication, notebook tree traversal, and page and entry operations from Python.

  • Project documentation and example workflows for common notebook automation tasks.