Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for Python 3.12, NumPy 2.0, and SciPy 1.14 (#1050)
* Monkeypatch versioneer.py - Python 3.12 doesn't like SafeConfigParser - Python 2.7 doesn't like versioneer > 0.18 * Replace obj2sctype * Replace `.getsctype()` with `.dtype` * Replace `NUMERIX.issubclass_()` with `issubclass()` * Replace `itemset()` with indexing * Fix obsolete name for infinity * Fix comparison operator representation * Use `ins.argrepr` for representation of operator variables * Remove future.standard_library This library no longer exists in Python 3.12 It looks like it isn't even needed in Python 2.7 to use pickle and redirecting_html.py should go away (but fixed it anyway). * Update locks * Add `return_scalar` to `__array_wrap__` for NumPy 2.0 * Add `copy=` argument to `__array__` for NumPy 2.0 * Address `copy=None` for NumPy < 2.0 Based on https://github.com/scipy/scipy/pull/20172/files as suggested by https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword * Defer return_scalar for OperatorVariables * Replace deprecated `numpy.in1d` with `numpy.isin` * Replace deprecated `tol=` with `rtol=` to SciPy Krylov solvers * Replace deprecated `atol='legacy'` for SciPy Krylov solves * Remove internal implementation details of numpy.array2string * Override legacy formatting set for tests * Lock out petsc 3.21 petsc(4py) 3.21.2 crashes when running tests in parallel: ``` mesh2D (examples.cahnHilliard) Doctest: examples.cahnHilliard.mesh2D ... Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Internal error 2 in DMUMPS_LOAD_RECV_MSGS 1275068685 52 Internal error 1 in DMUMPS_LOAD_PROCESS_MESSAGE Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 1 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Abort(-99) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -99) - process 0 Internal error 1 in DMUMPS_LOAD_PROCESS_MESSAGE Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Internal error 2 in DMUMPS_LOAD_RECV_MSGS 1275068685 52 Internal error 1 in DMUMPS_LOAD_PROCESS_MESSAGE Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Internal error 1 in DMUMPS_LOAD_PROCESS_MESSAGE Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 Internal error 2 in DMUMPS_LOAD_RECV_MSGS 1275068685 52 Internal error 1 in DMUMPS_LOAD_PROCESS_MESSAGE Internal error 1 in DMUMPS_LOAD_RECV_MSGS 1 ``` * Make directory that already exists * Fix case of tarball * Fix type of int Variable for Windows * build(nix): update to python 3.12 and nixos 24.05 Update Nix build to use Python 3.12, NixOS 24.05. Also, include aarch4-darwin as a possible build. Currently, there is a single test failure in fipy.matrices.scipyMatrix._ScipyMatrix. * ci(actions): generate egg_info Generate the egg_info before executing the tests otherwise setup.py doesn't register the correct version of the test suite, but possibly the older version already available in nixpkgs. --------- Co-authored-by: Daniel Wheeler <[email protected]>
- Loading branch information