Skip to content

Commit 67cdb68

Browse files
authored
Merge pull request #1287 from datajoint/claude/drop-legacy-support-rFhLT
Drops support for Python < 3.10 and MySQL < 8.0
2 parents 38a0bfb + f9e7496 commit 67cdb68

File tree

12 files changed

+44
-49
lines changed

12 files changed

+44
-49
lines changed

.github/workflows/post_draft_release_published.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
include:
26-
- py_ver: "3.9"
26+
- py_ver: "3.10"
2727
runs-on: ubuntu-latest
2828
env:
2929
PY_VER: ${{matrix.py_ver}}
@@ -40,14 +40,14 @@ jobs:
4040
- name: Update version.py
4141
run: |
4242
VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+')
43-
sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" datajoint/version.py
44-
cat datajoint/version.py
43+
sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" src/datajoint/version.py
44+
cat src/datajoint/version.py
4545
# Commit the changes
4646
BRANCH_NAME="update-version-$VERSION"
4747
git switch -c $BRANCH_NAME
4848
git config --global user.name "github-actions"
4949
git config --global user.email "[email protected]"
50-
git add datajoint/version.py
50+
git add src/datajoint/version.py
5151
git commit -m "Update version.py to $VERSION"
5252
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
5353
- name: Update README.md badge

.github/workflows/test.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
py_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
24+
py_ver: ["3.10", "3.11", "3.12", "3.13"]
2525
mysql_ver: ["8.0"]
26-
include:
27-
- py_ver: "3.9"
28-
mysql_ver: "5.7"
2926
steps:
3027
- uses: actions/checkout@v4
3128
- name: Set up Python ${{matrix.py_ver}}

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ services:
4141
context: .
4242
dockerfile: Dockerfile
4343
args:
44-
PY_VER: ${PY_VER:-3.9}
44+
PY_VER: ${PY_VER:-3.10}
4545
HOST_UID: ${HOST_UID:-1000}
4646
depends_on:
4747
db:

docs/src/client/install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install and Connect
22

3-
DataJoint is implemented for Python 3.4+.
3+
DataJoint is implemented for Python 3.10+.
44
You may install it from [PyPI](https://pypi.python.org/pypi/datajoint):
55

66
```bash
@@ -25,7 +25,7 @@ to connect to DataJoint pipelines.
2525

2626
Quick install steps for advanced users are as follows:
2727

28-
- Install latest Python 3.x and ensure it is in `PATH` (3.6.3 current at time of writing)
28+
- Install latest Python 3.x and ensure it is in `PATH` (3.10+ required)
2929
```bash
3030
pip install datajoint
3131
```
@@ -46,7 +46,7 @@ Python for Windows is available from:
4646

4747
https://www.python.org/downloads/windows
4848

49-
The latest 64 bit 3.x version, currently 3.6.3, is available from the [Python site](https://www.python.org/ftp/python/3.6.3/python-3.6.3-amd64.exe).
49+
The latest 64 bit 3.x version (3.10 or later required) is available from the [Python site](https://www.python.org/downloads/windows/).
5050

5151
From here run the installer to install Python.
5252

docs/src/client/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration Settings
22

3-
DataJoint uses a strongly-typed configuration system built on [pydantic-settings](https://docs.pydantic.dev/latest/concepts/pydantic_settings/).
3+
DataJoint uses a type-checked configuration system built on [pydantic-settings](https://docs.pydantic.dev/latest/concepts/pydantic_settings/).
44

55
## Configuration Sources
66

docs/src/develop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ git clone https://github.com/datajoint/datajoint-python.git
4343
### With Virtual Environment
4444

4545
```bash
46-
# Check if you have Python 3.9 or higher, if not please upgrade
46+
# Check if you have Python 3.10 or higher, if not please upgrade
4747
python --version
4848
# Create a virtual environment with venv
4949
python -m venv .venv
5050
source .venv/bin/activate
5151
pip install -e .[dev]
5252

5353
# Or create a virtual environment with conda
54-
conda create -n dj python=3.13 # any 3.9+ is fine
54+
conda create -n dj python=3.13 # any 3.10+ is fine
5555
conda activate dj
5656
pip install -e .[dev]
5757
```
@@ -81,7 +81,7 @@ Here are some options that provide a great developer experience:
8181
- Ensure you have [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
8282
- Ensure you have [Docker](https://docs.docker.com/get-docker/)
8383
- `git clone` the codebase repository and open it in VSCode
84-
- Issue the following command in the terminal to build and run the Docker container: `HOST_UID=$(id -u) PY_VER=3.11 DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py) docker compose --profile test run --rm -it djtest -- sh -c 'pip install -qe ".[dev]" && bash'`
84+
- Issue the following command in the terminal to build and run the Docker container: `HOST_UID=$(id -u) PY_VER=3.11 DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' src/datajoint/version.py) docker compose --profile test run --rm -it djtest -- sh -c 'pip install -qe ".[dev]" && bash'`
8585
- Issue the following command in the terminal to stop the Docker compose stack: `docker compose --profile test down`
8686

8787
[Back to top](#table-of-contents)

docs/src/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Advanced users can install DataJoint locally. Please see the installation instru
1212
## Installation
1313

1414
First, please [install Python](https://www.python.org/downloads/) version
15-
3.8 or later.
15+
3.10 or later.
1616

1717
Next, please install DataJoint via one of the following:
1818

@@ -413,7 +413,7 @@ data = query.fetch(order_by='`select` desc')
413413
```
414414

415415
The `order_by` value is eventually passed to the `ORDER BY`
416-
[clause](https://dev.mysql.com/doc/refman/5.7/en/order-by-optimization.html).
416+
[clause](https://dev.mysql.com/doc/refman/8.0/en/order-by-optimization.html).
417417

418418
### Limiting results
419419

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies = [
2323
"setuptools",
2424
"pydantic-settings>=2.0.0",
2525
]
26-
requires-python = ">=3.9,<3.14"
26+
requires-python = ">=3.10,<3.14"
2727
authors = [
2828
{name = "Dimitri Yatsenko", email = "[email protected]"},
2929
{name = "Thinh Nguyen", email = "[email protected]"},
@@ -102,7 +102,7 @@ dev = [
102102
[tool.ruff]
103103
# Equivalent to flake8 configuration
104104
line-length = 127
105-
target-version = "py39"
105+
target-version = "py310"
106106

107107
[tool.ruff.lint]
108108
# Enable specific rule sets equivalent to flake8 configuration
@@ -176,7 +176,7 @@ test = { features = ["test"], solve-group = "default" }
176176
[tool.pixi.tasks]
177177

178178
[tool.pixi.dependencies]
179-
python = ">=3.9,<3.14"
179+
python = ">=3.10,<3.14"
180180
graphviz = ">=13.1.2,<14"
181181

182182
[tool.pixi.activation]

src/datajoint/condition.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import re
99
import uuid
1010
from dataclasses import dataclass
11-
from typing import List, Union
1211

1312
import numpy
1413
import pandas
@@ -67,8 +66,8 @@ class Top:
6766
In SQL, this corresponds to ORDER BY ... LIMIT ... OFFSET
6867
"""
6968

70-
limit: Union[int, None] = 1
71-
order_by: Union[str, List[str]] = "KEY"
69+
limit: int | None = 1
70+
order_by: str | list[str] = "KEY"
7271
offset: int = 0
7372

7473
def __post_init__(self):

src/datajoint/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def conn(host=None, user=None, password=None, *, init_fun=None, reset=False, use
8686
:param reset: whether the connection should be reset or not
8787
:param use_tls: TLS encryption option. Valid options are: True (required), False
8888
(required no TLS), None (TLS preferred, default), dict (Manually specify values per
89-
https://dev.mysql.com/doc/refman/5.7/en/connection-options.html#encrypted-connection-options).
89+
https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#encrypted-connection-options).
9090
"""
9191
if not hasattr(conn, "connection") or reset:
9292
host = host if host is not None else config["database.host"]

0 commit comments

Comments
 (0)