Skip to content

Commit d03a706

Browse files
shim: QuantLib-Risks 1.44.0 re-exporting QuantLibAAD
1 parent d1a207c commit d03a706

3 files changed

Lines changed: 65 additions & 0 deletions

File tree

‎shim/QuantLib_Risks/__init__.py‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Deprecated alias of QuantLibAAD."""
2+
3+
import sys
4+
import warnings
5+
6+
warnings.warn(
7+
"QuantLib-Risks is now QuantLibAAD: pip install QuantLibAAD and import QuantLibAAD",
8+
DeprecationWarning,
9+
stacklevel=2,
10+
)
11+
12+
from QuantLibAAD import *
13+
from QuantLibAAD import __version__, __hexversion__
14+
from QuantLibAAD import QuantLibAAD as QuantLib_Risks, _QuantLibAAD as _QuantLib_Risks
15+
16+
sys.modules[__name__ + ".QuantLib_Risks"] = QuantLib_Risks
17+
sys.modules[__name__ + "._QuantLib_Risks"] = _QuantLib_Risks
18+
19+
del sys, warnings

‎shim/README.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# QuantLib-Risks is now QuantLibAAD
2+
3+
This package has been renamed to [QuantLibAAD](https://pypi.org/project/QuantLibAAD).
4+
`QuantLib-Risks` 1.44 only installs `QuantLibAAD` and keeps `import QuantLib_Risks`
5+
working, with a `DeprecationWarning`. Please switch to:
6+
7+
```bash
8+
pip install QuantLibAAD
9+
```
10+
11+
```python
12+
import QuantLibAAD as ql
13+
```
14+
15+
Anyone pinned to `QuantLib-Risks==1.33.3` must also pin `xad<2`.

‎shim/pyproject.toml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# QuantLib-Risks is now QuantLibAAD: this distribution only installs QuantLibAAD
2+
# and keeps `import QuantLib_Risks` working, with a DeprecationWarning.
3+
4+
[build-system]
5+
requires = ["hatchling"]
6+
build-backend = "hatchling.build"
7+
8+
[project]
9+
name = "QuantLib-Risks"
10+
# keep in sync with ../pyproject.toml
11+
version = "1.44.0"
12+
description = "Deprecated: QuantLib-Risks is now QuantLibAAD"
13+
readme = "README.md"
14+
requires-python = ">=3.10"
15+
license = { text = "AGPL-3.0-or-later" }
16+
authors = [
17+
{ name = "Auto Differentiation Dev Team", email = "dev@auto-differentiation.com" },
18+
]
19+
classifiers = [
20+
"Development Status :: 7 - Inactive",
21+
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
22+
"Programming Language :: Python :: 3",
23+
]
24+
dependencies = ["QuantLibAAD==1.44.*"]
25+
26+
[project.urls]
27+
Homepage = "https://pypi.org/project/QuantLibAAD"
28+
Repository = "https://github.com/auto-differentiation/QuantLibAAD-Py"
29+
30+
[tool.hatch.build.targets.wheel]
31+
packages = ["QuantLib_Risks"]

0 commit comments

Comments
 (0)