munki / mwa2

Version 2 of MunkiWebAdmin
Other
156 stars 37 forks source link

Python 2.7 Depecated #44

Open danner26 opened 4 years ago

danner26 commented 4 years ago

Are there any plans on upgrading the project to work with a non-deprecated version of python and its libraries?

gregneagle commented 4 years ago

I have no immediate plans to do so, no. (Lots of stuff on my plate and the current code works for me in a RHEL7.7 VM) I think perhaps @chrisgrande was working on this in a fork?

chrisgrande commented 4 years ago

If you need a py3 version, I have a fork here: https://github.com/chrisgrande/mwa2/tree/master-py3 My testing showed no issues, but I recommend testing against a test repo.

macvfx commented 4 years ago

Do we need to amalgamate both versions? or how do we get started with py3 version? I'm testing on macOS 10.5.4.

gregneagle commented 7 months ago

Work has begun on a version that supports Python 3.9 and Django 4.2 here: https://github.com/munki/mwa2/tree/py3 (Why those versions? I need to run MWA2 on a Red Hat Enterprise Linux 9.2 server, where Python 3.9 is the default. Django 4.2 is the last release of Django to support Python 3.9 (it supports some later Python versions as well)

UNMHSC-AppleDev commented 2 months ago

Work has begun on a version that supports Python 3.9 and Django 4.2 here: https://github.com/munki/mwa2/tree/py3 (Why those versions? I need to run MWA2 on a Red Hat Enterprise Linux 9.2 server, where Python 3.9 is the default. Django 4.2 is the last release of Django to support Python 3.9 (it supports some later Python versions as well)

I've been working to get our Munki server on macOS migrated to a new device running macOS 14.5, and have been using the py3 branch (replacing files in the mwa2 folder within the download of mwa2_demo with the py3 branch files) to attempt to set this up as our previous server also used MWA2, however the original version. I was eventually able to get to the point where I am able to get connected to MWA2 via localhost:8080, however it took a handful of manual changes to the run_mwa2.sh script, (changing calls from python to python3, and runwsgiserver to runserver with new syntax) as well as a new symlink for .Python pointing to python3.

I'm not extremely experienced with this type of setup so I may be overlooking something that would make this process much simpler, so I wanted to make this post both as an FYI for anyone going through the same process as myself and as a question of if there is a better setup/process I should be using.

gregneagle commented 2 months ago

The run_mwa2.sh was only ever meant as a quick-and-dirty demo to show it running on a Mac using the included Apache2 and the included Python2 (when Apple still shipped that). In production, most people would run it on an actual server (generally the same web server that serves the Munki repo), so the run_mwa2 script would not be of use there. Certainly happy for someone to do the work to update that script for Python 3, but of course macOS does not ship Python 3, so there's a lot of additional work that must be done.