Skip to content

Commit

Permalink
Merge pull request #18305 from superbobry:deprecate-jax-config-submodule
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 577299278
  • Loading branch information
jax authors committed Oct 27, 2023
2 parents 8ffc88c + c90f1f0 commit 69d0a40
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions jax/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# TODO(phawkins): fix users of this alias and delete this file.
from jax._src.config import config as _deprecated_config # noqa: F401

from jax._src.config import config # noqa: F401
# Deprecations

_deprecations = {
# Added October 27, 2023
"config": (
"Accessing jax.config via the jax.config submodule is deprecated.",
_deprecated_config),
}

import typing
if typing.TYPE_CHECKING:
config = _deprecated_config
else:
from jax._src.deprecations import deprecation_getattr as _deprecation_getattr
__getattr__ = _deprecation_getattr(__name__, _deprecations)
del _deprecation_getattr
del typing
del _deprecated_config

0 comments on commit 69d0a40

Please sign in to comment.