openwisp / django-netjsonconfig

Configuration manager for embedded devices, implemented as a reusable django-app
http://openwisp.org
Other
194 stars 60 forks source link

[requirements] Drop Python2 Support #132

Closed DaffyTheDuck closed 4 years ago

DaffyTheDuck commented 4 years ago

Dropped support of python2

Removed Python2 from .travis.yml

Removed from future import unicode_literals as this feature import settings from future version of python

Removed mention of Python2 from README.rst

Removed the code supported by python2

Simplified the super() function

Added Python3.6/3.7 in travis-ci

Moved from jsonfield to jsonfield2

Fixes #128

DaffyTheDuck commented 4 years ago

Any reason for flake8 fail ?

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-9.0e-05%) to 99.905% when pulling ded1e8953bc4d1051d088d920825d54747900f3f on IAmAMissingColon:Support/Python3 into 8e3b4f4a4af21bd202d9ccb719bfd147552ccb95 on openwisp:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.0004%) to 99.909% when pulling 1de9454dda9d2ceab9e5fe774c7ea43c3f2b1be3 on IAmAMissingColon:Support/Python3 into ba4c9852790dab04d9c4858b7337fbf9a0d28664 on openwisp:master.

atb00ker commented 4 years ago

@IAmAMissingColon remember to check for:

When dropping python 2 support! :smile:

DaffyTheDuck commented 4 years ago

@IAmAMissingColon remember to check for:

  • @python_2_unicode_compatible
  • callable()
  • from __future__ import ...

When dropping python 2 support!

I think callable() is in python3 right ?

DaffyTheDuck commented 4 years ago

Hmm! Why travis is not running ?

DaffyTheDuck commented 4 years ago

Sorry for that actually :sweat_smile:

atb00ker commented 4 years ago

@nemesisdesign yes, django 3.0 support is expected here. :smile:

@IAmAMissingColon Indeed, is there a reason you are not supporting django 3.0 over here? it is also a dependency that needs to be updated!

P.S: Rebase

DaffyTheDuck commented 4 years ago

@nemesisdesign yes, django 3.0 support is expected here.

@IAmAMissingColon Indeed, is there a reason you are not supporting django 3.0 over here? it is also a dependency that needs to be updated!

P.S: Rebase

Hello @atb00ker , @nemesisdesign I'm going to try the Django3 here now. I dropped the idea before becuase some dependencies were outdated :smile: as #134 is merged it may work :smile:

DaffyTheDuck commented 4 years ago
django-x509 0.5 requires cryptography<2.9.0,>=2.4.0, which is not installed.
django-x509 0.5 requires pyopenssl<20.0.0,>=17.5.0, which is not installed.
django-x509 0.5 has requirement django<2.3,>=1.11, but you'll have django 3.0.1 which is incompatible.
coveralls 1.9.2 has requirement coverage<5.0,>=3.6, but you'll have coverage 5.0 which is incompatible.
DaffyTheDuck commented 4 years ago
django-x509 0.5 requires cryptography<2.9.0,>=2.4.0, which is not installed.
django-x509 0.5 requires pyopenssl<20.0.0,>=17.5.0, which is not installed.
django-x509 0.5 has requirement django<2.3,>=1.11, but you'll have django 3.0.1 which is incompatible.
coveralls 1.9.2 has requirement coverage<5.0,>=3.6, but you'll have coverage 5.0 which is incompatible.

Django-x509 just added support of Django2.1. Sould I just leave it as it is? And openwisp-utils as well Reference

atb00ker commented 4 years ago

@IAmAMissingColon There are 2 commits here now! Can you please fix that?

DaffyTheDuck commented 4 years ago

Okay :smile:

DaffyTheDuck commented 4 years ago

I'm Unable to merge some commits! please help !

atb00ker commented 4 years ago

I'm Unable to merge some commits! please help !

@IAmAMissingColon Before proceeding further, create a backup of your work.

git branch Support/Python3-backup
git checkout Support/Python3-backup
git push -u

Now, check if you backup is here on GitHub. Once you are sure of that, you don't need to worry about messing up your work here and you can keep experimenting. Don't give up so easily, you've solved this before. Let me know if it doesn't work and you can't solve the problem! :smile:

DaffyTheDuck commented 4 years ago

The tests are failing because Django-x509 Dosen't support Django3 @nemesisdesign , @atb00ker

DaffyTheDuck commented 4 years ago

Hi,

Still there are 3 commits, did you try something new about it?

Yeah Trying, Done the same with openwisp-users but fixed it quickly :smile:

DaffyTheDuck commented 4 years ago

error: django-model-utils 4.0.0 is installed but django-model-utils<3.3.0,>=3.1.2 is required by {'openwisp-utils'}

That's remaining only :smile:

DaffyTheDuck commented 4 years ago

Please take a look at the JsonField2 changes :smile: , test is failing, I will fix them :smile:

DaffyTheDuck commented 4 years ago

Fixed some incorrectly sorted imports :smile: , looking for fix

DaffyTheDuck commented 4 years ago

@IAmAMissingColon I'm still waiting for the fix of the failing test.

Working on it sorry :sweat: