Remove deprecated submodule jax.abstract_arrays

This commit is contained in:
Jake VanderPlas 2023-09-19 15:40:18 -07:00
parent 33d862fb93
commit 024b1f23d7
3 changed files with 3 additions and 41 deletions

View File

@ -8,6 +8,9 @@ Remember to align the itemized text with the first line of an item within a list
# jax 0.4.17
* Deprecations
* Removed the deprecated module `jax.abstract_arrays` and all its contents.
# jaxlib 0.4.17
## jax 0.4.16 (Sept 18, 2023)

View File

@ -150,7 +150,6 @@ from jax._src.tree_util import (
# These submodules are separate because they are in an import cycle with
# jax and rely on the names imported above.
from jax import abstract_arrays as _deprecated_abstract_arrays
from jax import custom_derivatives as custom_derivatives
from jax import custom_batching as custom_batching
from jax import custom_transpose as custom_transpose
@ -182,11 +181,6 @@ import jax.experimental.compilation_cache.compilation_cache as _ccache
del _ccache
_deprecations = {
# Added 06 June 2023
"abstract_arrays": (
"jax.abstract_arrays is deprecated. Refer to jax.core.",
_deprecated_abstract_arrays
),
# Added July 2022
"treedef_is_leaf": (
"jax.treedef_is_leaf is deprecated: use jax.tree_util.treedef_is_leaf.",
@ -221,7 +215,6 @@ _deprecations = {
import typing as _typing
if _typing.TYPE_CHECKING:
from jax import abstract_arrays as abstract_arrays
from jax import linear_util as linear_util
from jax._src.tree_util import treedef_is_leaf as treedef_is_leaf
from jax._src.tree_util import tree_flatten as tree_flatten

View File

@ -1,34 +0,0 @@
# Copyright 2018 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(phawkins): fix users of these aliases and delete this file.
from jax._src.abstract_arrays import array_types as _deprecated_array_types
_deprecations = {
# Added 06 June 2023
"array_types": (
"jax.abstract_arrays.array_types is deprecated.",
_deprecated_array_types,
),
}
import typing
if typing.TYPE_CHECKING:
from jax._src.abstract_arrays import array_types as array_types
else:
from jax._src.deprecations import deprecation_getattr as _deprecation_getattr
__getattr__ = _deprecation_getattr(__name__, _deprecations)
del _deprecation_getattr
del typing