Live data from Hacker News

Django 6.0 beta 1 released

djangoproject.com

11–20 of 60 posts

Re: Django 6.0 beta 1 released

#11
post #4

Looks like Django 6 is getting an offical task system. There’s no real world brokers or workers supported (at least built in), but still centralising around a standard interface might make things nicer than the celery tentacle monsters Django apps eventually tend to mutate into.

I don´t understand how you could use this new tasks system in production if there is no real workers when it's released? Are there any 3rd party yet?

Re: Django 6.0 beta 1 released

#12
post #9

Incompatible with the default Ubuntu 22.04 LTS python version, just FYI (uses 3.10 whereas the minimum is now 3.12).

Is this handled by uv or do you need to use deadsnakes ppa?

If anything, you'd need the opposite, as deadsnakes is old versions (OP needs a new version).

Re: Django 6.0 beta 1 released

#14
post #4

Looks like Django 6 is getting an offical task system. There’s no real world brokers or workers supported (at least built in), but still centralising around a standard interface might make things nicer than the celery tentacle monsters Django apps eventually tend to mutate into.

I don´t understand how you could use this new tasks system in production if there is no real workers when it's released? Are there any 3rd party yet?

I guess the idea is first to provide a generic interface to connect various backends to and let the community develop those. Users of Django should then be able to swap one out for another. Maybe one will emerge as a quasi-standard or maybe it will be like database backends where different backends serve different purposes.

At leas that's my guess.

Re: Django 6.0 beta 1 released

#15
post #7

Love me Django and excited about this release. It’s been quite a journey through the years. I started working with it a little before 1.0 and continue to do so. Nowadays as an independent consultant which gives me the ability to really help keep Django systems up to date. Yes, there’s some rough edges. Like updating can be tricky sometimes, and performance relating to DB queries is a skill in itself, but in general i…

What're some DB query performance issues you've run across in the past and how did you resolve them?

Re: Django 6.0 beta 1 released

#16
post #4

Looks like Django 6 is getting an offical task system. There’s no real world brokers or workers supported (at least built in), but still centralising around a standard interface might make things nicer than the celery tentacle monsters Django apps eventually tend to mutate into.

I don´t understand how you could use this new tasks system in production if there is no real workers when it's released? Are there any 3rd party yet?

My understanding is that if you just need to return a response to the client as quickly as possible, but are ok with then processing your task directly after that, then it's still usable today.

But if you want to schedule a task further in the future, then a new backend will be needed for that.

Re: Django 6.0 beta 1 released

#17
post #8

I love Django, and the new `tasks` framework to replace `celery` (/whatever processor you prefer) looks great. I've only recently come back to it, and I do hope they continue to add more batteries to their "batteries included" framework over time. I was surprised just how much stuff I had to add to my little project that will require updating _outside_ the main framework, eg.: * django-components for little template…

In addition to the debug-toolbar, I'd really like people to know about https://github.com/jazzband/django-silk (no affiliation)

I just recently found it and it has been amazing. It logs all your requests and responses by default (but is quite configurable) as well as your SQL queries (and how many/how long they take), in an easily searchable database. It can even profile functions for you.

Makes it very to see at a glance what pages are slow for people, and why, so they can be optimized accordingly.

Re: Django 6.0 beta 1 released

#18
I would really like if there was a way to integrate with non-Python ecosystems. I know this is way outside the scope of Django, but I still have to mention it. The moment you want to rely on a JavaScript library or generate some CSS you pretty much have to pull in Node and NPM because there just so much value in those ecosystems. And then you have to put up with a second ecosystem with its own build system and somehow have to magically tie those two together, adding adapters on top of adapters.

Re: Django 6.0 beta 1 released

#19

Earlier quoted context omitted.

I don´t understand how you could use this new tasks system in production if there is no real workers when it's released? Are there any 3rd party yet?

My understanding is that if you just need to return a response to the client as quickly as possible, but are ok with then processing your task directly after that, then it's still usable today. But if you want to schedule a task further in the future, then a new backend will be needed for that.

I think the bigger use case is being able to (backoff) retry failing API calls to 3rd party services. AFAIUI the new tasks package doesnt offer this in v1 which is a deal breaker for my project, at least.

Re: Django 6.0 beta 1 released

#20
post #15
post #7

Love me Django and excited about this release. It’s been quite a journey through the years. I started working with it a little before 1.0 and continue to do so. Nowadays as an independent consultant which gives me the ability to really help keep Django systems up to date. Yes, there’s some rough edges. Like updating can be tricky sometimes, and performance relating to DB queries is a skill in itself, but in general i…

What're some DB query performance issues you've run across in the past and how did you resolve them?

I assume they are referring to the default behavior of the ORM fetching all fields for a model by default, and the frequent need to use select_related/prefetch_related to group your queries into larger ones that are (usually) much faster than making many small queries for related tables.
Post reply on HN