rigglemania / pysqlcipher3

Python 3 bindings for SQLCipher
zlib License
138 stars 42 forks source link

Fix error message in assertion #25

Closed kwisii closed 11 months ago

kwisii commented 3 years ago

Due to error text adjustment of sqlcipher repository https://github.com/sqlcipher/sqlcipher/commit/821782a23b06ab2fd774ae2500d18e1cc2a82a80

Through running pysqlcipher3 I never get the file is encrypted or is not a database message. Only get file is not a database message, so I was studying some reported Issues and the third point in this comment. So I think this modification fixes 4 failures and only 2 errors remain when running python setup.py test provided using Python3.X (I used Python 3.9.6 on an Mac OS X 11.4 system)

rigglemania commented 3 years ago

Is this an issue because you are linked against SqlCipher version 4? If so, do your changes actually break the tests for anyone running with version 3?

kwisii commented 3 years ago

The error message change in https://github.com/sqlcipher/sqlcipher/commit/821782a23b06ab2fd774ae2500d18e1cc2a82a80 was first active for the released version 3.20.1 (tag v3.4.2).

Therefore, I tested this 3.20.1 and previous released version 3.15.2 (tag v3.4.1) in a clean Docker environment with "deprecated" Python version 3.5.3.

Who would have thought that with the older version 3.15.2 the tests passed, and with the error message change version they fail.

So it has nothing to do with compatibility between SqlCipher version 3 and 4. They changed the message within SqlCipher version 3 releases. It depends on which specific SQLCipher 3 version is installed.

rigglemania commented 1 year ago

I missed your last round of the changes a long time ago. Is this still something you want merged? Because it looks like you are now only modifying test files, so I'm fine merging if you still want.

kwisii commented 1 year ago

yes it is still relevant

rigglemania commented 1 year ago

Can you bump the version and then I'll merge

kwisii commented 11 months ago

Long time no see! Now you can merge.