Commit e7246e5
GH #2744 Fix installation and tests for Python 3.10-3.13
Three pinned dependencies blocked installation on 3.12+:
- numpy<1.24: no cp312 wheels; now uncapped (numpy 2.x supported)
- pandas==1.5.3: no cp312 wheels; now >=1.5.3
- scipy<1.11: requires_python<3.12; now uncapped
- pynwb<3: cap to avoid breaking API changes
- xarray<2023.2.0: unpinned (pure Python, no breakage)
- pytz: added (was transitive via pandas 1.x, now needed explicitly)
- setuptools<81: cap (pkg_resources removed in 81+)
Source fixes for removed/changed APIs:
- scipy.interpolate.interp2d → RectBivariateSpline (removed in 1.14)
- ConfigParser.readfp → read_string (removed in Python 3.12)
- DataFrame.iteritems() → items() (removed in pandas 2.0)
- np.int() → int() (removed in numpy 1.24)
- np.NaN/np.NAN → np.nan (removed in numpy 2.0)
- np.Inf → np.inf, np.string_ → np.bytes_ (removed in numpy 2.0)
- np.product → np.prod, np.in1d → np.isin (removed in numpy 2.0)
- np.ediff1d to_begin dtype must match array dtype in numpy 2.0
- np.VisibleDeprecationWarning → try/except import (removed in 2.0)
- nwbfile.modules → .processing (pynwb 2.x deprecation)
- IndexSeries unit='None' → 'N/A' (pynwb 2.5+ validation)
- np.linalg.norm([array, scalar]) → np.vstack (numpy 1.24+ rejects)
- aiohttp.ClientSession → lazy property (aiohttp 3.9+ event loop)
- groupby().apply() → select column first (pandas 2.2+ behavior)
- demixer: add np.isfinite guard after linalg.solve (some LAPACK
implementations return inf instead of raising LinAlgError for
singular matrices)
Test fixes:
- pytest.warns(None) → warnings.catch_warnings (pytest 8)
- mock.called_once_with → assert_called_once() (proper assertion)
- Add res.x to MagicMock for scipy.optimize result
- rng.choice(inhomogeneous) → rng.integers + index (numpy 1.24+)
- Widen curve-fit tolerances for platform variance
- Cast dtypes for pynwb 2.x roundtrip and pandas 2.x index changes
- subprocess 'python' → sys.executable for venv correctness
- Replace flaky test_demix_raises_warning_for_singular_matrix with
a result-based assertion in test_demix_point
- from mock import → from unittest.mock import (69 test files)
- Uncap/modernize test dependency bounds, remove dead weight
CI:
- Update to actions/checkout@v4, actions/setup-python@v5
- Slim matrix to min/max Python (3.10, 3.13) on ubuntu, 3.13 on
macOS/windows
- Add pip caching, coverage on single matrix element only
- Modernize notebook_runner.yml to Python 3.13
- Update nightly.yml to checkout@v4
Fixes #2747, #2744, #2746, #2754
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a9b5c68 commit e7246e5
131 files changed
Lines changed: 277 additions & 272 deletions
File tree
- .github/workflows
- allensdk
- brain_observatory
- behavior
- data_objects
- cell_specimens
- metadata/behavior_metadata
- running_speed
- stimuli
- trials
- swdb
- ecephys
- align_timestamps
- data_objects
- ecephys_project_api
- stimulus_analysis
- eye_tracking/stage_4
- gaze_mapping
- nwb
- ophys/trace_extraction
- receptive_field_analysis
- config/app
- core
- internal
- brain_observatory
- model/glif
- pipeline_modules
- test
- api
- cloud_cache
- brain_observatory
- behavior
- behavior_project_cache_data_model
- ecephys
- stimulus_analysis
- stimulus_table
- receptive_field_analysis
- vbn_2022/metadata_writer
- config
- core
- ephys
- internal
- api
- biophysical
- brain_observatory
- core
- mouse_connectivity
- tissuecyte_stitching
- model
- mouse_connectivity/grid
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | | - | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
62 | | - | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | | - | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
860 | | - | |
| 860 | + | |
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
| 866 | + | |
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
0 commit comments