Skip to content

Commit e45500d

Browse files
author
The ml_dtypes Authors
committed
Merge pull request #138 from jakevdp:update-build
PiperOrigin-RevId: 615139673
2 parents ede6514 + cca04cd commit e45500d

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ jobs:
5050
- name: Run tests
5151
run: |
5252
pytest -n auto
53+
# TODO(jakevdp): remove this job after NumPy 2.0 release
54+
build-numpy-2-pre:
55+
name: Python 3.12 with numpy 2.0 pre-release
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v3
59+
with:
60+
submodules: true
61+
- name: Set up Python 3.12
62+
uses: actions/setup-python@v4
63+
with:
64+
python-version: 3.12
65+
- name: Install dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
pip install .[dev]
69+
pip install -U --pre numpy
70+
- name: Run tests
71+
run: |
72+
pytest -n auto
5373
build-nightly:
5474
name: Python 3.12 with nightly numpy
5575
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`):
2323

2424
## [Unreleased]
2525

26+
## [0.4.0b1] - 2024-03-12
27+
28+
* Updates `ml_dtypes` for compatibility with future NumPy 2.0 release.
29+
* Wheels for the release candidate are built against NumPy 2.0.0b1.
30+
2631
## [0.3.2] - 2024-01-03
2732

2833
* Fixed spurious invalid value warnings when casting between floating point
@@ -57,6 +62,7 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`):
5762
* Initial release
5863

5964
[Unreleased]: https://github.com/jax-ml/ml_dtypes/compare/v0.3.2...HEAD
65+
[0.4.0b1]: https://github.com/jax-ml/ml_dtypes/compare/v0.3.2...v0.4.0b1
6066
[0.3.2]: https://github.com/jax-ml/ml_dtypes/compare/v0.3.1...v0.3.2
6167
[0.3.1]: https://github.com/jax-ml/ml_dtypes/compare/v0.3.0...v0.3.1
6268
[0.3.0]: https://github.com/jax-ml/ml_dtypes/compare/v0.2.0...v0.3.0

ml_dtypes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = '0.3.2' # Keep in sync with pyproject.toml:version
15+
__version__ = '0.4.0b1' # Keep in sync with pyproject.toml:version
1616
__all__ = [
1717
'__version__',
1818
'bfloat16',

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ml_dtypes"
3-
version = "0.3.2" # Keep in sync with ml_dtypes/__init__.py:__version__
3+
version = "0.4.0b1" # Keep in sync with ml_dtypes/__init__.py:__version__
44
description = ""
55
readme = "README.md"
66
requires-python = ">=3.9"
@@ -48,10 +48,8 @@ pyink-use-majority-quotes = true
4848

4949
[build-system]
5050
requires = [
51-
# Build with oldest supported numpy for each Python version.
52-
"numpy~=1.21.2; python_version<'3.11'",
53-
"numpy~=1.23.3; python_version>='3.11' and python_version<'3.12'",
54-
"numpy~=1.26.0; python_version>='3.12'",
51+
# TODO(jakevdp): update this to 2.0.0rc1 before final release
52+
"numpy==2.0.0b1",
5553
"setuptools~=68.1.0",
5654
]
5755
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)