Skip to content

Commit c5125a3

Browse files
authored
fix: pin datajoint to exactly 0.14.10 and drop the setuptools workarounds (#13)
Replace datajoint>=0.13.0 (plus the dev-only datajoint<2 constraint) with datajoint==0.14.10 in the published dependencies, so U19 and any other installer resolves the first 0.14 release that no longer imports pkg_resources or depends on otumat. Drop the setuptools<82 constraint, the pkg_resources warning filter, the Dependabot setuptools>=82 ignore, the GHSA-h35f-9h28-mq5c audit ignore and the devcontainer's extra datajoint/setuptools pins. Relocking removes otumat; setuptools stays only via neuroconv (nwb extra) and moves 81.0.0 -> 84.0.0. Assisted-by: ClaudeCode:claude-opus-5.5
1 parent 47ef78c commit c5125a3

5 files changed

Lines changed: 28 additions & 251 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ COPY ./ /tmp/element-array-ephys/
3232
RUN \
3333
# pipeline dependencies
3434
apt-get install gcc g++ ffmpeg libsm6 libxext6 -y && \
35-
# datajoint 2 drops dj.schema; setuptools 82+ drops pkg_resources (used by datajoint<2)
36-
pip install --no-cache-dir -e "/tmp/element-array-ephys[elements,tests]" "datajoint<2" "setuptools<82" && \
35+
pip install --no-cache-dir -e "/tmp/element-array-ephys[elements,tests]" && \
3736
# clean up
3837
rm -rf /tmp/element-array-ephys && \
3938
apt-get clean

‎.github/dependabot.yml‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,9 @@ updates:
129129
ignore:
130130
# datajoint 2.x removed dj.schema and ignores the dj_local_conf.json that
131131
# the BrainCOGS repos ship, so `import element_array_ephys` fails on it.
132-
# pyproject.toml constrains the dev environment to datajoint<2 and
133-
# U19-pipeline-python pins datajoint<2.0.0 for the same reason. Remove
132+
# pyproject.toml and U19-pipeline-python pin datajoint==0.14.10 for the
133+
# same reason. Remove
134134
# once the datajoint 2.x migration lands.
135135
- dependency-name: "datajoint"
136136
versions:
137137
- ">=2.0"
138-
# datajoint <2.0 imports pkg_resources (plugin.py, pulled in by
139-
# connection.py on every `import datajoint`). setuptools 82.0.0 removed
140-
# pkg_resources outright and there is no installable replacement, so any
141-
# bump to >=82 makes `import datajoint` fail with ModuleNotFoundError.
142-
# Verified in tech_calendar_streamlit#110. Remove together with the
143-
# datajoint ignore above.
144-
- dependency-name: "setuptools"
145-
versions:
146-
- ">=82"

‎.github/workflows/tests.yml‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,5 @@ jobs:
5656

5757
# Audits the locked tree against OSV and fails on any finding. `--locked`
5858
# also asserts uv.lock is up to date with pyproject.toml.
59-
#
60-
# GHSA-h35f-9h28-mq5c (alias PYSEC-2026-3447; setuptools sdist MANIFEST.in
61-
# exclusion bypass, fixed in 83.0.0) is ignored on purpose: setuptools
62-
# 82 removed pkg_resources, which datajoint<2 imports at module scope, so
63-
# the dev environment is constrained to setuptools<82 (see [tool.uv] in
64-
# pyproject.toml). The flaw is in building sdists on macOS filesystems,
65-
# which nothing in this environment does.
6659
- name: Audit dependencies
67-
run: uv audit --locked --ignore GHSA-h35f-9h28-mq5c
60+
run: uv audit --locked

‎pyproject.toml‎

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ authors = [{ name = "DataJoint", email = "info@datajoint.com" }]
1212
keywords = ["neuroscience", "electrophysiology", "science", "datajoint"]
1313
requires-python = ">=3.11"
1414
dependencies = [
15-
"datajoint>=0.13.0",
15+
# The code uses the datajoint 0.14 API (dj.schema(), dj_local_conf.json),
16+
# which 2.x removed. 0.14.10 is the first 0.14 release without
17+
# pkg_resources; pin it exactly, matching U19-pipeline-python.
18+
"datajoint==0.14.10",
1619
"ipykernel>=6.0.1",
1720
"ipywidgets",
1821
"openpyxl",
@@ -75,19 +78,6 @@ exclude-newer = "7 days"
7578
# so local runs and the CI audit job invoke it identically.
7679
preview-features = ["audit-command"]
7780

78-
# Constraints for this repo's own dev/CI environment only; they are not part of
79-
# the published metadata, so downstream installs are unaffected.
80-
constraint-dependencies = [
81-
# The code uses the datajoint 0.14 API (dj.schema(), dj_local_conf.json);
82-
# datajoint 2.x removed dj.schema, so `import element_array_ephys` fails.
83-
# U19-pipeline-python pins datajoint<2.0.0 for the same reason.
84-
"datajoint<2",
85-
# datajoint <2.0 imports pkg_resources on every `import datajoint`;
86-
# setuptools 82 removed it (datajoint 0.14.9 also declares setuptools<82).
87-
# <82 matches U19-pipeline-python's pin.
88-
"setuptools<82",
89-
]
90-
9181
[tool.ruff]
9282
# Upstream formats with black at 88; keep it so upstream merges stay clean.
9383
line-length = 88
@@ -176,10 +166,6 @@ log_level = "INFO"
176166
testpaths = ["tests"]
177167
filterwarnings = [
178168
"error",
179-
# setuptools>=81 raises this as a UserWarning when datajoint<2 imports
180-
# pkg_resources, so the category stays unpinned or every test errors at
181-
# collection. Belongs to datajoint, not this repo.
182-
"ignore:pkg_resources is deprecated as an API",
183169
# datajoint calls pyparsing APIs that pyparsing itself deprecated
184170
# (delimitedList, setResultsName, ...) at import time.
185171
"ignore::pyparsing.warnings.PyparsingDeprecationWarning",

0 commit comments

Comments
 (0)