Use typing.Dict type
15ac40b0a78484575cb41f7a1e1ab6cdceea9e3a had added a Optional[dict[str, Any]] annotation (notice the non-capital d), which inadvertently caused this project to not be compatible with Python 3.8, where dict the type is not subscriptable until 3.9, which causes build problems in downstream packages since there is no official requires_python marker in the package metadata for 3.x, so old Pythons will happily try to install the newer versions.
This PR applies the minimal fix for this that makes this package again importable on Python 3.8 – I would recommend releasing this as dj-database-url==3.0.2 to minimize downstream user misery, then follow up with fixing things properly.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 100.00%. Comparing base (7cc1121) to head (c44e599).
:warning: Report is 9 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #271 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 130 130
Branches 14 14
=========================================
Hits 130 130
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi @akx this project no longer supports 3.8 as it's out of support. Hence we are using dict over Dict. Unless there is a really compelling reason I see no reason to make this change.
Please see the PR description. The current latest released version on PyPI doesn't declare it's 3.9+, so it will be installed on 3.8 Pythons, and then fail at runtime.
Ah sorry missed that, in that case the issue is with the metadata in the support of python versions; the support of versions should be fixed instead.
@mattseymour Yes, that's #273. But it doesn't fix that there are versions out there on PyPI that claim to work on 3.8, but don't.
In particular, if any of the projects depending on this package haven't pinned their dj-database-url version (shame on them) and are still on 3.8, they'll get a non-working project.