django-multidb-router icon indicating copy to clipboard operation
django-multidb-router copied to clipboard

Upgrade python & django

Open ronardcaktus opened this issue 2 years ago • 9 comments
trafficstars

Summary

  • Adds support for Python 3.10
  • Adds support for Django 4+
  • Updates django-nose and flake8 to the latest versions
  • Removes .py ending from .sh file because it's deprecated

Test

(I used tox) On the command line, run: tox

Test result overview

  flake8: OK (1.22=setup[0.86]+cmd[0.36] seconds)
  py35-2.2.X: SKIP (0.05 seconds)
  py36-2.2.X: SKIP (0.00 seconds)
  py37-2.2.X: SKIP (0.03 seconds)
  py38-2.2.X: OK (1.19=setup[0.54]+cmd[0.33,0.01,0.09,0.21] seconds)
  py39-2.2.X: OK (1.70=setup[0.83]+cmd[0.43,0.02,0.13,0.29] seconds)
  py36-3.0.X: SKIP (0.00 seconds)
  py37-3.0.X: SKIP (0.00 seconds)
  py38-3.0.X: OK (1.36=setup[0.54]+cmd[0.49,0.01,0.10,0.22] seconds)
  py39-3.0.X: OK (1.60=setup[0.73]+cmd[0.40,0.01,0.14,0.31] seconds)
  py36-3.1.X: SKIP (0.00 seconds)
  py37-3.1.X: SKIP (0.00 seconds)
  py38-3.1.X: OK (1.18=setup[0.55]+cmd[0.30,0.01,0.11,0.21] seconds)
  py39-3.1.X: OK (1.60=setup[0.75]+cmd[0.39,0.01,0.15,0.30] seconds)
  py36-3.2.X: SKIP (0.00 seconds)
  py37-3.2.X: SKIP (0.00 seconds)
  py38-3.2.X: OK (1.14=setup[0.57]+cmd[0.27,0.01,0.07,0.22] seconds)
  py39-3.2.X: OK (1.51=setup[0.73]+cmd[0.37,0.01,0.11,0.29] seconds)
  py38-4.0.X: OK (1.13=setup[0.56]+cmd[0.27,0.01,0.07,0.22] seconds)
  py39-4.0.X: OK (1.53=setup[0.73]+cmd[0.36,0.01,0.13,0.30] seconds)
  py310-4.0.X: OK (1.11=setup[0.54]+cmd[0.28,0.01,0.07,0.21] seconds)
  py38-4.1.X: OK (1.15=setup[0.55]+cmd[0.29,0.01,0.08,0.22] seconds)
  py39-4.1.X: OK (1.52=setup[0.73]+cmd[0.35,0.01,0.13,0.29] seconds)
  py310-4.1.X: OK (1.13=setup[0.54]+cmd[0.27,0.01,0.10,0.21] seconds)
  py38-4.2.X: OK (1.14=setup[0.53]+cmd[0.30,0.01,0.08,0.22] seconds)
  py39-4.2.X: OK (1.65=setup[0.80]+cmd[0.39,0.01,0.13,0.33] seconds)
  py310-4.2.X: OK (1.22=setup[0.61]+cmd[0.29,0.01,0.09,0.22] seconds)
  congratulations :) (24.25 seconds)

ronardcaktus avatar Jul 24 '23 18:07 ronardcaktus

Hello @jbalogh, hope you are well. I wondered if I could assist with anything else to move this along.

ronardcaktus avatar Aug 03 '23 13:08 ronardcaktus

Hello again @jbalogh. Any updates on this?

ronardcaktus avatar Sep 21 '23 16:09 ronardcaktus

Sorry @ronardcaktus I missed that request but I can probably get it moving. I've set myself as a reviewer to look at it soon.

diox avatar Sep 21 '23 16:09 diox

Could you also update .github/workflows/ci.yml ? Unfortunately I don't have access to force it to run so we won't be able to see the results because I think it's not currently enabled, but that way when it is enabled it will be up to date...

Done! Thanks for taking a look @diox

ronardcaktus avatar Sep 26 '23 18:09 ronardcaktus

Ah, good news, I can approve test runs. Bad news, it's failing because of obsolete versions. So, could you remove Python < 3.8 and Django < 3.2 from the CI & tox.ini test matrix ?

diox avatar Sep 26 '23 19:09 diox

Done. Just an FYI, I did not update travis.yml

ronardcaktus avatar Sep 26 '23 19:09 ronardcaktus

Sigh... Looks like we'll have to remove nose and django-nose as well...

diox avatar Sep 26 '23 22:09 diox

Sigh... Looks like we'll have to remove nose and django-nose as well...

Do you mean delete nose and/or django-nose in tests.py? I cannot see the reason for the failures, so I'm flying blind.

ronardcaktus avatar Sep 28 '23 15:09 ronardcaktus

Yes, remove them completely, probably replacing them with pytest (or nose2) ... nose just doesn't work with Python 3.10, see https://github.com/nose-devs/nose/issues/1127

diox avatar Sep 28 '23 15:09 diox

@diox I just disabled the github nose runner. All tests still pass successfully:

  flake8: OK (1.21=setup[0.88]+cmd[0.33] seconds)
  py38-3.2.X: OK (1.22=setup[0.57]+cmd[0.28,0.01,0.11,0.25] seconds)
  py39-3.2.X: OK (1.17=setup[0.61]+cmd[0.29,0.01,0.07,0.20] seconds)
  py310-3.2.X: OK (1.12=setup[0.57]+cmd[0.26,0.01,0.07,0.21] seconds)
  py38-4.0.X: OK (1.14=setup[0.56]+cmd[0.27,0.02,0.08,0.22] seconds)
  py39-4.0.X: OK (1.09=setup[0.51]+cmd[0.26,0.01,0.08,0.24] seconds)
  py310-4.0.X: OK (1.20=setup[0.62]+cmd[0.28,0.01,0.07,0.22] seconds)
  py38-4.1.X: OK (1.10=setup[0.54]+cmd[0.25,0.01,0.08,0.22] seconds)
  py39-4.1.X: OK (1.04=setup[0.51]+cmd[0.26,0.01,0.08,0.19] seconds)
  py310-4.1.X: OK (1.11=setup[0.54]+cmd[0.26,0.01,0.08,0.21] seconds)
  py38-4.2.X: OK (1.12=setup[0.55]+cmd[0.26,0.01,0.08,0.21] seconds)
  py39-4.2.X: OK (1.09=setup[0.56]+cmd[0.24,0.01,0.08,0.19] seconds)
  py310-4.2.X: OK (1.14=setup[0.57]+cmd[0.25,0.01,0.08,0.22] seconds)
  congratulations :) (14.81 seconds)

Can you please run the jobs?

ronardcaktus avatar May 16 '24 13:05 ronardcaktus

Thanks!

diox avatar May 16 '24 15:05 diox