53 karma · joined Jan 2, 2024 (2y ago) · 24 submissions
comment 3mo ago · link · parent
It’s free, open source, all my family uses it for about 2 months now and it just works.
Btw, if it’s creator read this : thanks A LOT ! :)
comment 6mo ago · link · parent
I think that Django's magic isn't statically typecheckable, so I tend to avoid those features altogether. If it's not possible, you can still provide a custom stubs for your needs, or provide a custom abstraction that wraps the not-typechecked parts, or accept that some parts of your codebase are less safe to modify than others. Nothing perfect, but it works.
comment 6mo ago · link · parent
I migrated a small python/django backend project at work from basedpyright to pyrefly 1.0 yesterday to try it, and the migration was painless: just running pyrefly init converted the basedpyright config to a pyrefly config in the pyproject.toml.
The typecheking phase went from ~3/4s to 0.5s which is very nice when ran with pre-commit hooks. It also caught some unnecessary type conversion that basedpyright missed (ex: calling str(value) on a value that is already a string).
I haven't toyed too much with the LSP in zed, but I did not feel anything was missing for now.
I will try to migrate larger backends in the following weeks to see how it goes.
Anyway, it's very cool to see a new stable and fast typechecker for Python ! :)
comment 11mo ago · link · parent
That being said, the current state of type annotations is a pain: django-stubs works on mypy but with a plugin (and mypy is slow as hell), django-types is a fork a django-stubs that works on pyright but is usually out of sync and pylance ships its owned stubs forked from django-types.
My biggest wish for next Django release would be that they finally ship type annotations themselves where it is possible. I don't need the crazy inheritance parts or the crazy stringly typed parts to be have proper type annotations, but just some simple stuff like HttpRequest, HttpResponse, View, Model, etc would help a LOT !
comment 12mo ago · link · parent
We moved all our celery tasks to procrastinate at work for all our django backends since almost two years now and it has been great.
Having tasks deferred in the same transaction as the business logic stuff is something that helped us a lot to improve consistency and debugability. Moreover, it's so nice to able to inspect what's going on by just querying our database or just looking at the django admin.
For those wondering, procrastinate has no built-in alternative to django-celery-beat, but you can easily build your own in a day: no need for an extra dependency for this :)
comment 12mo ago · link · parent
Though, I imagine you could have strategies to give an approximation of it, for example like keeping track of the past execution time of a given type of task in order to infer the progress of a currently running task of the same type.
comment 1y ago · link · parent
For typechecker, I also vouch for Pyright which is what we use for all our django backends at work.
Just be aware that you will have hard time to typecheck part of your code where you rely heavily on django's magic (magic strings, auto-generated properties/methods, etc...).
In these cases, it's sometimes better to avoid these features entirely or accept that some part of your code will not be typechecked.
comment 1y ago · link · parent
I do agree with you !
Focusing on being healthy is in my opinion way more beneficial to avoid being sick in general than trying to avoid being sick at all cost. Being stacked by millions in cities living unhealthy lives is definitely not helping to prevent being sick. I move to the country side after the last lock down, ~50km from a big city to still be close to work, and it's been very relaxing and good for my family's overall health.
comment 1y ago · link · parent
We had this police operations too, even in restaurants where you had to have your mask when standing up (like going to the toilet, paying the bill, etc..), but you could take it off at your table.
I remember during the first lock down we were forbidden to go 1.5km from home except to go buy food: there was a large parc close to home so a lot of families would go there to chill, play with kids, do running, etc... but after 3 weeks the police noticed and they were going around in the parc to fine everyone. Most people were more afraid to get caught than to get sick, even old people.
comment 1y ago · link · parent
I don't remember anyone wearing a mask either in the doctor's waiting room, even when it was fool of sick people (old and young mixed)
* except for dentists, surgeon and their assistants during
comment 2y ago · link · parent
I hope to have time to build a small web backend project this winter, to get to know the language and ecosystem better.
I heard good things about Oxpecker for the http part; do you have any recommendation for a good postgresql client/driver ? (I don't like ORMs)
comment 2y ago · link · parent
I hope Gleam will find more sponsors for Louis and the core contributors, especially one from a stable company !
On this side, have you thought about publishing paid educational content to both pay the bill and still contribute to Gleam’s growth ? I don’t know for others but I would love to pay for something like Luca Palmieri’s book Zero To Production in Rust but in Gleam !
comment 2y ago · link · parent
It’s really great to see some strong contributors alongside Louis :)
I'm only learning Gleam right now but the feature set already feels small, very cohesive and well thought.
Pipelines, function capture, use expression, pattern matching: I wish I could work with this in Python at work :')
comment 2y ago · link · parent
The fact that the python plugin uses precompiled Python binaries by default instead of building them from source remove common issues I had with the asdf's python plugin at work with missing dependencies.
Just so you know, I encountered two little quirks that needed a fix:
- "Backspace Key Doesn't work in Python REPL": https://github.com/indygreg/python-build-standalone/blob/mai...
- An issue with the mise-poetry plugin: https://github.com/mise-plugins/mise-poetry/issues/9
I will see how it goes in the long run, but I really like it so far :)