attributeproxy doctest fails because stdlib error message changed
The test_ligolw
test target is failing with Python 3.12 apparently because the message you get when trying to set a read-only property has changed:
$ git log -1 --oneline
a3c30e5a72 (HEAD -> refs/heads/master, refs/remotes/upstream/master, refs/remotes/upstream/HEAD) ligo/lw/ligolw.py: adjust escape chars in doc
$ python setup.py build_ext --inplace 1>/dev/null
...
$ PYTHONPATH="$(pwd)" make -C test test_ligolw
make: Entering directory '/home/duncan/git/git.ligo.org/kipp.cannon/python-ligo-lw/test'
=== start test_ligolw ===>
python3 test_ligolw.py && { echo "Pass" ; true ; } || { echo "Fail" ; false ; }
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE LIGO_LW SYSTEM "http://ldas-sw.ligo.caltech.edu/doc/ligolwAPI/html/ligolw_dtd.txt">
<LIGO_LW>
<Table Name="demo:table">
<Column Name="name" Type="lstring"/>
<Column Name="value" Type="real_8"/>
<Stream Name="demo:table" Type="Local" Delimiter=",">
"mass",0.5,
"velocity",34
</Stream>
</Table>
</LIGO_LW>
**********************************************************************
File "/home/duncan/git/python-ligo-lw/ligo/lw/ligolw.py", line 144, in ligo.lw.ligolw.attributeproxy
Failed example:
Test.Scale.default = 2.
Expected:
Traceback (most recent call last):
...
AttributeError: can't set attribute 'default'
Got:
Traceback (most recent call last):
File "/home/duncan/opt/conda/envs/py312/lib/python3.12/doctest.py", line 1368, in __run
exec(compile(example.source, filename, "single",
File "<doctest ligo.lw.ligolw.attributeproxy[6]>", line 1, in <module>
Test.Scale.default = 2.
^^^^^^^^^^^^^^^^^^
AttributeError: property 'default' of 'attributeproxy' object has no setter
**********************************************************************
1 items had failures:
1 of 10 in ligo.lw.ligolw.attributeproxy
***Test Failed*** 1 failures.
Fail
make: *** [Makefile:77: test_ligolw] Error 1
make: Leaving directory '/home/duncan/git/git.ligo.org/kipp.cannon/python-ligo-lw/test'