Christopher Vickery <christopher.vick...@qc.cuny.edu> added the comment:

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]
$

----------
Added file: https://bugs.python.org/file50542/format_rules_annotated.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46256>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to