Drops support for Python < 3.10 and MySQL < 8.0#1287
Merged
Conversation
bump python version in docker compose to ensure that tests pass
…tings-management-adsuG
- Remove ConfigWrapper class and backward compatibility layer - Use direct pydantic BaseSettings with typed nested models - Change context manager from config(...) to config.override(...) - Add validate_assignment=True for runtime type checking - Improve store spec validation with clear error messages - Update all tests to use new API - Preserve dict-style access via __getitem__/__setitem__ for convenience
Config file search: - Search for datajoint.json recursively up from cwd - Stop at .git/.hg boundaries or filesystem root - Warn if no config file found (instead of silently using defaults) Secrets management: - Add .secrets/ directory support (next to datajoint.json) - Support /run/secrets/datajoint/ for Docker/Kubernetes - Use SecretStr for password and aws_secret_access_key - Secrets masked in repr/logs, excluded from save() - Dict access automatically unwraps SecretStr for compatibility Breaking changes: - Config file renamed from dj_local_conf.json to datajoint.json - No more ~/.datajoint_config.json (project-only config) - Secrets should be in env vars or .secrets/ directory
Credentials should be managed via environment variables or .secrets/ directory, not stored in config files.
Config files should be created/edited manually and version controlled, not generated programmatically.
- Rewrite settings.md with new config structure and secrets management - Update credentials.md to remove set_password and save methods - Update quick-start.md with new config file name and patterns - Add documentation for .secrets/ directory and environment variables
- Update pyproject.toml to require Python >=3.10 (was >=3.9) - Update ruff target-version to py310 - Update pixi Python version constraint - Modernize type hints to use Python 3.10+ union syntax (X | Y instead of Union[X, Y], X | None instead of Optional[X]) - Use built-in dict, list, tuple for generics instead of typing imports - Update MySQL documentation reference from 5.7 to 8.0
Documentation updates: - docs/src/client/install.md: Update Python requirement from 3.4+ to 3.10+ - docs/src/quick-start.md: Update Python requirement from 3.8+ to 3.10+ - docs/src/quick-start.md: Update MySQL doc link from 5.7 to 8.0 - docs/src/develop.md: Update Python requirement from 3.9+ to 3.10+ - docs/src/develop.md: Fix version.py path (datajoint/ -> src/datajoint/) Configuration updates: - docker-compose.yaml: Update default PY_VER from 3.9 to 3.10 - .github/workflows/test.yaml: Remove Python 3.9 and MySQL 5.7 from test matrix - .github/workflows/post_draft_release_published.yaml: Update to Python 3.10 - .github/workflows/post_draft_release_published.yaml: Fix version.py path
d-v-b
reviewed
Dec 21, 2025
Comment on lines
+43
to
+44
| sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" src/datajoint/version.py | ||
| cat src/datajoint/version.py |
Contributor
There was a problem hiding this comment.
out of scope for this PR but you might find it simpler to tie your library version to git tags instead of manually updating a version file. See https://setuptools-scm.readthedocs.io/en/latest/
d-v-b
reviewed
Dec 21, 2025
d-v-b
reviewed
Dec 21, 2025
d-v-b
reviewed
Dec 21, 2025
Comment on lines
+72
to
+73
| ├── aws.access_key_id | ||
| └── aws.secret_access_key |
Contributor
There was a problem hiding this comment.
why encourage people to copy aws credentials here?
Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
d-v-b
approved these changes
Dec 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR drops support for Python < 3.10 and MySQL < 8.0, enabling use of modern Python syntax and simplifying the codebase and CI configuration.
Merge #1282 first.
Changes
Python Version Requirements
pyproject.tomltarget-versionfrompy39topy310>=3.10,<3.14Type Hint Modernization (Python 3.10+ syntax)
Optional[X]withX | NoneUnion[X, Y]withX | YDict[K, V]withdict[K, V]List[X]withlist[X]Tuple[X, ...]withtuple[X, ...]typingmoduleFiles updated:
src/datajoint/settings.pysrc/datajoint/condition.pysrc/datajoint/table.pyDocumentation Updates
docs/src/client/install.md: Updated Python requirement from 3.4+ to 3.10+docs/src/quick-start.md: Updated Python requirement from 3.8+ to 3.10+docs/src/develop.md: Updated Python requirement from 3.9+ to 3.10+version.pypath references (datajoint/→src/datajoint/)CI/CD Updates
.github/workflows/test.yaml: Removed Python 3.9 and MySQL 5.7 from test matrix.github/workflows/post_draft_release_published.yaml: Updated build Python version to 3.10docker-compose.yaml: Updated defaultPY_VERfrom 3.9 to 3.10MySQL Reference Updates
src/datajoint/connection.pydocstring link from MySQL 5.7 to 8.0 documentation