Resolves duckdb typing module deprecation, locks backend Python versions#43
Resolves duckdb typing module deprecation, locks backend Python versions#43falquaddoomi wants to merge 4 commits intomainfrom
Conversation
d33bs
left a comment
There was a problem hiding this comment.
Nice catch, LGTM!
Aside, would it make sense to create a simple test which helps ensure this works as expected? This might help catch the error during other automated work.
That's a great idea; in fact, in the process of adding that test I discovered that the backend was installing packages with I don't see a compelling reason to switch to 1.4.1 yet, so I'm going to change it to import VARCHAR from Anyway, I'll update the PR with tests and make the changes I described above. Thanks! |
…e of the migration shim introduced in 1.4.1. Adds pre-commit upgrades, linting tweaks.
…st marker for slow tests, disabled by default. Marks embedding creation test as slow.
…en flag, avoiding version bump surprises
A somewhat recent change to the DuckDB Python library deprecated
duckdb.typingand added a mechanism for redirecting symbol imports from the deprecated package to the newduckdb.sqltypesmodule that replaces it (PR: duckdb/duckdb-python#96). This mechanism unfortunately didn't work for us, since we were importing the baseduckdbpackage and referencing, e.g.,duckdb.typing.VARCHARdirectly.This PR changes references fromduckdb.typing.Xtoduckdb.sqltypes.X, resolving the issue.After some discussion and testing (thanks, @d33bs!), it turned out that the backend was erroneously upgrading DuckDB a full minor version up when what it should have been doing was installing the specific versions from its (previously unused)
uv.lockfile. The PR now does the following:@pytest.mark.slowdecorator.-m "slow"when invokingpytest, which will run only the slow tests.pytest -m "slow or not slow".uv.lockand uses the--frozenflag to ensure that the locked versions are installed, putting us back on DuckDB 1.3.1VARCHARfromduckdb.typing, allowing us to use the migration shim introduced in 1.4.1