back to article A spot of Python in your Azure automation? Step right this way, sir

Microsoft this week announced something that may have surprised a few devs who'd seen it lurking in Azure for a while – Python 2 support has finally moved out of preview for Azure runbooks. A runbook is a sequence of operations to automate a routine job. Examples would be managing resources or restarting VMs. Some can be …

  1. Anonymous Coward
    Anonymous Coward

    Python 2 support

    Typical Microsoft. Python 2 is already end-of-life; there will be no maintenance beyond the end of next year.

    https://pythonclock.org/

    1. Gene Cash Silver badge

      Re: Python 2 support

      I grudgingly moved to Python 3 at the beginning of the year, and it really is a major improvement. print as a function still kicks my ass though.

      1. JLV

        Re: Python 2 support

        Yes. I'm still on 2, but did a lot of prelim porting work to go to 3 (which went surprisingly smoothly).

        I have some heavily optimized code that joins large data sets from different sources. It's only about 250 lines of code and I've tried hard to wring any performance I could out of it. 3.6 surprised me by cutting Python2.7's time pretty much in half. Supposedly 3.7 would be even better.

        MS is nice to support Python, but doing 2-only is an odd choice. Maybe they rely on Fabric, whose main implementation is also currently 2-only?

        1. Charlie Clark Silver badge

          Re: Python 2 support

          MS is nice to support Python, but doing 2-only is an odd choice

          You'd think so but I think Python 2 is still standard for lots of the infrastructure stuff (openstack, et al.) Probbably won't make a lot of difference when Python 2 is no longer officially supported for this kind of stuff.

          It's only about 250 lines of code and I've tried hard to wring any performance I could out of it. 3.6 surprised me by cutting Python2.7's time pretty much in half.

          That does surprise me because 3.6 isn't noticeably faster as far as I can tell, unless you can take advantage of asyncio. 3.7 has faster dictionaries.

          1. JLV

            Re: Python 2 support

            it relies very heavily on multi-field attrgetter/itemgetter from the operator module. Could be that was optimized.

            besides async, 3.7 has cut function call overhead by 20% supposedly

            FWIW 3.x has been outperfoming 2.7 for a while (3.5+ ?) in many use cases.

            https://speed.python.org/comparison/

      2. Nolveys
        Windows

        Re: Python 2 support

        print as a function still kicks my ass though.

        I'm still on 2, but I have finally kicked my parentheses-less print habit.

      3. Charlie Clark Silver badge

        Re: Python 2 support

        It's taken a long time for Python 3 to provide reasons to switch but 3.7 finally includes speed improvements on top of things like asyncio.

        But, yeah, I want my print statement back, too.

      4. WeiredButWork

        Re: Python 2 support

        True! So I'm still using Python 2 ...

        1. Charlie Clark Silver badge

          Re: Python 2 support

          True! So I'm still using Python 2 ...

          Time to start planning your migration. I will be dropping support for 2.7 in future versions of my libraries and I suspect others will, too.

    2. a_yank_lurker

      Re: Python 2 support

      Surprised Slurp did not use Python 1.

  2. hmv

    Perhaps it's my overly pedantic nature (I work in IT; it's a known occupation hazard), but surely the people surprised by this would be those who _haven't_ seen it in preview?

  3. Stevie

    Bah!

    "Python 3, alas, is not supported and trying to use one of the latest and greatest functions will fail."

    Azure workflow developers also announced Algol-60 support "only a decade away".

  4. disgruntled yank

    2?

    from __future__ import print_function

    into __future__ invite Microsoft

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like