Grinnz / Mojo-SQLite

Mojo::SQLite - A tiny Mojolicious wrapper for SQLite
https://metacpan.org/pod/Mojo::SQLite
Other
27 stars 12 forks source link

Move away from `sqlite_unicode` #21

Closed AdamWill closed 3 years ago

AdamWill commented 3 years ago

DBD::SQLite wants to move away from using the sqlite_unicode attribute towards using sqlite_string_mode, per https://github.com/DBD-SQLite/DBD-SQLite/commit/9dc75eaeadd5d7f3d5024c3f82630d951722c4c7 . With DBD::SQLite 1.68, Mojo::SQLite's use of it causes deprecation warnings to be logged on DB connection.

After I filed an issue, upstream are removing the deprecation warning in 1.69 (which seems to be the development stream for 1.70, I'm not sure), but it seems they still consider it 'deprecated', they just want to move a bit slower. So I guess Mojo::SQLite should still look at making the change somehow.

I'm filing an issue rather than sending a PR as I'm not sure how you'd want to handle this. Just bump the main branch to require DBD::SQLite 1.68 minimum and change it out directly, with no older version compatibility? Or conditionalize it somehow?

AdamWill commented 3 years ago

See also https://progress.opensuse.org/issues/96317 and https://github.com/DBD-SQLite/DBD-SQLite/issues/87 .

Grinnz commented 3 years ago

The only backcompat concern would be if someone is setting sqlite_unicode => 0 via the options since that would imply a different string mode to set. Don't know how much it matters.

Grinnz commented 3 years ago

I think the reasonable thing to do here is always set the new string mode unless sqlite_unicode is passed explicitly as an option.

AdamWill commented 3 years ago

By "backward compatibility" I meant keeping newer versions of mojo::sqlite working with older versions of dbd::sqlite.

Grinnz commented 3 years ago

I don't mind increasing the dependency on DBD::SQLite.

AdamWill commented 3 years ago

edit: duh, we don't need to wait for 1.70, we only need 1.68 to make the change. PR coming.

Grinnz commented 3 years ago

Resolved by #22