longreads

TIL: How to force PyLance to use a current version of Django-stubs

One of the little annoyances I encounter when I have to use Visual Studio Code, PyLance and a modern version of Django is, that PyLance shows errors for things like the login_not_required decorator. Today I found a workaround by chance when I once again did a web search for the topic. This StackOverflow post outlines the solution — just remove the version of django-stubs included with PyLance. rm -rf ".vscode/extensions/ms-python.vscode-pylance-*/dist/bundled/stubs/django-stubs"

UV — I am (somewhat) sold

A bit more than a week ago, I posted this on Mastodon after I read several posts in a long thread on using UV for Python projects. Simon has created a blog post summing up and linking to the most significant posts in this long thread — uv under discussion on Mastodon. Now, a week later, I have to admit that I was wrong. I still stand with my opinion that the speed improvement is not crucial to me, but it is of course nice to have.

Continue reading →