Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning in Python 3.10 with QuantLib 1.34 and 1.35 #670

Closed
vezeli opened this issue Aug 28, 2024 · 5 comments
Closed

DeprecationWarning in Python 3.10 with QuantLib 1.34 and 1.35 #670

vezeli opened this issue Aug 28, 2024 · 5 comments
Labels

Comments

@vezeli
Copy link

vezeli commented Aug 28, 2024

Hi,

I am using Python 3.10 and I have been building a package on top of QuantLib 1.32 and decided to upgrade to QuantLib 1.35. After the upgrade, I see that all of the tests are passing but I am receiving several DepricationWarning messages. It is easy to replicate the issue in an interactive Python 3.10 session:

>>> import warnings
>>> warnings.simplefilter("default")  # activate all warning messages
>>> import QuantLib as ql

which returns the following:

<frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
<frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
<frozen importlib._bootstrap>:241: DeprecationWarning: builtin type swigvarlink has no __module__ attribute

I went back and created two additional virtual environments for QuantLib 1.33 and QuantLib 1.34, respectively, and I noticed that the same issue appears in QuantLib 1.34. I am not familiar with code changes in QuantLib-SWIG but I did looked at the release notes for QuantLib 1.34 and I am not seeing any introduction of DepricationWarning. Is this issue planned or is it an "unintentional" feature?

Copy link

boring-cyborg bot commented Aug 28, 2024

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

@lballabio
Copy link
Owner

It comes from having started to use the limited API, see #647 (that I should probably keep open). It needs to be fixed in SWIG.

@vezeli
Copy link
Author

vezeli commented Aug 28, 2024

Ah, sorry @lballabio about this replica of #647, it is really unfortunate that I didn't see it before. I will close this issue. Thanks!

@lballabio
Copy link
Owner

No problem, also #647 was closed (I reopened it now) so it might have been out of sight.

Copy link
Contributor

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants