Deprecated warning on Python 3.10

686 views
Skip to first unread message

Yair Eshel Cahansky

unread,
Oct 19, 2022, 5:14:36 AM10/19/22
to reportlab-users
Hi
Working with pytest exposed a deprecated warning on the way importlib is used. This is the note:
<frozen importlib._bootstrap>:283
  <frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

I think it can be fixed using import_module from importlib, on line 24 of __init__.py 

I cannot be certain, as I have pretty limited understanding of the issue. I just saw that my particular project works well, and I stopped getting this message. 

I also could not find how to send patches, to suggest. Any help with this will be appriciated.
Thanks.

carste...@cafu.de

unread,
Jan 21, 2023, 9:48:04 AM1/21/23
to reportlab-users
Dear group,

having just migrated from Python 3.8 to 3.10, I see this problem too:

In reportlab/__init__.py the call m.load_module(name) triggers this warning:
<frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

Would it be possible to implement some fix for the next release?

Best regards,
Carsten

carste...@cafu.de

unread,
Mar 18, 2023, 6:41:47 AM3/18/23
to reportlab-users
Anyone please?

I had a look at https://hg.reportlab.com/hg-public/reportlab, but I didn't find any means to contact someone (author robin seems to be actively working on the reportlab) or to file a patch.

Best regards,
Carsten
Reply all
Reply to author
Forward
0 new messages