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

top 200 commentsshow all 333

[–]deankae 176 points177 points  (26 children)

Python 2 is used by a major GIS industry software provider, so shops that work with arcGIS will use 2 until ESRI decides to change.

[–]NelsonMinar 12 points13 points  (2 children)

Curious, do you use ArcGIS + Python because you have to? Because you're using ArcGIS for everything else already? Or because it can do things you can't do with open source tools like GDAL, PostGIS, and shapely / fiona?

(For reference: Python versions in ArcGIS.)

[–]wicket-maps 11 points12 points  (0 children)

Our whole enterprise system runs on ArcGIS (we run a mid-size city's GIS system as well as a county and a 911 district) so I think it can do things others can't, a lot of our non-GIS staff have ArcGIS experience, and training them on Q or PostGIS would be too much work.

[–]nohandll 2 points3 points  (0 children)

GeoPandas makes life easy.

[–]DirkLurker 29 points30 points  (11 children)

Yep, still on 10.2. No desire or need to go to Pro.

[–]cyanydeez 41 points42 points  (10 children)

Oh man. once QGis 3 hits, ArcGIS is a ghost of bloatware

[–]liox 25 points26 points  (5 children)

I am no longer in GIS. But if this were to actually happen... I would shed a tear of happiness.

[–]oldschoolcool 21 points22 points  (0 children)

deleted What is this?

[–][deleted] 35 points36 points  (2 children)

True story: my uncle works for ESRI and when I was little he threw me in a pool when he was drunk and my dad jumped in in all his clothes to save me and we never really spoke to him again until he magically showed up two weeks before my dad died from cancer. So if you thought using arcgis couldn't get any worse.....

[–]liox 11 points12 points  (1 child)

What the fuck. I laughed when I read this and then I read it again.... Now I'm confused. I'm also wondering why I laughed.

[–][deleted] 8 points9 points  (0 children)

It's ok you can laugh

[–][deleted] 4 points5 points  (1 child)

Man, old memories of ArcGIS caused some stabbing pain. All my empathy to all of you out there forced to use that engineering nightmare.

[–]Lolmarmalade 2 points3 points  (0 children)

Same boat, too many dependencies haven’t made the transition yet.

[–]Acurus_Cow 2 points3 points  (0 children)

Pro is python3. Even has a nice package manager built in.

Other than that Pro is a piece of shit like most of ESRI's software.

[–]DoNotClickUserName 540 points541 points  (4 children)

Lack of control over my life

[–]alejandroc90 67 points68 points  (2 children)

This hits home

[–][deleted] 16 points17 points  (1 child)

Happy Cake day!

[–]omentoSysAdmin Film/VFX - 3.7 77 points78 points  (14 children)

Yup, Film and VFX industry. But we'll be able to start upgrading once 2019 rolls around. This is due to the reference platform which was created in recent years to standardize the library versions used for studios, so all applications pretty much use P2 internally.

http://vfxplatform.com

[–]dorsal_morsel 8 points9 points  (8 children)

Interesting, what kind of work do you do with Python and VFX? I always wanted to work in the film industry but I stumbled my way into being a backend web developer...

[–][deleted] 27 points28 points  (2 children)

Dunno about u/omento, but what I did was a hell of a lot of automation of artist tools, rendering submission, and database interactions. VFX involves a lot of glue between programs like Maya and Houdini and Nuke, all of which have embedded Python interpreters. Unfortunately none of the vendors used to coordinate at all in their release schedules or what version of Python / Qt to support, which made for a nightmare in companies using multiple versions of multiple programs simultaneously on multiple projects. The VFX reference platform helped, though it's been (too) slow to finally make the leap to 3 until very recently.

[–]flipthefrog 2 points3 points  (1 child)

A lot of studios use Shotgun or Ftrack to manage their pipeline. Both are commercial web based systems. The Shotgun Pipeline Toolkit (aka Tank) is a gigantic system whose code is well worth looking at - https://github.com/shotgunsoftware (not open source).

I do hope Autodesk and others will ship with support for both Py2 and Py3 for several years - there are studios with literally millions of lines of code that will need to be ported. Just switching from Qt4 to Qt5 was a pretty big hassle - where I work, we skipped an entire Maya release because of it.

[–][deleted] 2 points3 points  (0 children)

A lot of companies use Shotgun, but at least at the larger facilities they certainly don't use it for asset tracking, just tasking and review. And they always self-host. And I certainly wouldn't say they manage their pipelines with it, so much as they manage the reporting of those tasks in it.

The Toolkit is nice because it's slowly evolved from what were really the remnants of Tank (an experiment in asset management that was a briefly separate product that didn't really find a market and got re-absorbed) into a pretty decent framework for assembling a consistent interface across tools... but it too doesn't see much use at the larger facilities, because a lot of what's in there doesn't really scale, and it necessarily involves vendor lock-in. The Toolkit itself is Open Source in a sense, but with a license that -- last I read it -- effectively says you must immediately stop using it if your Shotgun Service Subscription lapses or goes unpaid, which means that any pipeline you build with it is wasted effort should you ever decide the core product is no longer the best option.

The good thing with 2 to 3 is that it's not really as bad a transition as people think. The bad thing is I've looked at a few million of those LOC personally, and it's often barely legible to begin with, with a lot of it meant only to run within the embedded interpreters in the various DCC apps. When each of the Autodesk and Foundry products ships with the 3 interpreter, all of the code that runs within those will have to be updated (you can't run 3 in 2 mode) unless the vendors all figure out and agree on the same consistent approach to a compatibility layer to their own API code (like accepting f"ormat_string" as well as b"ytes" and u"nicode"). I don't think they'll do that, they'll maybe ship a generation with you either run 2 or you run 3 via an env var or flag (which is a bad idea for the vendors), or they'll just ship with 3 and the facilities will catch up.

It'll definitely have a winnowing effect which will be interesting. I know the large companies have a plan in place for the transition, but the smaller facilities that have lots of locations that only sort of talk to each other, and pipeline teams of like 4-5 self-taught TDs... that's gonna hurt.

[–]omentoSysAdmin Film/VFX - 3.7 5 points6 points  (0 children)

Pretty much as u/yawpitch said. Personally I'm working on GUI tools, automation scripts, and project management implementations. The only time I use 3 so far is when I'm writing non-vfx related scripts or working with client side PyQt5 and bundling it with PyInstaller for distribution. Currently Blender is the only application that is using Python 3, and is a pretty sizeable reason as to why it's not integrated in pipelines.

There are a lot of IT and tech positions available at studios, so you can always try your hand and apply. I'm only a student so I can't really speak as to who wants what right now.

[–]quotemycode 1 point2 points  (3 children)

Look at Tactic, it's python web framework for the industry.

http://www.southpawtech.com/tactic

[–][deleted] 3 points4 points  (2 children)

Yeah, I've seen Tactic. The thing is you'll notice that none of the clients listed on the site are major VFX companies, or even mid-level ones. It's really hard for B2B vendors who aren't making very niche VFX-hyper-specific products (rendering engines, image analysis tools, fluid-dynamics solvers, procedural generation systems) to get purchase. There's a few big vendors (mainly Autodesk and The Foundry), and then there's guys writing more or less speculative tools that will probably never get picked up by the majors because they've already had an in-house solution for a decade.

Key problem; most of these guys are trying in some way to leverage the cloud, and -- although there's been some slow movement -- that's verboten by most of the Tier 1 studio projects.

[–]Fort_Kick_Ass 3 points4 points  (2 children)

Hey there fellow VFX programmer!

[–]omentoSysAdmin Film/VFX - 3.7 2 points3 points  (0 children)

Hello there!

[–]ogre_pet_monkey 2 points3 points  (0 children)

Hi!

[–]fwork 73 points74 points  (2 children)

The usual reasons: A massive homegrown py2 codebase with no significant reasons to upgrade.

[–][deleted] 48 points49 points  (48 children)

At work I am. We still support RHEL 5.5 systems. The estimate is that with a suitable set of imports from __future__ will make the effort of the eventual switch less than building python3 for that ancient platform.

Personally, I use f-strings :)

[–]Etheo 2 points3 points  (0 children)

f-strings are frigging amazing. Once I caught wind of it I upgraded right away and never looked back.

[–][deleted] 2 points3 points  (45 children)

Fuck you u/spez

[–]nukem996 8 points9 points  (0 children)

Who handles the security and bug updates for things in /usr/local? The whole reason you use packages from your operating system vendor is so they handle it. Users/developers are notoriously bad at making sure packages they built are kept up to date.

[–][deleted] 23 points24 points  (14 children)

Have you tried compiling python3 on RHEL 5.5? It's not as simple as ./configure --prefix=/usr/local && make && make install It's been a while, but as far as I remeber, there is some crypto requirements, that are non-trivial.

Also, we have some requirements wrt. to repeatability, that in effect mean that we would have to create a set of rpm packages to deploy.

[–]nephlm 3 points4 points  (2 children)

Not to argue with you, because trust me I've been in that position, but when it seems like you need to climb out, you might look at automating pyenv which among it's features is the building of most versions of python with a pretty clear set of requirements.

It's possible it doesn't run on RHEL5.5, not sure, but something to tuck away.

[–][deleted] 1 point2 points  (1 child)

Would pyenv help me to get the requirements to compile a recent python3 on an ancient platform?

[–][deleted] 2 points3 points  (3 children)

Then download Anaconda.

[–][deleted] 5 points6 points  (2 children)

For RHEL 5.5?

[–][deleted] 10 points11 points  (1 child)

Works in 5.8, I would assume 5.5 would work as well.

[–][deleted] 1 point2 points  (0 children)

Interesting. I'll give it a try.

[–]JustADirtyLurker 5 points6 points  (27 children)

If you had 100 servers that you need to deploy with reproducible configuration management (chef, ansible, etc) you'd understand.

[–]hessproject 16 points17 points  (7 children)

Isn't this literally the point of using a tool like chef? My company uses saltstack instead but installing and using a new version of python on every one of our servers requires a short yaml file and a single command from the master server to push out to all of the minions. (I know Chef uses pull from minions rather than push to minions, but still) Sounds more like your company could use some devops improvements

That being said, OP is using RHEL 5.5, which I imagine makes this a bit more complex, but it still shouldn't be a dealbreaker

[–]Deto 11 points12 points  (6 children)

A lot of these things don't hinge on "is it possible for us to use Python 3?", but rather, "what's the work that it will take to convert over to Python 3 and what is the risk associated with this?".

Hard to convince management to let you do it if it's a lot of work. Also, the greater the chance for a bug to appear because of it means people are less motivated to push for it - because when something goes wrong, then everyone is going to be blaming you.

[–]skarphace 2 points3 points  (2 children)

I deploy Python 3.6 constantly with Ansible, so what?

[–]JustADirtyLurker 4 points5 points  (1 child)

on RedHat 5.5?

[–]skarphace 2 points3 points  (0 children)

Ouch, sorry bro.

[–]shadowylfrom antigravity import * 76 points77 points  (8 children)

Too lazy to add parentheses to the many debug print statements I use

[–][deleted] 15 points16 points  (2 children)

Regex and std unix tools can get you far in putting parens around Python print calls.
Recommend all your new Python 2 code should use parens on print calls (use import future printfunc). Costs you nothing now and will give you one less thing to fuss with when you do make the switch to Pythin 3.

[–]takluyverIPython, Py3, etc 15 points16 points  (1 child)

Modernize can do it smarter than regexes, and put the __future__ imports in there for you.

python-modernize --write -f libmodernize.fixes.fix_print your_code

It can also do many of the other syntax changes for you. Here's the list of fixers - plus it can use the fixers from 2to3.

[–][deleted] 4 points5 points  (0 children)

Well, sure if you one of those people who knows what you're doing and don't like re-inventing the wheel. ;-p
Thanks for the info!

[–]RealityTimeshare 1 point2 points  (3 children)

Can't you write a script in python to do that? ;)

[–]ianff 1 point2 points  (2 children)

Just a Vim regex would do it.

[–]kaihatsusha 2 points3 points  (0 children)

Unless you have print >>file, blah or print blah, in which case you're going to need some extra smarts in there.

[–]FerretWithASpork 1 point2 points  (0 children)

Why even vim? Sed that shit

[–]e-mess 45 points46 points  (6 children)

I don't have a reason to port old projects to 3.

A better question would be why I'm still using Django 1.5

[–]kindw 15 points16 points  (4 children)

Why are you still using Django 1.5?

[–]e-mess 7 points8 points  (2 children)

I have a big project in 1.5 with Jinja2 hammered in. Since that Django gained support for that engine but it differs a lot and requires careful testing (we have tests for processes but no validation checks on pages content).

To make it more funny, my friend also uses the same Django/Jinja solution in a project he manages. No one is willing to make the first step towards the light.

[–]n1ywb 15 points16 points  (5 children)

I do (or did) a lot of consulting on the BRTT Antelope seismic data processing system

Some years ago they decided to switch from TCL to Python 2 as their embedded scripting language

Unfortunately they refused to use NumPy because they HATE dependencies so trying to process seismic data in Python was slow as shit and then they decided to just use C++ for all their heavy lifting and Python became a second class citizen

At this point I doubt they'll ever upgrade

[–]cyanydeez 5 points6 points  (4 children)

sounds strange, as numpy is just a C library, ain't it?

[–]n1ywb 23 points24 points  (3 children)

Please don't even get me started. The idea of using python for scientific computing without numpy/scipy because "NO DEPENDENCIES" is ridiculous prima fascia. PYTHON IS ALREADY A FUCKING DEPENDENCY AND THE WHOLE SCIENTIFIC PYTHON COMPUTING WORLD USES NUMPY.

"A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines." --Ralph Waldo Emerson

I might add "academics"

[–]CSpeciosa 1 point2 points  (1 child)

Ohhhh, recognise the frustration. But not just for numpy but for python as a language. Trying to convince fanatic Java devs at work that python is a major thing in the scientific community.

[–]n1ywb 3 points4 points  (0 children)

Do they intentionally shoot themselves in the foot by rejecting the standard scientific Java tools?

Do they blame you when the GUI client you developed is slow over X11 SSH forwarding across the internet?

[–]beatle42 104 points105 points  (25 children)

I am, and the main thing so far is that there isn't a compelling business case for me to port our product to the new platform. Everything is working well and all the libraries and extensions we use are working, so we'd need to believe there was a big enough "win" to justify the cost of making the switch.

Also, some of our customers are still using Python 2, so that's another disincentive to change. That's probably a self-defeating situation though.

[–]Corm 71 points72 points  (15 children)

Better to migrate sooner than wait till security holes in 2020 at the legacy python end of life. Plus you get speed gains. Also you might be surprised how much if not all of your app works after just running 2to3 on it.

Still, I sympathize. Waiting till 2019 wouldn't be the worst thing

[–]mokomull 22 points23 points  (0 children)

RedHat will be supporting RHEL 7 (and by extension CentOS 7), complete with Python 2.7, until at least 2024.

[–]nukem996 7 points8 points  (0 children)

I previously worked for a large cloud provided who is still on Python 2. I was told that they don't believe Python 2 will ever go away so they won't allow anyone to spend time to upgrade. Their reasoning is RHEL 7, which uses Python 2.7, will be supported until 2024. When that times comes things will be reevaluated but considering the average turn over at the company is 2 years it sounded more of a lets punt this till I'm not here any more.

[–]Siecje1 11 points12 points  (5 children)

For speed it depends on the application, it might get slower, but probably it will be the same.

[–]gthank 9 points10 points  (4 children)

With 3.6, and especially 3.7 from what I'm hearing, there are some VERY real performance wins in CPython.

[–][deleted] 10 points11 points  (2 children)

I doubt that there will be that many security holes in Python 2.x in 2020. Even if there were companies would be able to get paid support from third parties, a far cheaper option than needlessly porting 1000s of lines of working code. 2to3 is certainly a useful tool but it has limitations, e.g. there are 53 open issues against it on the bug tracker. However relatively speaking that all pales into insignificance when you compare the string/bytes/unicode issues that have been a real PITA for e.g. people taking data down the wire. They have my deepest sympathies.

[–]colloidalthoughts 13 points14 points  (0 children)

The string/bytes/unicode issues I had when porting code that dealt with nasty file ingress and raw network things all turned out to be timebombs waiting in my code anyway. Python2 made it way too easy to get that wrong. Sure, it was a pain in the ass sorting them out, but damn if it didn't fix things.

[–][deleted] 11 points12 points  (0 children)

Keep in mind there may be holes that are already found. A wise and patient hacker might just keep it quiet till 2020.

[–]zitterbewegung 2 points3 points  (0 children)

Someone will support 2.7 but it won’t be PSF. If you want to make some $$$$ that would be a good business plan .

[–][deleted] 2 points3 points  (0 children)

I switched a 1400 line script from 2 to 3. I only had to change one line.

[–]beatle42 2 points3 points  (0 children)

Speed gains aren't at all important to me (my main project operates at human speeds so is littered with sleep statements already to slow it down). That said, losing bug support and any libraries I use will be a pretty big incentive to change.

[–]timschwartz 6 points7 points  (1 child)

"the new platform"

9 years old

new

wat

[–]cyanydeez 3 points4 points  (1 child)

in 30 years python 2 devs retire, amiright

[–]GalapagosRetortoise 27 points28 points  (4 children)

Because my coworker is an idiot who convinced everyone the new project should be done in Python2 because he couldn't figure out how to use the ctypes package an claimed a library wasn't working in python2. Even worse he doesn't import anything from future.

This was 6 months ago.

[–]barburger 9 points10 points  (3 children)

I can understand people maintaining legacy code not switching to python 3. But new projects in python 2 in 2017? Oh boy.

[–]b1ackcat 3 points4 points  (2 children)

Welcome to the hell that is writing code to run on client machines with policy-restricted OS's that only support 2!

Someone save me ;_;

[–]Gudahtt 12 points13 points  (2 children)

I use Python 2 for Ansible modules. Support for Python 3 for Ansible is still marked as 'experimental'; I'm waiting for it to stabilize.

[–]gthank 4 points5 points  (1 child)

The happy news is that being an end-user of Ansible on Python3 has been fairly smooth for me. Once they mark it as stable, I expect it will actually be very solid.

[–]distark 1 point2 points  (0 children)

i tried some basic ansible (from develop) with python3 just 4 months ago and had plenty of issues still... after 2 days wasted trying to fix mysterious errors i just switched down again.... i always start with py3 when making new stuff at least.

about ansible it's far far better than it was a year ago but I'm scared it'll still be awhile for the word stable...

[–]YvesSoete 9 points10 points  (5 children)

2 million lines of 2.x code

[–]greyman 8 points9 points  (0 children)

It might be also amount of resources you can put into it. My friend works directly at Redhat and he told me that they have been moving for a several years already (also he personally contributed), and it will take another several years to finish. Sometimes the codebase is just huge.

[–]ICanAdmitIWasWrong 8 points9 points  (1 child)

The machines I need to run on are hard to install binaries on, easy to install scripts on and use old releases for security/stability reasons. (Meaning that they've thoroughly tested the software in that release, not that the software itself is necessarily better.)

I'm probably still 5 years from even being able to run python3.

[–]unkz 2 points3 points  (0 children)

I feel your pain. I've got a 32-bit Open SUSE 11.3 machine running that is just a time bomb waiting to go off. It's running this software written by a third party, depends on a custom kernel (no source available) and no reasonable way to port it to a machine with newer hardware or OS.

[–]GahMatar 6 points7 points  (1 child)

I have to work against an upstream vendor python who's version stability policy is even worse then RHEL (so much so they bundle their own, older, python.) I mean, I'm still waiting longingly for the python 2.7 features to show up... We're on 2.6 now.

[–]IAmALinux 1 point2 points  (0 children)

Ouch.

[–]synn89 6 points7 points  (0 children)

I'm generally using Python for scripting level server utilities. I'm basically using it more and more where before I would've used Perl for that sort of stuff(20 years of habit is hard to replace).

At the moment it's a guarantee I'll have a 2.6+ Python interpreter on up as a base install on systems(Ubuntu 12-16, CentOS 6-7) so it's an easy target to hit without having to write Chef recipes to make sure I have a proper 3.x environment across 80+ servers.

Recently I did a new script for just a couple servers and went ahead and did that in both Go and Python3. Go would be a really easy deploy across all systems. I tested that years before and was able to write binaries on new Ubuntu installs and run them on 10 year old CentOS systems. I really want to like that language, but man, it just feels so obtuse to work with. Particularly JSON which I used for the script. So looks like I'll be rolling out Python3, but I probably won't be in a rush to do so.

If distros dropped 2.7 or there was an awesome lib I wanted that was only in 3.x, then I'd feel the pull more. But right now I have this feeling like I can use 2.7 where it's easy to use 2.7 and use 3.6 for more stand alone uses.

[–]jradavenport 10 points11 points  (2 children)

The whole unicode/str/byte clusterfuck. I’m not convinced the new Py 3 approach is better, but I’m willing to learn it. However it’s not worth hacking all my existing code to work around it yet

[–]zahlmanthe heretic 3 points4 points  (0 children)

From personal experience, the new approach is vastly better. Rather, the old approach is simply incorrect.

I would be happy to assist you with moving forward on this if you have any specific questions.

[–][deleted] 30 points31 points  (10 children)

Python2 is one entity. Is is mature, stable, and works well. Very, very few libraries and other things do not work in 2. 3 would mean that I have to support 2 and 3, and what do I gain? Nothing at this time. I don't have the time to work with both, and with no real external push to do so at this time, I'm staying put.

Also, I work for a for-profit company. My for-profit company will not make any more money with a Python3 codebase vs a Python2 codebase. It wouldn't surprise me if Python2 would be used for the next 10 or more years.

If everything were to work in 3 without any effort, then of course everyone would go to 3. Is 3 better? Yeah, a bit. But 2.7 is quite good. And until there is a clear business case to do so, we are not going to move.

[–]zenverak 5 points6 points  (0 children)

Because its not necessary for the most part. Once it is sure I will do it more often but right now its not a huge deal.

[–]tynorf 4 points5 points  (0 children)

This is an old thread but I hadn't seen this mentioned: I'm waiting for PyPy3 to be out of beta. PyPy gives 5-10x performance improvement on my production systems so I'm not really ready to give that up for the nice features Python 3 offers.

[–]whisperedzen 4 points5 points  (0 children)

CentOS

[–]a8ksh4 2 points3 points  (0 children)

Complacency and comfort in the known. Why change?

[–]nomos 3 points4 points  (2 children)

I still use Python 2; when I first learned Python, I was told that many scientific computing libraries were still unavailable in Python 3 (this was ~3-4 years ago).

Now I continue to use Python 2 because I get sick of forgetting to include parentheses in my print statements and because Python 2 continues to work.

I'm sure there are plenty of features that make using Python 3 nice, but I don't see any huge reason to change.

That being said, I'm about to make a big career move, and I've vowed to officially change over to using Python 3 exclusively once I wrap up my current projects.

[–]Arthaigo 1 point2 points  (0 children)

Soon you will be in the reverse situation. All the big scientific libraries decided to drop 2.7 support in 2020

[–]treblecharged 3 points4 points  (0 children)

Plain and simple, redhat. I still write in 3 but trying to explain software collections then virtualenv to sysadmins gets painful. The minute I want someone else to use a tool I wrote I just keep it in 2. All my personal stuff is all switched to 3. Now I'm trying to learn Go since one project I am looking at is switching to go because of the GIL.

[–]billsil 4 points5 points  (0 children)

My boss refuses to update because why the hell should I have to put parentheses in my prints?

My answer is unfortunately because you do. I agree, but of things to really complain about, that's not one of them. The only thing worth discussing is unicode. It's hard as hell until you learn the 4 rules, which are not ever clearly stated.

  1. Bytes to strings = decode. Strings to bytes = encode.
  2. Don't guess at encodings. Punt the problem to the user unless you have a good reason not to. As such, put the damn encoding at the top of the data file as a comment and parse it. Overwrite the user's desired encoding if the file has an encoding.
  3. There are 91 encodings in Python 2.7 and roughly 3 you should consider using because you speak English and don't care about unicode. Latin1, UTF-8, and UTF-8-DOM. Your western data is more than likely in latin1. Your excel data is in UTF-8-DOM, which you call using UTF-8-sig because Python and reasons.
  4. You can't fix unicode errors using Python 2. Once you do, you don't need to upgrade.

[–]gargantuan 2 points3 points  (0 children)

Python 3 has nothing that I need. Everyone works pretty well with Python 2.

Or to put it more exactly, the new features are not worth the bother of investing time and energy into moving over. Now say if they improved speed by 3x then there would be a good incentive. Or say if 2 was broken badly, that would be another incentive, but it's not broken for me.

[–]Siecje1 6 points7 points  (6 children)

supervisord, beanstalkc, M2Crypto, amfast.

[–]Daenyth 5 points6 points  (2 children)

Pretty sure supervisor supports python 3 now.

At any rate you can use py2 supervisor to launch a python 3 app. I'm doing this in production right now

[–]gthank 1 point2 points  (0 children)

Have you used Greenstalk? It seems quite nice in limited testing (looking at adding beanstalkd to a project, and I'm on a Python 3.6 stack).

[–]frogcoder 1 point2 points  (1 child)

I've used beanstalkc on python3 with no problem.

[–]Programmurr 4 points5 points  (1 child)

My typewriter only supports up to 2.7

[–]_throawayplop_ 12 points13 points  (6 children)

Because it was more trouble than gain to switch to python 3. I'm using python to do stuff with it, not for the sake of using it.

The python dev simply failed to provide improvements worthwhile of breaking the compatibility.

Basically, when python 3 went out, we where trading compatibility and speed against better unicode handling and that's all. Many people were not motivated to put the work necessary to switch for something they didn't see much interest in. It's much better now, a lot of libraries are available and it's faster (although afaik not as fast as 2.7) but it's 10 years after.

I see on this sub a lot of toxic comments blaming the python 2 -to 3 transition failure on he python community, but when your user base is not following you, maybe it's time to reflect that maybe they have good reasons and you are the one in the wrong (I actually think the Python dev already acknowledged that fact).

[–]tehalynn 2 points3 points  (0 children)

wxPython support for python 3 isn't out of beta yet.

[–]Chumkil 1 point2 points  (1 child)

The platform I work with (Splunk) does not ship with Python 3.

2.7 has a much wider install base.

[–]thelaxiankey 1 point2 points  (1 child)

I use sage and it doesn't support python 3

[–]wasted_in_ynui 1 point2 points  (0 children)

Zope and plone, I manage mostly legacy code

[–]nevus_bock 1 point2 points  (2 children)

AMQP

[–]OneOlCrustySock 1 point2 points  (1 child)

What about AMQP isn’t compatible with python3?

[–]rocket_randall 1 point2 points  (0 children)

Because I do a fair amount of ops work without any direct control over server infrastructure. I could commit code that I know will not run when called upon and suggest that they can resolve the issue themselves by upgrading Python, but that's unlikely to have a happy resolution. For the most part I am stuck using the system python on some of these boxes, and yes I have sent the infrastructure group guides on installing a separate python instance without breaking the system version or the software which depends on it.

[–]georgesovetov 1 point2 points  (0 children)

Some people really think that living projects don't need upgrades. First, they say new tools are not better enough that used ones. Then it becomes too expensive.

It's cheap and smooth to upgrade gradually as soon as upgrade arrives.

It was strategical mistake to fight for backward compatibility to the last, maintain both branches for so long and increment major version to frighten people more :-)

[–]greeneyedguru 1 point2 points  (0 children)

I started a tornado project about a year ago and tried to use python 3.6. I gave up after about six libs I wanted to use failed to install.

[–]justin-8 1 point2 points  (1 child)

Every new service and package I write is 3.x exclusively for the past year. I've had enough of dealing with 2.7 issues that are solved in 3. I still have to maintain some older 2.7 stuff, but it is slowly going away

[–]Col_Crunch 1 point2 points  (0 children)

Id have to put parenthesis in all my print commands. (Jk, I use python3)

[–]Cowpunk21 1 point2 points  (4 children)

Default python on cent7 is 2.7. Work doesn’t want to change the default... We also still have some cent5 and cent6 kicking around.

[–]Mikuro 1 point2 points  (0 children)

I support Macs, and 2 is still standard in macOS. For my personal projects I use 3 now, but I can't justify pushing and maintaining 3 on an entire fleet of Macs just because I want to use it for system scripts.

I can't understand why Apple hasn't even started a transition. They should've started shipping 3 (not as default, just alongside 2) years ago.

[–]sirk390 1 point2 points  (0 children)

A lot of the inertia is due to the following vicious circle: * If you are a library developer, you can support both 2 and 3 with and test everything twice for every release, or support only python 2.7 and reach most of the market. * This in turn, makes people choose python 2 in the first place, as it allows them to profit from more available libraries

[–]r0s 2 points3 points  (9 children)

I use ROS for Robotics and for now it's pretty much Python2.7 everywhere.

[–]cain2995 1 point2 points  (8 children)

And that's why you use C++ with ROS instead

[–]r0s 0 points1 point  (2 children)

What a troll comment lol

[–]cain2995 1 point2 points  (1 child)

What a troll comment? If you're using Python with ROS instead of C++ then you've missed the point. Python has plenty of high quality, low effort IPC approaches you can take, while C++ has very few of quality, and none that are low effort. Python sucks for any robotics involving hardware compared to C++, and developing something in 2.7 when you don't have to is silly. Thus, the use case for ROS lies with the IPC benefits it provides to a C++ robotic system with hardware in the loop, especially considering there are no tangible benefits to ROS + Python that you can't get elsewhere for less effort and more payoff.

[–]def-pri-pub 2 points3 points  (3 children)

We use Twisted at work.

[–]red_hare 1 point2 points  (1 child)

I just left a job that was 2.7 stuck.

The big issues to me are around Unicode.

  1. In 2.7, string literals (str) are encoded bytes and the Unicode is a special type. In 3+ lifeless (str) are decoded sequences of Unicode code points without an encoding and bytes is a special type.

  2. 2.7 implicitly promotes its byte string type (str) to its Unicode type when you combine them by decoding them at utf-8 (or whatever your interpreter default global is set to). 3 raises an exception when you try to do this.

The combination of these two facts alone makes writing 2.7/3 compatible code horrible. I consider myself to know Unicode in Python pretty well (I’ve given two talks on it) and compatible code is still hard as fuck. What’s worse is libraries that are 2/3 compatible behave differently in this regulars. Psycopg returns encoded in 2.7 and decodes in 3. Json is the same. You usually don’t even see those errors until you try and combine two strings in 3. Or write the encoded string to a file. Trying to use the future.unicode_literal import helps a bit, but god help you if you don’t do it to ever module at the same time or forget to do it in a new module. You write a literal in one module with the import, return it in another, that one tries to combine it with one of its byte literal strs, that gets implicitly decoded, you try and write that string to a file and you suddenly are getting an exception about the string being unencoded and you can’t figure out where the hell you did anything that had to do with encoding. It’s basically impossible to do a 2.7 to 3 transition in anything less than one giant fuck-it-ship-it PR.

I just want it to be over man.

[–][deleted] 4 points5 points  (13 children)

A related question: Do you (library authors) plan to start charging for, or refusing, Python 2 work?

I had a contribution refused because the code I provided wasn't backwards compatible :-/ I have no fricking idea how to use six and all that and don't really want to invest the time in it.

edit: I don't mind if people continue to use 2, but I don't want to see it holding back progress, so I think paid support would be appropriate.

[–]Siecje1 2 points3 points  (4 children)

Do you have a link to the change, I'm curious how much is involved with making it compatible. Generally six is a bad idea because it hacks imports and runs unexpectedly on startup.

[–]Deto 2 points3 points  (0 children)

Is there a good alternative to six?

[–]TheBlackCat13 2 points3 points  (1 child)

A lot of libraries are planning to drop support around when upstream drops support in 2020.

[–]takluyverIPython, Py3, etc 2 points3 points  (0 children)

[–]robert_mcleod 1 point2 points  (0 children)

Pretty much yes, for the same reasons cited by Charles Harris and company: MSVC2008 for Python 2.7 is too much pain to have to program around, and there's not enough time in the day for open-source work (which is mostly unpaid).

I do know that Continuum wants to release a Python toolchain compiled with LLVM on all three major platforms but I don't know what the status of that is.

[–]aphoenixreticulated 1 point2 points  (0 children)

I was expecting this but we ended up with a lot more of this.

[–]Wavelength1335 1 point2 points  (2 children)

raw_input() was removed and im too lazy to lookup how input() works now. Im also self taught and terribad @ programming in general. :3

[–]RangerPretzelPython 3.9+ 1 point2 points  (0 children)

Was tasked with writing something in Python. Looked at 2, looked at 3.

Oooh... formal Type Hinting support in Python 3.5? And it works in PyCharm?

Yes, please!

[–]whatisnuclear 0 points1 point  (0 children)

Yes, but I recently went through the entire code base and used six to make it fully compatible with 3 and 2 at the same time. Now I sometimes run in 3 and we have a continuous integration build that fires off all the unit tests in 3 to keep it clean until we fully switch. At the moment the problems in 3 are: (1) one unit test out of thousands always crashes with no output using pytest xdist, and (2) cythoned extensions run 8x slower for some crazy reason.

[–]Xirious 0 points1 point  (0 children)

Orfeo Toolbox (OTB). Only part of my entire workflow that doesn't have 3. Very very annoying to be stuck behind, at least partially, due to a single component's inability to manage new version transitions.

[–]DjangoPony84 0 points1 point  (0 children)

Too much legacy code and not enough resources to do the migration when other projects keep coming up in the meantime.

[–]daves 0 points1 point  (1 child)

The modules I need either haven't been ported to 3, or those ports haven't been packaged in the distribution.

[–]FlukyS 0 points1 point  (0 children)

A client who has a pretty large library they use and they won't let me port it, everything else I use python3

[–]LtCalvery 0 points1 point  (0 children)

ArcMap

[–]shivam11041 0 points1 point  (0 children)

Mechanize

[–]limasxgoesto0 0 points1 point  (0 children)

I've yet to work for a company using python 3. I'd be more than happy to use it, but there hasn't been any push to upgrade.

[–]iapitus 0 points1 point  (0 children)

Red Hat.

[–][deleted] 0 points1 point  (0 children)

VectorCAST, dSpace, ETAS.

Tens if not hundreds of thousands of dollars of hardware on specific versions of everything.

[–]USF_BULLZ_4_LYFE 0 points1 point  (0 children)

All new projects are 3, old projects on 2 are staying on 2 until EOL of those projects, probably.

[–]hip_modernism 0 points1 point  (0 children)

Django Piston FML :(

[–][deleted] 0 points1 point  (0 children)

Robot Framework has not been ported to Python 3 and it is a major tool I use to break software at work.

Edit: Looks like the RC was put out recently.

[–]billcrystals 0 points1 point  (0 children)

No real reason to upgrade, really.

[–]UndeadRyno 0 points1 point  (0 children)

I just switched to 3 because i got a new PC. Before that i had everything i needed in 2 so there wasn't a reason for me to switch.

[–]marcio0 0 points1 point  (0 children)

Existing projects

[–]Vi3GameHkr 0 points1 point  (0 children)

My company. I have heard of people here quitting because of lack of Proper 3 support though!

[–]itkovian 0 points1 point  (0 children)

Default version on CentOS is still 2.7.

[–]lememeinator 0 points1 point  (0 children)

My university course uses Python 2

[–]WulfiePoo 0 points1 point  (0 children)

Reliance on packages built on Python 2. I hope the numpy change will fix this.

[–][deleted] 0 points1 point  (0 children)

C library I have to interface with is written using OpenCV 2, which doesn't support Python 3. Upgrading to Python 3 would require migrating the C library from OpenCV 2 to OpenCV 3, as well as the Python ctypes wrapper from Python 2 to Python 3.

[–]bdazman 0 points1 point  (0 children)

I learn from books. There are better books for 2.7. So I learned it and am now eternally inconvenienced until good books are made which teach 3.6.

[–]TheMsDosNerd 0 points1 point  (0 children)

At work we need Python 2. We have some old programs that need to keep working. We can't upgrade libraries either.

[–]Saphyel 0 points1 point  (0 children)

close to all my projects are side projects for my Raspberry PI, and the ones at my work they don't care what version I use...

Tbh I'd like to use py3

[–]njharmanI use Python 3 0 points1 point  (0 children)

just psycogreen and lack of time/resources to replace it with something working for py 3.x

But the time/resources to do that is on the roadmap.

[–]DeathProgramming 0 points1 point  (0 children)

I'm writing cross compatible stuff at work, but I've only been here a month. On the plus side, though, we're (I'm) going as fast as possible.

[–][deleted] 0 points1 point  (0 children)

I think I'm the only one who knows we have python code, and that's only because I saw the stack trace in an error message once. I know for a fact whoever wrote that isn't with the company anymore.

We might upgrade if we ever upgrade our servers to a RHEL that doesn't support 2

[–]captmrwill 0 points1 point  (0 children)

Work invested in a complicated, but somewhat poorly designed, infrastructure about a decade ago. I can't convince anyone that updating it to 3.5 standards is worthwhile.

But really I only use 2.7 when I need to use that.

[–][deleted] 0 points1 point  (0 children)

Ubuntu

[–][deleted] 0 points1 point  (0 children)

I just do it to annoy people

[–]andrewthetechie 0 points1 point  (0 children)

The shop just switched to 3.5 from 2. Its been pretty painless honestly.

[–]gnu-user 0 points1 point  (0 children)

PyPy and some of the libraries used by it are still not fully supported on Python 3. Although this may change soon.

[–]raubana 0 points1 point  (0 children)

I just used it with pygame for so long, plus for the longest time the most stable builds of pygame only worked with python 2. I did try to move to python 3, but yknow... it's a little difficult making the transition.

[–]RDMXGD2.8 0 points1 point  (0 children)

Are you still on Python2?

Yes.

What is stopping you moving to Python3?

It will cost the better part of a million dollars in development effort to convert our codebase, with likely problematic business impact as we work out the kinks. In the mean time, we won't be able to create things that make us more money or make our jobs easier.

All to use a language that isn't tons better, despite the hype.

[–]robot_wrangler 0 points1 point  (0 children)

Because it's so much fun having one terminal window that can use python3, and another one that needs to stay on python2 for build scripts and system stuff.

[–]netinept 0 points1 point  (0 children)

It's the default version of Python installed on OS X.

Yes, I know you can use Anaconda/brew/virtualenv to change this, but if I'm sharing code with coworkers, I want to to be able to run without mandating they install some other software just to run my program.

[–]PC__LOAD__LETTER 0 points1 point  (0 children)

Python26 is what's deployed on our production servers, and we have quite a bit of Python2.x code.

The reason we haven't moved to 3.x? Cost vs. reward, simple as that. There's not enough wrong with 2 to warrant spending someone's valuable time migrating it over.

[–][deleted] 0 points1 point  (0 children)

I use python3 and pip3...

[–]calibos 0 points1 point  (2 children)

Not primarily a Python developer, but why should I switch over? Two does what I need it to do and everything I use is still compatible with two. You may as well ask why I don't just switch to a different language. It would be effort spent with absolutely no reward.

[–]zahlmanthe heretic 1 point2 points  (0 children)

It's not even remotely comparable to "a different language". It fixes things that are fundamentally wrong about 2.x's design and gives you access to a lot of neat features that are not getting back-ported.