spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Fix SQLite URLs with Python 3.12.4 #421

Closed soininen closed 1 week ago

soininen commented 1 week ago

Unparsing URL tuples using Python's standard library urllib functions has changed between Python 3.12.2 and 3.12.4 in a way that breaks SQLite URLs that point to a file. The incompatibility raises from the number of forward slashes after URL scheme that differs from previous Python versions and breaks SqlAlchemy's URL parsing. We now ensure that there is always three slashes between the scheme and the path.

No associated issue.

Checklist before merging

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.20%. Comparing base (bcfdd07) to head (7b3a5d0).

Files Patch % Lines
spinedb_api/filters/tools.py 93.33% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #421 +/- ## ========================================== + Coverage 78.13% 78.20% +0.07% ========================================== Files 72 72 Lines 9543 9550 +7 Branches 2038 2039 +1 ========================================== + Hits 7456 7469 +13 + Misses 1748 1742 -6 Partials 339 339 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.