Skip to content

Releases: datajoint/datajoint-python

Release 2.3.3

Choose a tag to compare

@github-actions github-actions released this 09 Sep 22:42
f8f1fb9

A patch release on the 2.3 line, focused on storage credentials, diagram rendering, and type validation.

S3 stores no longer require static credentials. access_key and secret_key are now optional in an s3 store spec — omit both and the AWS credential chain resolves an ambient identity (EC2 instance profile, IRSA, ECS task role, SSO), matching how the gcs and azure protocols already behaved. This is what lets a pipeline run under an assumed role with no long-lived keys in its configuration. Setting exactly one of the two is now rejected at validation with a clear message instead of failing later inside the AWS client. See Configure Storage.

Diagrams were redesigned. dj.Diagram output moves to the DataJoint brand palette — Manual green, Lookup grey, Imported blue, Computed orange, with tier shapes unchanged — and renamed foreign keys are now drawn in amber, distinct from the Computed tier. Line weight now encodes cardinality and only cardinality: thick for one-to-one, thin for one-to-many. It previously also tried to signal the master-part relationship, which made the two unreadable together. A new display.diagram_theme setting takes auto (default), light, or dark; auto emits a single SVG that adapts to the viewer's light or dark mode. See Read Diagrams and Configuration.

Attribute types are validated at declaration and insert. Four related gaps closed, the most serious being that inserting a NumPy array into a native blob attribute silently stored the array's text representation, with no error on insert and none on fetch. decimal(M,D) unsigned is also accepted again after being rejected in 2.x, and misspelled native types are now caught at declaration rather than producing invalid DDL at the server.

Also: braces in a table or attribute comment no longer crash declaration, alter() no longer loses an added attribute's declared type, file-protocol stores are safe on Windows, and non-unique foreign-key columns are indexed on PostgreSQL.

Upgrading from 2.3.2? No API breaks. Two of the fixes above do reject input that previously passed silently — a misspelled native type at declaration, and a NumPy array inserted into a native blob. Both cases were already broken rather than working: the first produced invalid DDL at the server, the second corrupted the stored value. Anything affected was losing data.

Full details in What's New in DataJoint 2.3.


What's Changed

⚡️ Enhancements

🐛 Bug Fixes

📝 Documentation

Full Changelog: v2.3.2...v2.3.3

Release 2.3.2

Choose a tag to compare

@github-actions github-actions released this 21 Jul 21:31
afc350f

Overview

v2.3.2 is a patch release — internal hardening and bug fixes on top of v2.3.1, with no breaking changes to the public API. The main items: the dependency graph moved to networkx.MultiDiGraph (correctly modeling multiple foreign keys between the same pair of tables), a ~jobs-table fix for UUID foreign-key-derived primary keys, removal of the process-wide sys.excepthook (uncaught exceptions now use Python's default handler, with tracebacks rendered by the log formatter), and a garbage-collection fix that avoids acting on partial storage listings. The package version is now derived from the git tag via hatch-vcs.


⚡️ Enhancements

🐛 Bug Fixes

Full Changelog: v2.3.1...v2.3.2

Release 2.3.1

Choose a tag to compare

@github-actions github-actions released this 16 Jul 23:56
29ce695

Highlights

  • populate() performanceself.upstream is now built lazily and dependencies are no longer reloaded per key, removing redundant work from populate() loops (#1499, #1493).
  • Cascade / part-integrity fix — a cascaded delete now restricts the master from every restricted part and validates part integrity, fixing multi-part-master cascades (#1484).
  • Garbage-collection correctness — codec-driven reference discovery with file-level, schema-addressed orphan matching (#1479, #1469).
  • strict_provenance runtime guardrail retired — the best-effort runtime guard is removed; provenance remains an intrinsic structural property of the pipeline (#1489, #1488).
  • Python 3.14 support — supported range extended through 3.14 with min/max exercised in CI; MySQL 8.4 LTS added to the test matrix (#1490, #1498).

⚡️ Enhancements

🐛 Bug Fixes

📝 Documentation

  • docs: clarify _propagate_part_to_master materialization is delete-order, not just MySQL 1093(#1495)@dimitri-yatsenko
  • docs(#1484): document pair-keyed part-to-master invariant in _propagate_restrictions(#1494)@dimitri-yatsenko

Full Changelog: v2.3.0...v2.3.1

Release 2.3.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 19:03
44c86e6

Highlights

DataJoint 2.3 builds on the 2.2.x line with a set of features centered on provenance — knowing, and being able to trust, exactly which upstream data a computed result was derived from.

The headline is the provenance trinity. Diagram.trace constructs the upstream view of any result; self.upstream makes those declared ancestors ergonomic to read inside make(); and the opt-in strict_provenance flag turns the long-standing "read only from declared dependencies, write only to self" convention into something the framework actively checks. Together they move DataJoint's core provenance promise from a convention people hope to follow to one the framework helps construct and — when enabled — enforce.

Around that:

  • SparkAdapter Codec Protocol — typed codecs can expose their decoded values as Spark-native types, opening lakehouse / Delta-Sharing consumers (e.g. Databricks) to columns that were previously opaque blobs.
  • dj.deploy.set_replica_identity — a new dj.deploy module configures PostgreSQL REPLICA IDENTITY for change-data-capture pipelines.
  • Cascade fixpart_integrity="cascade" is now correct across Part-of-Part and renamed-foreign-key chains (the same upward-propagation machinery Diagram.trace builds on).

No breaking changes. strict_provenance defaults off and everything else is additive, so existing pipelines are unaffected. See What's New in 2.3 for the full narrative.

🚀 Features

🐛 Bug Fixes

Full Changelog: v2.2.4...v2.3.0

Release 2.2.4

Choose a tag to compare

@github-actions github-actions released this 05 Jun 19:07
fedd2ea

Highlights

A small follow-up patch on 2.2.3 cleaning up rough edges discovered during the docs review:

  • dj.StorageAdapter and dj.get_storage_adapter() exposed at top level. The Storage Adapter plugin contract documented in the spec used these names as if they were re-exported from the top-level datajoint namespace, but they were not. Plugin authors following the spec literally hit AttributeError. Both symbols are now in datajoint.__all__ and importable as dj.StorageAdapter / dj.get_storage_adapter.
  • packaging declared as an explicit dependency. src/datajoint/migrate.py imports packaging.version.Version, but the package was never declared in pyproject.toml. With Python 3.12 venvs no longer shipping setuptools (which used to pull packaging transitively), pip install datajoint==2.2.3 into a clean Py3.12 venv hit ModuleNotFoundError: No module named 'packaging' on import datajoint. Fixed.
  • Source-side version markers refreshed in settings.py docstrings and comments to match the public docs.

⚡️ Enhancements

🐛 Bug Fixes

📝 Documentation

Companion docs: datajoint/datajoint-docs#172 — env-var configuration of stores + Storage Adapter API spec.

Full Changelog: v2.2.3...v2.2.4

Release 2.2.3

Choose a tag to compare

@github-actions github-actions released this 05 Jun 14:46
7e609a6

Highlights

This patch release adds env-var configuration for object stores (closes the gap for env-var-only deployments such as the DataJoint platform, Kubernetes, and Lambda) and ships several minor fixes and documentation improvements.

  • DJ_STORES — JSON-encoded copy of the stores dict, same shape as in datajoint.json. Replaces the file's stores block when set, with arbitrary adapter-defined attribute names (token, api_key, workspace_url…).
  • DJ_IGNORE_CONFIG_FILE (default false) — when true, skips datajoint.json, the project .secrets/, and /run/secrets/datajoint/ entirely. Hard guarantee that no file on disk leaks into config.
  • .secrets/stores.<name>.<attr> now accepts any attribute, not only access_key / secret_key — supports plugin-registered adapters (e.g. Databricks Unity Catalog Volumes) with non-S3-style credential fields.

Precedence (high → low): programmatic dj.config["stores"] > DJ_STORES > datajoint.json > .secrets/stores.<name>.<attr> (fills missing attrs only).

⚡️ Enhancements

📝 Documentation

Companion docs: datajoint/datajoint-docs#172

Full Changelog: v2.2.2...v2.2.3

Release 2.2.2

Choose a tag to compare

@github-actions github-actions released this 01 May 18:37
53dd595

⚡️ Enhancements

🐛 Bug Fixes

Full Changelog: v2.2.1...v2.2.2

Release 2.2.1

Choose a tag to compare

@github-actions github-actions released this 09 Apr 14:19
7e825eb

Released: 2026-04-09

⚡️ Enhancements

  • feat: add database.name setting for PostgreSQL connections (#1426) @kushalbakshi
    • Configurable database name via dj.config["database.name"], DJ_DATABASE_NAME env var, or database_name kwarg on Connection
    • Extracts _build_connect_kwargs() helper to eliminate duplicated connection parameter construction
    • __repr__ and logger show database name when set (e.g., user@host:5432/my_db)
    • Warns when database.name is set with MySQL backend
    • Deprecates database_prefix (warning emitted at Schema.activate())

📝 Documentation

Full Changelog: v2.2.0...v2.2.1

v2.2.0

Choose a tag to compare

@dimitri-yatsenko dimitri-yatsenko released this 01 Apr 15:51
865bd29

What's Changed

For a comprehensive overview of all new features, see What's New in DataJoint 2.2.

Added

  • Graph-driven cascade delete and restrict on Diagram (#1407, fixes #865, #1110): New Diagram.cascade(), Diagram.restrict(), Diagram.prune(), and Diagram.counts() methods replace the error-driven cascade approach. Delete and drop operations now use the pipeline DAG to determine affected tables before executing, with full dry-run support via safemode=True.
  • Thread-safe mode with dj.Instance (#1404): New dj.Instance() class provides independent database connections with connection-scoped configuration. Enables safe concurrent access from multiple threads (e.g., web servers, parallel workers).
  • Directory references in <filepath@store> (#1415, fixes #1410): Filepath storage now supports directory references. is_dir is detected dynamically; existence checks and storage operations handle directories correctly.

Fixed

  • populate() with reserve_jobs=True ignores restrictions (#1414, fixes #1413): Restrictions are now correctly applied when fetching pending keys in distributed mode, matching the behavior of direct (non-distributed) populate.
  • Populate antijoin uses .proj() for correct pending key computation (#1405): Fixes cases where overlapping secondary attributes caused incorrect pending key calculations.
  • Allow attribute names starting with 'index' in declarations (#1412, fixes #1411): Table definitions with attribute names like index_value no longer raise parse errors.
  • Cascade delete failures on MySQL 8 (fixes #1110): The graph-driven cascade in #1407 eliminates the error code mismatch (1217 vs 1451) that caused cascade delete failures on MySQL 8.

Changed

  • Backend-agnostic quoting and adapter abstractions (#1419): Refactored identifier quoting, table name construction, and schema queries into adapter methods for cleaner multi-backend (MySQL + PostgreSQL) support.
  • skip_duplicates=True behavior documented for PostgreSQL (#1417, fixes #1049): PostgreSQL already enforces secondary unique constraints when skip_duplicates=True (raises DuplicateError on secondary unique conflicts, unlike MySQL which skips silently). This asymmetry is now documented and tested.

Full Changelog: v2.1.1...v2.2.0

v2.1.1

Choose a tag to compare

@dimitri-yatsenko dimitri-yatsenko released this 17 Feb 19:54
4a7e1e8

What's Changed

Bug Fixes

  • Atomic job reservation to prevent race condition (#1399, fixes #1398): Job.reserve() now uses a single atomic UPDATE ... WHERE status='pending' instead of a non-atomic SELECT→UPDATE pattern, preventing multiple workers from reserving the same key.
  • Hide comments from table preview display (#1393): SQL comments in table definitions are no longer shown in .preview() output.
  • Correct Part table names in diagrams (#1392): Part tables now display correctly in diagrams by properly stripping the module prefix.

Removals

  • Remove size_on_disk (#1395): Removed size_on_disk property from Table and Schema classes. Use database-native tools for storage metrics.

Full Changelog: v2.1.0...v2.1.1