This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cvickery
Recipients Dennis Sweeney, cvickery, piro
Date 2022-01-05.23:11:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641424307.52.0.791048608753.issue46256@roundup.psfhosted.org>
In-reply-to
Content
The app has to open a db connection during module initialization to trigger the problem, so I can't provide a self-contained way to reproduce the problem.

The closest I can come is the attached file, format_rules_annotated.py.

With lines 66-69 in place, the problem occurs, even if there are no command line arguments, with Python 3.10, but not with Python 3.9. If I comment out lines 66-69 there is no problem with either 3.10 or 3.9, even if I add a command line argument that causes connections to be opened within functions defined within the module. (I added the explicit initialization of the institution_names dict so I could test those function calls without accessing the db during module initialization.)

FWIW, here is an execution under 3.10 with lines 66-69 commented out:

$ python -m format_rules_annotated -r QCC01:QNS01:PH:35
QCC01:QNS01:PH:35
C- or above in PH 101 at Queensborough, 4.0 credits, transfers to Queens as PHYS-11 and PHYS-14, 4.0 credits.
[No "Exception ignored" message appears here because db was not accessed during module initialization]
$
History
Date User Action Args
2022-01-05 23:11:47cvickerysetrecipients: + cvickery, piro, Dennis Sweeney
2022-01-05 23:11:47cvickerysetmessageid: <1641424307.52.0.791048608753.issue46256@roundup.psfhosted.org>
2022-01-05 23:11:47cvickerylinkissue46256 messages
2022-01-05 23:11:47cvickerycreate