orsinium-archive / djburger

Framework for safe and maintainable web-projects.
https://djburger.readthedocs.io
GNU Lesser General Public License v3.0
75 stars 6 forks source link

Project decisions: python versions support #7

Open sobolevn opened 5 years ago

sobolevn commented 5 years ago

I haven't seen a clear policy about python versions this project supports, so I may be wrong.

Concern

I have seen that this project uses six, so I assumed that it is currently supporting python2. Which is not a good thing

Problems

Supporting python2 can cause project maintainers several problems:

  1. Late language features support, like typing, etc
  2. A lot of compat fixes, usually code that support both python version is full of compat pieces and even sub-frameworks on large code bases
  3. Libraries limitation, some libraries are already python3+ (including django)

I would like to highlight the biggest problem for me: typing. I see, that currently you do not use typing, but that's not that good.

I, as a user, want to get typing from the business logics framework for free. And if I don't use types - by my choice - and my developer experience won't suffer.

And typing will make a lot of features even more awesome. Like validators, schemes, etc.

End of support

django already drops python2 support, python2 eof is in 2020.

Solution

Drop python2 support. Later it is possible to add type annotations and mypy support.

P.S. We are also working on types for django: you can join us here https://github.com/TypedDjango

orsinium commented 5 years ago

DjBurger, like many other projects, will support Python 2 to end of 2019. Also I have funny fact: one year ago DjBurger had written for Python 2.7 and Django 1.9 based project.