
Django 3.0 alpha 1 released - edmorley
https://www.djangoproject.com/weblog/2019/sep/10/django-30-alpha-1-released/
======
dragonsh
Django is a better monolithic framework. But in Python world users will be
equally productive with any WSGI or ASGI based framework.

With Django 3.0 alpha there is an issue with orm which is still not async, so
not sure how mixing async code with sync code will behave.

Personally I haven't moved to any async framework in Python for project which
need db access until the database adapters like psycopg and orm like
sqlalchemy support them completely.

Now a days since most of my startup work involves developing REST API using
Python backend without worrying about templates prefer micro framework like
Flask [1], bottle [2], web.py [3], Pyramid [4], TurboGears 2 [5], cherrypy [6]
etc.

For async might use uvloop based micro framework like sanic [7], quart [8], or
starlette [9] vibora [10] etc.

These days in development we try to use these framework more like a library
than framework per se. The difference is using them as library our code call
library code and it's inline with one of the zen of python " _Explicit is
better than implicit_ ".

[1]
[https://palletsprojects.com/p/flask/](https://palletsprojects.com/p/flask/)

[2] [https://bottlepy.org/](https://bottlepy.org/)

[3] [http://webpy.org/](http://webpy.org/)

[4] [https://trypyramid.com/](https://trypyramid.com/)

[5] [https://turbogears.org/](https://turbogears.org/)

[6] [https://cherrypy.org/](https://cherrypy.org/)

[7] [https://github.com/huge-success/sanic](https://github.com/huge-
success/sanic)

[8] [https://pgjones.gitlab.io/quart/](https://pgjones.gitlab.io/quart/)

[9] [https://www.starlette.io/](https://www.starlette.io/)

[10] [https://vibora.io/](https://vibora.io/)

~~~
collinmanderson
> so not sure mixing async code with sync code will behave.

I believe there are safeguards in place to be sure you don't accidentally do
this.

~~~
dragonsh
It will trigger an error to review the code. It still is bit of a trouble to
debug async code with sync code.

" _Note that as a side-effect of this change, Django is now aware of
asynchronous event loops and will block you calling code marked as “async
unsafe” - such as ORM operations - from an asynchronous context. If you were
using Django from async code before, this may trigger if you were doing it
incorrectly. If you see a SynchronousOnlyOperation error, then closely examine
your code and move any database operations to be in a synchronous child
thread._ "

------
m_ke
Biggest news is ASGI support, which should enable a ton of new features and
performance improvements in the future.

~~~
iikoolpp
ASGI is disgusting. It's WSGI (not very good in the first place) with asyncio
tacked on (even worse!).

~~~
ldng
I don't know ASGI. Could you argument please ? Your comment is not useful to
me as is.

~~~
mikelyons
[https://www.google.com/search?q=WSGI+vs+ASGI](https://www.google.com/search?q=WSGI+vs+ASGI)

------
throwaway13337
As someone who built his business on django, I'd say I'm super happy with it.
However, my biggest gripe with it is it's continued push for updates with
breaking changes.

Moving from django 1/python 2.7 was quite painful but possible and now they're
suggesting that third party developers stop supporting django 2.2? It was
released in April this year!

I know I'm not using any new django features that weren't there in 1.0. I
imagine most django users are the same. I'd love to just have a LTS with
security updates and conservative non-breaking changes.

~~~
TheChaplain
I'm not sure if you're trolling, but if you're serious about having a business
based on Django you should know that v2.2 have support until 2022.

The current LTS (1.11) ends in April 2020, which gives you a little more than
6 months to upgrade current projects to 2.2.

------
nprateem
I like django, I really do. But the other day I had to reinstall a site built
with Django 1.4 and was disappointed to find that the docs for it are no
longer online :-(

~~~
sgt
First hit when googling "Django 1.4":

[https://django.readthedocs.io/en/1.4.X/](https://django.readthedocs.io/en/1.4.X/)

~~~
nprateem
I didn't think to google because
[https://docs.djangoproject.com/en/1.4/](https://docs.djangoproject.com/en/1.4/)
404s (and it was 4am). At least they're still online somewhere (but on the
main site or a link to RTD would have been handy)

~~~
sgt
Good point. I wonder how you would notify the Django team about simple things
like that. They do get commercial backing so I think they have capacity to
maintain old documentation as a matter of good habit.

------
Siecje
When I run my tests with python -Wa I get a lot of warnings that seem to come
from inside Django. Is this caused by my code? How can I silence them?

    
    
      /home/cody/.virtualenvs/37/lib/python3.7/site-packages/django/db/models/sql/compiler.py:1030: RemovedInDjango30Warning: Remove the context parameter from MultiSelectField.from_db_value(). Support for it will be removed in Django 3.0.
      RemovedInDjango30Warning,
      /home/cody/.virtualenvs/37/lib/python3.7/site-packages/django/db/models/sql/compiler.py:1030: RemovedInDjango30Warning: Remove the context parameter from MultiSelectField.from_db_value(). Support for it will be removed in Django 3.0.
      RemovedInDjango30Warning,

~~~
Denvercoder9
A quick Google search suggests that this is caused by the django-
multiselectfield package, which seems unmaintained (it hasn't been updated for
2 years) and doesn't claim to be compatible with Django 2 or 3.

~~~
Siecje
Thanks I will look at removing this.

------
collinmanderson
Release notes here:
[https://docs.djangoproject.com/en/dev/releases/3.0/](https://docs.djangoproject.com/en/dev/releases/3.0/)

------
Siecje
> jQuery is upgraded from version 3.3.1 to 3.4.1

Is there a plan to stop requiring jQuery?

~~~
allenskd
Given companies are still using old versions of IE in 2019 or are forced to
use compatibility mode with hinting falling back to IE 7,8,etc engine I feel
like jQuery is more of a commodity than writing custom code for certain
scenarios.

I also thought we would've been better off without jQuery until I started
receiving calls that multiple users with different browsers had problems with
the app... and telling the users to update would either need approval from the
IT department or the user refuses because it'd break compatibility with
existing legacy apps that they also use. Having jQuery is just a cheap price
to pay.

Ideally I would love everyone to be on the latest browser and that companies
moved out of said legacy apps or at least invested in improving them...

~~~
collinmanderson
Right, why break compatibility when you don't have to?

------
michaelanckaert
I'm really pleased to see Django is still going strong. I started using it
since version 0.96 and have been in love ever since.

I'm currently supporting two major business applications built on Django
(custom ERP/CRM software) and the speed with which our teams can develop new
features is astounding.

------
julioo
Migrate to python 3. Migrate to Django 3. Migrate to next version of Django
Rest Framework.

The cost of maintenance is very high in the Python/Django stack those days!

~~~
xapata
You should take your car for an oil change regularly. You should go to the
dentist every 6 months. And you should consider updating your software
dependencies when they announce end-of-life sometime over the next 10 years.
It's been 10 years.

[https://www.python.org/dev/peps/pep-0373/](https://www.python.org/dev/peps/pep-0373/)

------
philipkiely
Could anyone provide a bit of context about what asynchronous features are
coming and how they compare to how, say, Node handles asynchronous actions?

------
pythonist
ASGI, finally! I was so happy to see the first alpha newreleases.io
notification for version 3.

