linuxserver / docker-nzbget

GNU General Public License v3.0
149 stars 83 forks source link

python2 removed Scripts fail #104

Closed buliwyf42 closed 4 years ago

buliwyf42 commented 4 years ago

With the last update python 2 was removed.

Unfortunately some extension use "python" and therefore fail. I created a symlink to python from python3 which fixes the problem as most scripts got already updated to work with python3.

Perhaps at least provide the symlink in the image.

CHBMB commented 4 years ago

As maintainers we decided we really can't justify including a deprecated version of python in an image, so removed python2.

We did discuss whether to symlink python3 to python as you suggested, but had a concern that people wouldn't realise they're running essentially python2 scripts with python3.

buliwyf42 commented 4 years ago

Thanks for your reply. OK i understand that, i edited the scripts to use python3.

theotherp commented 4 years ago

I have two scripts that stopped working from one day to the other, resulting in dozens of failed downloads (and a full hard drive because radarr kept sending downloads which would then fail). I use https://github.com/caronc/nzb-subliminal and https://github.com/nzbget/FakeDetector which both require python 2. I guess that's what I get to switching to docker... :-/

I also don't really see the need. Sure, it's deprecated, but there are a lot of scripts that still rely on it, it's running in a container, using a limited number of scripts. There's next to no security risk.

emopinata commented 4 years ago

I have two scripts that stopped working from one day to the other, resulting in dozens of failed downloads (and a full hard drive because radarr kept sending downloads which would then fail). I use https://github.com/caronc/nzb-subliminal and https://github.com/nzbget/FakeDetector which both require python 2. I guess that's what I get to switching to docker... :-/

I also don't really see the need. Sure, it's deprecated, but there are a lot of scripts that still rely on it, it's running in a container, using a limited number of scripts. There's next to no security risk.

@theotherp I agree, but it appears that the maintainer's opinion matters more than the users.

aptalca commented 4 years ago

Latest build symlinks python to python3 so as long as the scripts are py3 compatible, it should be fine: https://github.com/linuxserver/docker-nzbget/commit/356b385467bc5dfe14321d41698f2a74288eac9c If not, you can add python2 via https://blog.linuxserver.io/2019/09/14/customizing-our-containers/

Technically, those scripts are already considered user customization because we don't provide or support them. They are third party scripts set up by the users on their own.

emopinata commented 4 years ago

@aptalca it's also not your application, which you don't support either.

aptalca commented 4 years ago

@iammanbeard Don't want to get into a semantics debate, but we support the use of nzbget in a docker image/container. We do not support the use of external scripts that the users themselves set up.

Yes, we included python in this image to make it easier for the users to do so, but we provide no guarantees that those scripts will work.

I won't comment further. Please refrain from sarcastic comments. They add nothing to the issue.

buliwyf42 commented 4 years ago

I did not want to start a feud here. python 2 is deprecated so it's ok to remove it from the image. docker was not made to runs old deprecated software until the end of time but to provide a small footprint containerisation which allow quick and secure changes to the images. It's never a good idea to run deprecated or unmaintained software. This just opens a can of worms.

If you guys have issues with the scripts you use you should approach the maintainer of the scripts to adapt them to python3. The deprecation of python2 was announced a long time ago. The maintainer of the scripts had enough time to adapt. Channel you energy to them not to the maintainers of the image.

theotherp commented 4 years ago

I've worked on enterprise software that uses a programming language which was discontinued 30 years ago... Not all those scripts are actively maintained and some rely on other libraries which aren't maintained either - but they still work great.

Sabnzbd still uses python2... I guess that's fine then? I set my tag to https://hub.docker.com/layers/linuxserver/nzbget/v21.1-r2311-ls47/images/sha256-75ad60a1660d180b5697a20464dbb193596e53564e7fa47a7236e7d7880c673b?context=explore and will use my own container in the future. Of course the maintainers can do what they want with their container (as I can do what I want with my software), it just means that the container just became unusable for me.

thelamer commented 4 years ago

I think the core issue here is we will always move forward with ingesting base Operating system versions from Alpine we will not be halting that practice because it might break some scripts even if they are popular and unmaintained.

Alpine has stopped building and maintaining packages for essentially the entire python2 ecosystem. We also had a long transition period of about a year where these images included both Python2 and Python3 along with commonly used python2 and python3 libraries.

Python2 to Python 3 is not a tough sell either, in 90% of cases the only thing you need to change in your scripts are the print statements and you are good to go.

In the end though I do not think any further discussion would convince us as an organization to not move forward with this and continue building on Alpine 3.12 and beyond, so I will be closing this issue.

skupjoe commented 4 years ago

I needed to add Py2 back in as well ..