提交 4d4bd16c authored 作者: Ben Mares's avatar Ben Mares 提交者: Ricardo Vieira

Remove deprecated bin module

上级 07275386
......@@ -6,7 +6,6 @@ exclude: |
versioneer\.py|
pytensor/_version\.py|
doc/.*|
bin/.*
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
......
......@@ -8,6 +8,5 @@ global-include *.h
global-include *.hh
global-include *.sh
recursive-include doc *
include bin/pytensor-cache
include versioneer.py
include pytensor/_version.py
import warnings
warnings.warn(
message= "Importing 'bin.pytensor_cache' is deprecated. Import from "
"'pytensor.bin.pytensor_cache' instead.",
category=DeprecationWarning,
stacklevel=2, # Raise the warning on the import line
)
#!/usr/bin/env python
import warnings
from pytensor.bin.pytensor_cache import main
warnings.warn(
message= "Using this bin/pytensor-cache script is deprecated. Use the plain "
"pytensor-cache command which is installed along with pytensor.",
category=DeprecationWarning,
)
main()
#!/usr/bin/env python
import warnings
from pytensor.bin.pytensor_cache import *
from pytensor.bin.pytensor_cache import _logger
if __name__ == "__main__":
warnings.warn(
message= "Running 'pytensor_cache.py' is deprecated. Use the pytensor-cache "
"script instead.",
category=DeprecationWarning,
)
main()
......@@ -88,7 +88,7 @@ case if ``borrow`` was True, the thunk would be allowed to reuse--or
The compile cache is based upon the C++ code of the graph to be compiled.
So, if you change compilation configuration variables, such as
:attr:`config.blas__ldflags`, you will need to manually remove your compile cache,
using ``PyTensor/bin/pytensor-cache clear``
using ``pytensor-cache clear``
PyTensor also implements a lock mechanism that prevents multiple compilations
within the same compilation directory (to avoid crashes with parallel
......
......@@ -82,7 +82,7 @@ jax = ["jax", "jaxlib"]
numba = ["numba>=0.57"]
[tool.setuptools.packages.find]
include = ["pytensor*", "bin"]
include = ["pytensor*"]
[tool.setuptools.package-data]
pytensor = ["py.typed"]
......@@ -122,7 +122,7 @@ testpaths = "tests/"
[tool.ruff]
line-length = 88
exclude = ["doc/", "pytensor/_version.py", "bin/pytensor_cache.py"]
exclude = ["doc/", "pytensor/_version.py"]
[tool.ruff.lint]
select = ["C", "E", "F", "I", "UP", "W", "RUF"]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论