Issue: Test test_changelog_jsonfield failing in Fedora 37
Author: vkrizan
State: closed
Created: 2022-07-12 13:02:28

Hello,

I'm building an RPM package for new Fedora 37 (rawhide) and it fails on `test_changelog_jsonfield` test.
```
FAIL: test_changelog_jsonfield (tests.sqlite_changelog.TestChangeLog.test_changelog_jsonfield)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/peewee-3.15.0/tests/base.py", line 260, in inner
    method(self)
  File "/builddir/build/BUILD/peewee-3.15.0/tests/sqlite_changelog.py", line 161, in test_changelog_jsonfield
    self.assertChanges([
  File "/builddir/build/BUILD/peewee-3.15.0/tests/sqlite_changelog.py", line 64, in assertChanges
    self.assertEqual(accum, changes)
AssertionError: Lists differ: [('IN[25 chars]one, '{"k1":"v1"}']}), ('INSERT', 'ct2', {'dat[74 chars]']})] != [('IN[25 chars]one, {'k1': 'v1'}]}), ('INSERT', 'ct2', {'data[73 chars]']})]
First differing element 0:
('INSERT', 'ct2', {'data': [None, '{"k1":"v1"}']})
('INSERT', 'ct2', {'data': [None, {'k1': 'v1'}]})
- [('INSERT', 'ct2', {'data': [None, '{"k1":"v1"}']}),
?                                     --  ^ ^  ^ -
+ [('INSERT', 'ct2', {'data': [None, {'k1': 'v1'}]}),
?                                    +   ^ ^^  ^
-  ('INSERT', 'ct2', {'data': [None, '["i0","i1","i2"]']}),
?                                     --  ^ ^  ^ ^  ^ -
+  ('INSERT', 'ct2', {'data': [None, ['i0', 'i1', 'i2']]}),
?                                    +   ^ ^^  ^ ^^  ^
   ('INSERT', 'ct2', {'data': [None, 'hello']})]
----------------------------------------------------------------------
```
https://kojipkgs.fedoraproject.org//work/tasks/8448/89418448/build.log

Build env has this installed:
```
annobin-docs-10.78-1.fc37.noarch                                              
annobin-plugin-gcc-10.78-1.fc37.x86_64                                        
cpp-12.1.1-3.fc37.x86_64                                                      
expat-2.4.8-1.fc37.x86_64                                                     
gcc-12.1.1-3.fc37.x86_64                                                      
gcc-plugin-annobin-12.1.1-3.fc37.x86_64                                       
glibc-devel-2.35.9000-28.fc37.x86_64                                          
glibc-headers-x86-2.35.9000-28.fc37.noarch                                    
kernel-headers-5.19.0-0.rc6.git0.1.fc37.x86_64                                
libb2-0.98.1-6.fc37.x86_64                                                    
libmpc-1.2.1-4.fc36.x86_64                                                    
libpq-14.3-1.fc37.x86_64                                                      
libxcrypt-devel-4.4.28-1.fc37.x86_64                                          
mpdecimal-2.5.1-3.fc36.x86_64                                                 
python-pip-wheel-22.0.4-4.fc37.noarch                                         
python-rpm-macros-3.11-1.fc37.noarch                                          
python-setuptools-wheel-62.6.0-1.fc37.noarch                                  
python3-3.11.0~b4-1.fc37.x86_64                                               
python3-Cython-0.29.30-2.fc37.x86_64                                          
python3-apsw-3.38.5.r1-2.fc37.x86_64                                          
python3-babel-2.10.3-2.fc37.noarch                                            
python3-charset-normalizer-2.1.0-1.fc37.noarch                                
python3-click-8.1.2-2.fc37.noarch                                             
python3-devel-3.11.0~b4-1.fc37.x86_64                                         
python3-docutils-0.17.1-3.fc37.noarch                                         
python3-flask-1:2.1.2-2.fc37.noarch                                           
python3-idna-3.3-3.fc37.noarch                                                
python3-imagesize-1.2.0-8.fc37.noarch                                         
python3-itsdangerous-2.0.1-4.fc37.noarch                                      
python3-jinja2-3.0.3-4.fc37.noarch                                            
python3-libs-3.11.0~b4-1.fc37.x86_64                                          
python3-markupsafe-2.1.1-2.fc37.x86_64                                        
python3-packaging-21.3-4.fc37.noarch                                          
python3-psycopg2-2.9.3-5.fc37.x86_64                                          
python3-pygments-2.12.0-3.fc37.noarch                                         
python3-pyparsing-2.4.7-12.fc37.noarch                                        
python3-pysocks-1.7.1-14.fc37.noarch                                          
python3-pytz-2022.1-2.fc37.noarch                                             
python3-requests-2.27.1-5.fc37.noarch                                         
python3-rpm-generators-13-1.fc37.noarch                                       
python3-rpm-macros-3.11-1.fc37.noarch                                         
python3-setuptools-62.6.0-1.fc37.noarch                                       
python3-six-1.16.0-7.fc37.noarch                                              
python3-snowballstemmer-2.2.0-1.fc37.noarch                                   
python3-sphinx-1:4.5.0-3.fc37.noarch                                          
python3-sphinx-theme-alabaster-0.7.12-15.fc37.noarch                          
python3-sphinxcontrib-applehelp-1.0.2-9.fc37.noarch                           
python3-sphinxcontrib-devhelp-1.0.2-9.fc37.noarch                             
python3-sphinxcontrib-htmlhelp-2.0.0-6.fc37.noarch                            
python3-sphinxcontrib-jsmath-1.0.1-17.fc37.noarch                             
python3-sphinxcontrib-qthelp-1.0.3-10.fc37.noarch                             
python3-sphinxcontrib-serializinghtml-1.1.5-5.fc37.noarch                     
python3-urllib3-1.26.9-3.fc37.noarch                                          
python3-werkzeug-2.0.3-2.fc37.noarch                                          
sqlcipher-4.4.3-4.fc36.x86_64                                                 
sqlcipher-devel-4.4.3-4.fc36.x86_64                                           
sqlite-3.39.0-1.fc37.x86_64                                                   
sqlite-devel-3.39.0-1.fc37.x86_64   
```

Can you please have a look?

Thank you.

Yes, this was fixed here: 4741e9f07d2f0fccee3a4731bc03093ef56e26f5

The regression is due to a change in the way Sqlite 3.39.0 propagates subtypes from columns in subqueries. 

* https://sqlite.org/src/info/
* https://sqlite.org/forum/forumpost/9c94b6188e

Is it possible to skip that single test with `runtests.py`, or would you suggest for us to wait for a new version?

I pushed a new release, 3.15.1, which contains the patch.

Thank you very much Charles!