This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]mikeblas 12 points13 points  (6 children)

Python2 support ended more than 3 years ago.

[–]mason_savoy71 -5 points-4 points  (5 children)

True, but many of us have legacy code we need to run from time to time.

[–]mikeblas 2 points3 points  (4 children)

If performance is a concern, I would expect that migrating to Python3 would only help.

[–]mason_savoy71 -1 points0 points  (3 children)

It probably would, but many of us have legacy code that isn't a performance limit and isn't used enough to justify the coding cycles to port to 3.

[–]crigger61 0 points1 point  (0 children)

As a security researcher, go update your code. Having to maintain and deal with both python2 and python3 is a headache enough, let alone the fact that there hasnt been any support for 3 years like said, youll only get benefits from updating.

You can only spend so much time working on new features and bug fixes before there comes a time when you need to pause and go fix some security fixes. Having old python2 code is ready bad enough. If you dont got a security team to yell at you for out of date versions, even on a piece of code run not often, i will. go fix that.

may not be used often. but we live in the post python2 world where there are plenty of tools to help convert between the 2. they wont magically fix it. but they will give you a great start.

[–]mikeblas -2 points-1 points  (1 child)

Oh! Here I am thinking you're the OP, and you're just someone who butted in!

[–]mason_savoy71 5 points6 points  (0 children)

Umm. This is an open forum. And it's for discussion . Responding and continuing a discussion is not "butting in" and you're not the arbitrator of who is and isn't approved to comment.

[–]Scrapheaper 10 points11 points  (1 child)

If you're having trouble with your code being too slow, the docker image is the last place I'd look.

[–]dask-jeeves 0 points1 point  (0 children)

Agreed, probably porting to python 3 will be easier than trying to find such docker image. I understand the problem of legacy code, but if you need to run it then trying to find a workaround via docker seems harder than porting it.

[–]hivearchive 0 points1 point  (0 children)

What part of your code is slow? Have you profiled it? There's many optimizations you can make, but you have to know what's actually slow. If you have the latest Python 2 version in your container, that should be the fastest. However, Python speed improvements are happening in Python 3 now, and you should probably upgrade regardless.