Latest / Talk Python To Me / #191: Python's journey at Microsoft
Transcript
- 0:00When you think about Microsoft, do you think about Python? Maybe not, but you probably should.
- 0:05They've been doing an incredible amount of work to improve Python for folks on Windows,
- 0:09as well as the broader community. You can, of course, look at the wild growth of Visual Studio
- 0:15Code, but did you know that five of the core developers work there and that the majority of
- 0:20Python development actually happens on Windows? Join me along with Steve Dower, a core developer
- 0:25working at Microsoft who published an amazing retrospective on Python at Microsoft entitled
- 0:31Python at Microsoft, Flying Under the Radar. This is Talk Python To Me, recorded December 6th, 2018.
- 0:37Welcome to Talk Python To Me, a weekly podcast on Python, the language, the library,
- 0:55the ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
- 1:00where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 1:04and follow the show on Twitter via at Talk Python. Steve, welcome back to Talk Python.
- 1:09Thanks for having me back.
- 1:10Yeah, it's great to have you back. There's so many interesting things that you're doing,
- 1:13and you've been really instrumental in pushing Python on its most popular platform, actually,
- 1:20on Windows. And I think you actually have a few interesting surprises for the listeners. So I'm
- 1:26really excited about what we're going to talk about. But let's set the stage by just talking about what
- 1:31you do day to day. You're a Python core developer, and you work at Microsoft. Take it from there.
- 1:36Yeah, so I really get two hats in most conversations. I'm either wearing my Microsoft hat or my CPython hat.
- 1:42And I feel like most times when I come and chat with you, I'm normally wearing the Microsoft hat,
- 1:47which is fun. And that's certainly the one I have on today. So for CPython, I'm one of the Windows
- 1:52experts, do a lot of the Windows support and builds and everything. At Microsoft, I'm one of the Python
- 2:00experts. And so I get to kind of roam around the company working with a lot of groups as we really
- 2:06try and ramp up on Python in a big way, getting to help out various teams, make sure they're doing
- 2:12a good job. Like, we don't have a huge base of, you know, Python culture, Python experts throughout
- 2:19the company. So there's a lot of really, really good engineers, like expert engineers in all of
- 2:24their languages. And bridging that gap between, you know, I'm an expert C# programmer, I'm an expert
- 2:30C++ programmer. And how do we make you look like an expert Python programmer is a really big part of
- 2:37what I'm doing right now. But it's a lot of fun. Yeah, I guess two things really strike me there. One is,
- 2:41you do kind of live in this middle ground where the context matters so much, right? Like when you're
- 2:47at, say, PyCon, people are like, Oh, my gosh, you're a C core developer, and you work at Microsoft.
- 2:52What's that like? Right? Whereas when you're at Microsoft, they're like, what do you mean you're
- 2:56a Python person? Why don't you do C# and C++? What's going on here? Right? So there's like this
- 3:01really big context switch, I bet. Oh, yeah, I have virtual hats that I will literally mime putting on and
- 3:07off. And I feel like I just need to get real ones. Yeah, absolutely. So there's a couple of things we're going to
- 3:12talk about. And the first one really want to dig into is Python's journey at Microsoft, because Microsoft's one of
- 3:20these companies that started out not super open in terms of its open source contributions, and its
- 3:26culture around open source, right? Famously, Balmer had not super positive things to say about Linux,
- 3:33for example. But I feel like Microsoft has really made this transformation. And you've written this
- 3:40really cool article essay, maybe on your personal journey that sort of charts some of those things
- 3:47as well. So maybe we'll start there. Yeah, it felt a bit like writing like the start of my memoirs,
- 3:53which I feel like I'm too young to start doing that. But, but no, I was I was invited. We've got
- 3:59a series of people's kind of open source journeys, open source stories coming out right now. We've already
- 4:05had one about C#, and rewriting the compiler for that one about the .NET foundation, if I'm
- 4:13recalling correctly. And yeah, now one about Python's journey. And it was, I was thrilled to get to write
- 4:19it, because it has been an exciting time. And it's taken a number of years. But it's one of those things
- 4:25where I've at least been able to observe it along the way and participate in a few places.
- 4:29Yeah, so where does this journey start? You know, traditionally, Microsoft's been a kind of,
- 4:35we're going to build it here, even if it exists, we're going to create our own version of the thing,
- 4:41right? There's famously Java and C#. In the early days, you know, C# was something or a
- 4:46reaction to Java, I think that was more of a legal issue on around Sun and Oracle than it was more
- 4:51the not invented here thing. But there has been that kind of stuff around, say, like source control and
- 4:56other things that in the early days, I feel like maybe made Python not as welcome as it could have
- 5:03been. Yeah, yeah, there's, there's certainly when a company gets to a certain size, there's always a
- 5:07lot of that going on, even within the company, like we still have teams all over the place inventing the
- 5:13same thing, not realizing that another team at the same company is doing it at the same time,
- 5:17which is really interesting. And one of the great things that I get to do, because I bounce around
- 5:22a lot of teams is actually connect some of these up and say, Hey, you know, this other team is doing the
- 5:25same thing as you. But we have, we're definitely a lot better at looking out than we used to be, because
- 5:32there was certainly a time that we'd hear about problems, or we'd recognize problems, or we'd have
- 5:36problems ourselves, and go, Well, the only people who can solve this is us. So let's build a solution. And
- 5:43that's dramatically changed. Like the first thing now is, let's look out and see how other people have
- 5:48solved it. And let's help them, you know, let's help our developers use it. Let's help developers
- 5:56outside the company be able to use it as well. And it's also just hiring. I mean, yes, people change at
- 6:02the company, people, you know, the older people leave, the younger people join. And they're coming in with a
- 6:08totally different experience these days. All the open source stuff is everywhere throughout academia,
- 6:14it's everywhere, obviously, throughout open source. And that's what people are coming into the company
- 6:17with, right? Even scientists are now, you know, doing pull requests and stuff on GitHub, right? Like,
- 6:23or writing Python code instead of MATLAB or Mathematica, like it's all aspects of academia seem to be
- 6:30embracing open source, not just the computer science side.
- 6:33Yeah, no, absolutely. And I mean, some of the biggest things that we look at and say, oh,
- 6:39this is a computer science thing were created by scientists in the first place. Like,
- 6:43Travis Oliphant is quite happy to stand up and say he's not a computer scientist. And yet,
- 6:48where did NumPy come from? Where did SciPy come from?
- 6:50Exactly. Exactly. And it's made such a massive, massive difference. Yeah. So I guess some of the
- 6:56things that I see that sort of highlight some of this contrast, and I only know from the outside,
- 7:01right? I don't bounce around inside the engineering teams there, are things like Microsoft created
- 7:06CodePlex as sort of an alternative to places like GitHub. I don't know exactly the timing of when
- 7:12GitHub came out versus CodePlex, but then eventually I decided, you know what, everybody's at GitHub.
- 7:16Let's just move things like the .NET open source projects over to GitHub properly, ASP.NET famously,
- 7:23for example. Then, well, let's just buy GitHub because that's like where the action is,
- 7:28right. And really embracing this place that is, you know, has plenty of Microsoft stuff there,
- 7:35but plenty of Python and other others as well. And, you know, there's other examples of those types of
- 7:41things where it's like, well, it started out maybe this private build your own thing, and now we're
- 7:45going to go do our, you know, another one is like the source control story, like TFS and all that,
- 7:50and now Git and GitHub and so on. So I think those are the outside changes I see.
- 7:54But, you know, on the inside, you've seen maybe, I guess one of the biggest stories is Python is
- 8:01really starting to gain true traction, right? It's like, it's starting to show up in lots of products
- 8:06and get some real legitimacy, not just the stepchild thing that we have to care for because some people
- 8:12demand it.
- 8:12Yeah, no, it absolutely is. One of the mandates that came down a little while back is that all of,
- 8:18like, one of the must support languages for APIs and, you know, anything that you might want to
- 8:24manage from outside the company, anything you might want to manage on Azure. So if you want to create
- 8:29virtual machines or create new storage accounts, be able to push, pull files from wherever, Python is
- 8:34one of the required languages. Like, you can't call your service ready until it has Python support for it,
- 8:40along with a handful of other languages. But that hitting that point was was really exciting. And also a little
- 8:47bit terrifying, because suddenly there were huge, huge code bases that were suddenly deemed not ready. And of
- 8:54course, we didn't pull anything, right? Yeah, it was it was an internal. The next thing you need to do is add your
- 9:00Python support, right? And so then all these teams with this complicated code base come to you and your couple
- 9:06colleagues and say, we need some help. Yeah. And luckily, a lot of luckily, a lot of them did. There was certainly early on a few that that
- 9:13would happily just go their own way. And, you know, we'd find out later on, this hasn't happened for a few years now. But we did
- 9:21occasionally get emails saying, Have you seen this JavaScript code that someone wrote in Python and then published and called it
- 9:26Microsoft? We're like, Well, we'll go find them. Thank you. That hasn't happened recently. But there's definitely some transition to get there. And it has reached the point, like I mentioned in that story on medium, the Azure CLI team, actually coming to us and saying, We think Python's a good choice for this. Now, for writing a command line tool, that is going to get huge. And we have to be able to manage everything.
- 9:51Yeah, that's really great. And in your story, you talk a little bit about, you know, they expected this to take a long time. And you're like, No, no, we can knock this out pretty quickly. And they're like, Uh huh, sure. Well, just give it a try. Right? Like, you want to talk about that bit?
- 10:05Yeah. Well, I mean, any, I feel like most people who've built a command line in Python using argpars, not going to be too surprised at how quickly you can get something working. But I think they were previously doing it in Node.js. And they'd started it much, much earlier on and basically ended up with their entire command line parsing library written by themselves. And so by comparison to that, being able to take something out of the standard library for a language and just use it, and be able to use it so dynamically,
- 10:33like they have thousands and thousands of commands, which Python can handle because you haven't statically declared everything like you haven't had to write them all out in full, you can loop over a list of files and read stuff out of it and build up your command line that way.
- 10:48And so it was, I mean, it was, it was an intense few days. Like, don't, don't get me wrong.
- 10:53Of course.
- 10:54But, but yeah, it, the first version came out, you can dive back into the Git history and, and see my commits. And I was basically going straight to the repo from the start. So they're all there.
- 11:05And yeah, it came out with something that had kind of a scattering of features that they said they were interested in.
- 11:11And then got to stand up and present it and hand it off, which is a really nice feeling to, to be able to give some code to a team and, and walk through it and spend an hour showing off the bits and pieces and have them say, you just saved us months of work.
- 11:26Thank you so much.
- 11:27Yeah.
- 11:28Like that, that's definitely one of the best feelings that I've had in, in what I've gotten to do with Microsoft.
- 11:32Yeah. That's a crazy, crazy experience. And I, you know, you've heard stories about Python having this effect in different ways, but that's, that's a pretty stark contrast right there. That's great.
- 11:43Is it still in the Azure CLI? Is that still in Python? Is that shipping now?
- 11:49Yeah, it's absolutely still in Python. It bears, I think there's maybe two lines of code that are still there from what I wrote because they've
- 11:56gone and, and rewritten all of it. They've actually eventually migrated off argparsebecause it turns out that when you are getting up to thousands of sub commands that has some performance problems.
- 12:07Whoever wrote that is like, Oh, what's the upper limit? Like what's the most commands you've ever seen in an app? 24. Okay. Well, this is going to be fine. Right?
- 12:16I stumbled into a conversation at a conference between two people working on other command line libraries. I forget exactly what the libraries were, but they were
- 12:26discussing how their performance was kind of falling off around the 50, 60 sub commands level. And, you know, was that okay? That's probably okay. And I'm like, Hey guys, we've, we've got a few more than that.
- 12:39But the library they, they went and turned it into, as I said, Microsoft is full of amazing software engineers. And a few of them learned Python, didn't necessarily know it to begin with and created what was eventually refactored out into this library called knack.
- 12:54That is a highly scalable command line parser. The amount of work it takes to get started is higher than argpars. But the result that you get is much, much better.
- 13:08How interesting. I'd never heard of knack actually. That's cool.
- 13:11I hadn't actually heard of it either until I was going to the team and saying, Hey, there are people who would love your command line library. Have you thought about refactoring out? And they just sent me a GitHub repo back and said, here it is.
- 13:21Oh, beautiful.
- 13:51thousands of sub commands. Wow.
- 13:53And I don't actually know that he realizes how much of an achievement he's already made to get it down that far with something so big.
- 14:03That is so cool. I mean, it's projects like that, that kind of push the boundaries and make it better for everyone. If that gets pushed back into CPython.
- 14:10I, yeah, I hope so.
- 14:11Yeah. Let's talk about the early days. I guess the very first recollection I have of Python and maybe similarly Ruby making its way around Microsoft is first. I heard of iron Ruby and then iron Python. I think that was the order they were created. And then maybe shortly after that was Python tools for visual studio. This is not VS Code that people know today, right? This is like traditional.
- 14:39So that's the original Windows only visual studio. You had these tools you could plug in for Python, right?
- 14:44Yeah. So that's basically the timeline there as well. I came in just after Python tools for visual studio was getting started. I think I was there for the 1.0 ship party. I don't remember exactly. I can probably go back and figure that out, but I was definitely there for a party, which was one of the earliest releases. But yeah, before that, there was a project to make the CLR, the common language runtime work well for dynamic languages.
- 15:10The thing that .NET runs on top of to make it work well for dynamic languages, which have, you know, a whole different style of, you know, when you, you have the code and you compile it into this intermediate language, but you still don't know what your name lookups are going to find, which we're totally used to in Python.
- 15:29But the common language runtime was not initially designed for that. And so there was this project to make a dynamic dynamic one that could handle all of that.
- 15:38And IonPython and IonRuby were kind of the test cases for let's show this working on real languages. And both of them got to very good states in terms of supporting the language at that point in time. IonPython is still going in bits and pieces. I do occasionally bump into people at quite large companies with very serious uses of it still. They're actually quite happy with it.
- 16:02That's cool. There's some interesting integration cases, right? Like you can do things like the UI framework WPF in Python on top of Iron Python, I think. And stuff like that that you just, you're like, wait, you can put these technologies together?
- 16:17Yeah. And it works fairly nicely provided you're happy to live in that 2.7 world with severely restricted library support at this point. There were a number of projects to try and bridge that gap, which have largely fallen away, unfortunately. So the alternate implementations besides CPython are a little bit weaker in terms of extra library support, which is fairly off-putting. The ecosystem is just so critical to Python.
- 16:44Yeah, without it, it's just not even hardly the same thing. As a core developer, what are your thoughts on these other runtimes, right? Like PyPy, Jython, Iron Python? Do you look at them and go, ah, the energy would be better placed just like trying to make CPython itself better or they're good experiments? What are your thoughts?
- 17:06My thoughts are very big and complicated on that. And I think we'll probably go a little bit deeper in the next topic when we get to it. But certainly there's been a huge amount of value come out of the fact that they exist and that people have worked on them and that there's been collaboration between the reference implementation, CPython, and the other implementations. Everyone has gotten better as a result of that.
- 17:30Now, whether the energy is better redirected, honestly, there's not that much energy in the other projects, which is a real shame. But it also means that redirecting it doesn't necessarily add a lot.
- 17:42And I'll point out for the dynamic language runtime, Microsoft did two proof of concepts because having Iron Ruby and Iron Python flushed out things that just having one would not. And in the same way, I think having CPython, Jython, PyPy, Iron Python flush out issues in what Python the language is that you would never find out if you only had one implementation.
- 18:05Oh, that's interesting. So, you know, if they say run the test suite, you're like, actually, this part's really vague, we don't actually know what this means. That could help make CPython better for sure, right?
- 18:14Yeah, there were a lot of language semantics that were clarified, particularly while Iron Python was growing up. PyPy has been coming up a little bit later. It has a lot more support. There's a lot more people working on it than the other projects, but they're trying a lot harder to be compatible with whatever CPython does. And so there isn't as much kind of push and pull on what does the language actually mean here as when the other languages were really going.
- 18:40Interesting.
- 18:41Interesting.
- 18:41This portion of Talk Python To Me is brought to you by Linode. Are you looking for hosting that's fast, simple, and incredibly affordable? Well, look past that bookstore and check out Linode at talkpython.fm/Linode. That's L-I-N-O-D-E. Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 19:02They have 10 data centers across the globe, so no matter where you are or where your users are, there's a data center for you. Whether you want to run a Python web app, host a private Git server, or just a file server, you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support even on holidays, and a seven-day money-back guarantee.
- 19:22Need a little help with your infrastructure? Need a little help with your infrastructure?
- 19:24They even offer professional services to help you with architecture, migrations, and more.
- 19:29Do you want a dedicated server for free for the next four months? Just visit talkpython.fm/Linode.
- 19:35Let's talk a little bit about your being a core developer and Microsoft employing you, so basically, in some sense, being a sponsor of your open source contributions in that sense.
- 19:48Maybe I'll kick it off with a joke th@brianokken over on Python Bytes showed me.
- 19:55So it was, you know, it's around Christmas time.
- 19:57So there was this cartoon, and there was like one of these Santas at the mall, right?
- 20:02And people, kids go and sit on the lap of the Santa, and the Santa asks, what do you want for Christmas?
- 20:06And the Santa says, now, what do you want for Christmas, girl?
- 20:08Come on, be realistic.
- 20:10He says, I want to know if enough donations that I can just work on my open source project.
- 20:14He goes, okay, what color do you want your dragon to be?
- 20:17But in a sense, right, like you found this place in the world where, and there's other companies as well, but where Microsoft is basically supporting your work to make CPython better, right?
- 20:30Yeah.
- 20:30And the story of that coming about is very different from what everyone gets now.
- 20:36I feel like now people just, they are going through the interview process to get a job at Microsoft and just kind of tack on, hey, you should give me, you know, one, two days a week to work on this open source project that matters.
- 20:46And we just go, okay, sure.
- 20:47Back when I did it, I spent weeks negotiating with lawyers.
- 20:52I had patent attorneys basically interviewing me to find out what I was going to do.
- 20:57Yeah.
- 20:57Would you somehow taint all of Microsoft by like interacting with open source code and you've seen some GPL and then all badness breaks loose, right?
- 21:06Yep.
- 21:06A whole lot of advice on, you know, don't have other code up on the screen while you're working on it.
- 21:11And just the, like the risk management that we were doing at the time makes total sense.
- 21:17It really does.
- 21:18And when you understand that the aim of our legal team is not to help us win the eventual court case, it's to avoid it in the first place, you can see why they're so protective.
- 21:31Because basically once any kind of IP litigation goes to court, everyone's already lost, really.
- 21:40A couple of lawyers have won, but they're not our lawyers.
- 21:42So they're not interested in it going to court.
- 21:44They, this is other people get paid for that time.
- 21:47So really it's, it's take as much care as possible so that it, whatever comes up just gets thrown out as quickly as possible.
- 21:54And so there was a lot of caution there.
- 21:57Yeah.
- 21:57But again, it's risk management.
- 21:58So those of us who were doing that kind of work at that time, and we had at like the same time I was doing that, we had MS Open Tech still, which was the totally separate company.
- 22:09That just happened to work on the same campus and some of the same buildings as Microsoft and beyond the same email network and everything.
- 22:17Who were legally allowed to do to work on these projects because there, there was some legal boundary where you couldn't sue all of Microsoft if you decided to sue them.
- 22:26So I was doing it from within the company.
- 22:28Like people like Dino Veland had already done before me and a handful of others.
- 22:34Yeah.
- 22:34I guess it's worth mentioning.
- 22:35There's more than just you as the core developer at Microsoft, right?
- 22:39There's Brett Cannon and who else?
- 22:41Barry Warsaw is at LinkedIn, but we count him because we like LinkedIn now.
- 22:44Eric Snow and Trent Nelson is starting whenever immigration gets their act together, I believe.
- 22:51Right on.
- 22:53The fun of being an Australian working at Microsoft in the US.
- 22:55Yeah.
- 22:56A lot of hoops to jump through, right?
- 22:57But yeah.
- 22:58Okay.
- 22:59So it's, it's not just you who have found this place.
- 23:01There's this group of folks inside the company.
- 23:04And again, the transition within Microsoft over the last six years has gone to the point where we aren't forcing open source contributors to sit down with lawyers to describe what they're going to do ahead of time.
- 23:16That's really nice.
- 23:17It means we have a lot more contributors to projects.
- 23:19We're able to support and help develop projects in, in ways that benefit.
- 23:25Obviously they benefit us.
- 23:26Otherwise, you know, we wouldn't get work time to do it, but they, they benefit the community as well.
- 23:32So it's, we're trying to find that balance between kind of straight up altruistic development on open source projects and being able to resolve the issues that, that people are having that are kind of specific to us.
- 23:44Yeah.
- 23:44Well, like some of this, you know, it's kind of like basic scientific research.
- 23:48Like some of this comes back to help the world in nice ways.
- 23:51Like for example, the Git stuff that you all contributed back to Git so that you can move windows to Git because kind of like command line argument thing.
- 24:00Like the number of files, like the virtual, basically virtualizing the Git file system had to be done for windows to be part of Git, right?
- 24:08Or to be on Git.
- 24:09Yeah.
- 24:10We had a number of repositories internally that were just the working directory was being counted in gigabytes of code.
- 24:17And we had one.
- 24:18So one of the repositories I worked on through the transition from TFS to get the, like one checkout.
- 24:25When I first checked out that repository, it was something like 180 gigabytes, just the working directory.
- 24:32Just the main branch.
- 24:33Just the main branch.
- 24:34And not even the history, like just the latest up to date.
- 24:37We had a whole lot of stuff checked in that didn't need to be.
- 24:39Yeah, yeah, sure.
- 24:40Some massive work went on and I think we got it down to six gig and said, that is the best we can do.
- 24:46And part of that six gig is a script that downloads the other hundred gig of tools into a different directory.
- 24:53So.
- 24:53Wow.
- 24:53That's incredible.
- 24:54Yeah.
- 24:54There's some really, really huge code bases that a lot of the big corporations have inside that simply never get heard of outside.
- 25:02Like open source community run projects are never going to consider those cases because they sound utterly ridiculous.
- 25:09And yet all of these really big companies have nothing but utterly ridiculous cases.
- 25:16Yeah.
- 25:17And they've been around for so long and so many people have worked on it.
- 25:20Yeah.
- 25:20It's, it's pretty insane.
- 25:22Just the number of developers continuously contributing to that stuff.
- 25:26So I feel like one of the big turning points in Python's journey probably hinges around Azure.
- 25:32What do you think?
- 25:33Certainly Azure has created a place for Microsoft to really care about developers in, in a way that is kind of different from when it was, when Windows was the main thing.
- 25:45Right.
- 25:45Because it used to be, well, long as it works well on Windows and we get that app on Windows and then, you know, like that was the key.
- 25:53But it's hard to say, well, all the Python developers are going to come over and run on Windows potentially because maybe they're hosting on Linux or whatever.
- 26:02But, but now if they're all going to run on the internet, right?
- 26:07Exactly.
- 26:08If they're running in our data centers, then we're happy to have them.
- 26:12And, you know, we want to do whatever we can to roll out the red carpet for whichever developers want to come in and work with us.
- 26:18And it's so much less about the end user platform because that's essentially the browser.
- 26:24Now it's like everyone's hiding behind the browser.
- 26:27The browsers work everywhere.
- 26:28The browser and the phone.
- 26:29Yeah.
- 26:30Yeah.
- 26:30So, yeah, it really has created that opportunity to do production apps in Python, which, which I mean, Python was never really designed for rich user facing applications.
- 26:41That's never been one of its use cases.
- 26:43It can certainly do it.
- 26:44There's other languages that have been designed for that kind of thing.
- 26:47And so Python's place has always really been more developers and command line, happy people and adding the web to that and being able to run your code on Azure enables Python developers in a way that want to encourage.
- 27:02And I don't want to say it's forced us because most of us are happy about it.
- 27:07It's broken down the barriers or the walls to pursuing the stuff you'd like to do anyway, maybe.
- 27:12How's that?
- 27:12That's basically it.
- 27:13We have somewhere to put our Python developers that we want to be working with now.
- 27:17Which is come and run your stuff on Azure or, you know, multi-cloud, hybrid cloud, whatever it is.
- 27:22But we have somewhere for Python developers to run production code, which Windows never really had a place for before.
- 27:28Yeah, for sure.
- 27:29So when I go to Azure these days, I feel like it's like opening up an encyclopedia.
- 27:33It's just like there's so much stuff in here.
- 27:36What do I even do?
- 27:37How many services are there?
- 27:39This actually came up while I was writing the story because I have a mention in there of Laurent as well, who manages the Azure management SDK in Python, which basically has modules for every single Azure service there is.
- 27:52And when I drafted it, I'm like, it's probably around 50.
- 27:56I'll write around 50.
- 27:57And then at one point I went and checked and it's over 100.
- 28:00Wow.
- 28:00And so I checked again.
- 28:01I'm like, no, it's still over 100.
- 28:02So I asked him and he's like, yeah, it's definitely over 100.
- 28:05I don't even know what they all are.
- 28:07Yeah.
- 28:07I feel like there needs to be a song about it.
- 28:10Like there's that song that all the US kids learn in school for all the states.
- 28:13Yeah.
- 28:14Like we need that song for all the Azure services just so we can remember what's going on.
- 28:20So bizarre how music does that.
- 28:22Yeah.
- 28:22Yeah.
- 28:22No, in terms of getting started, what I think was a really good move, and I'm not sure who made it, but I'll go give them a high five at some point.
- 28:28There's basically a set of free services on Azure.
- 28:32There's like a free sign up, credit card verification or like .edu email address verification.
- 28:37And you get like a limited set.
- 28:40And the thing about it being a limited set is there's one obvious choice for whatever you want to do within that set.
- 28:46And so it's like, I want to push up a website.
- 28:47It's like, well, app services here.
- 28:49That's the obvious choice.
- 28:50You don't have six things that you could make work that are all subtly different and serve different use cases better, which, you know, you can grow up into.
- 28:58Once you're at the point where it's like, this is a really serious workload that my company or my users are depending on.
- 29:05Let me optimize it for certain use cases.
- 29:09It really just is.
- 29:10You get one choice.
- 29:11You know, you want a virtual machine?
- 29:12Have a virtual machine.
- 29:14Oh, you want to choose from the 50 different sized virtual machines and different drive options and different GPU options and different memory options.
- 29:23Step up to the paid thing for that.
- 29:26But having that kind of filter on this is what you need to just do something.
- 29:30Taking away that choice is one of those things that I think is actually a really good user experience at time.
- 29:36Yeah, sometimes less is more in that sense.
- 29:38That's pretty cool that the free tier starts that way.
- 29:40So let's spend just a little bit more time on this journey, maybe focus on the areas that you've worked on.
- 29:46I don't know how many listeners out there know, but you actually, you know, when you interact with Python on Windows, they are interacting with a lot of your work, right?
- 29:55Yeah, so I actually, the way I got into core development was I was at PyCon.
- 30:01I think I was at my second PyCon ever, PyCon US, that is, and had some annoyances with the installer for Windows.
- 30:09And so I basically found some of the core developers and said...
- 30:12It was cool that it was there, but it definitely was a little bit not...
- 30:16Tell us some of the challenges that you ran into because of it.
- 30:18It was a simple installer for a simpler time.
- 30:20Because there was a time on Windows where you just drop files anywhere and they run, and anyone who has physical access to the machine can do whatever they like.
- 30:30Then the internet happened, and it turns out that even people who don't have physical access to the machine have access to the machine.
- 30:35And we really ought to be locking things down a little bit better.
- 30:38And that sent off the whole security kick that eventually brought us to where we are today, where we get all the way to store packaged apps that are managed in a really, really, really secure and isolated way that didn't exist at the time when the previous Python installer was written.
- 30:57Which I think came straight out of the DOS days.
- 31:00So it absolutely served a very important purpose for making Python available on Windows.
- 31:05But it just hadn't grown up at the same rate as Windows was growing up.
- 31:11So I basically found some core developers and said, hey, I would like to contribute some work to improve this.
- 31:17Who do I talk to?
- 31:18How do I go about suggesting ideas, proposing the work, contributing the work?
- 31:22And they basically said, you know, give us your contact, we'll chat and we'll get back to you.
- 31:27And they got back to me the next day because it happened that the person who was currently maintaining Windows, Martin Von Lois, had decided to step away and they were looking for a replacement.
- 31:36Good timing.
- 31:37Very good timing.
- 31:39And so I was basically co-op.
- 31:42I'm one of the rare people who basically gets dropped into core development without having contributed.
- 31:48That's not the usual way people become core developers.
- 31:52But I feel like it turns out when you're very much in a minority like that.
- 31:57I'm such an affirmative action hire for the CPython core development team.
- 32:00It's not even funny because there's very few Windows developers there.
- 32:05And so if someone comes along and says, I would like to do Windows and I'll let you all worry about Linux.
- 32:11I don't care about it.
- 32:12I just want to do Windows.
- 32:13They're like, are you even real?
- 32:15Yeah.
- 32:15Who's this person?
- 32:16They're like, yes, please come and help.
- 32:19And so I basically just got to rewrite it as I wanted to do things like moving the default install so that it's not writable by anyone on the machine.
- 32:27Because it was installing and Python 2.7 still installs to this default directory where any user on the machine can add files that the administrator will then automatically run.
- 32:38And it's something out of place like c colon backslash Python, right?
- 32:41Yeah.
- 32:42It's unconventional now.
- 32:43At the time, it certainly wasn't.
- 32:45It made a total sense originally.
- 32:47But these days, yeah, programs go into program files or they go under the user app directory if it's restricted to the user.
- 32:55And that helps keep things secured.
- 32:57It sets the access control right so that people aren't modifying files that other people are going to use.
- 33:02And being able to put it in a per user location means that we don't have to require users to be administrator to install anymore.
- 33:10And I feel like that's been the most exciting feature about the new installer for people is enabling that don't make me elevate.
- 33:18For a lot of people, it's don't make me hit yes on that box.
- 33:21But for others, it's don't make me go get the administrator to type in their password.
- 33:25Yeah, exactly.
- 33:26When you're at home and it means the UAC kicks in and you click OK, like that's OK.
- 33:30That's I mean, it's not super, but it's not the end of the world.
- 33:32But if you're at a company, like some of the places where it would make a lot of sense at like investment places and whatnot, like they don't even get to ask.
- 33:41It's just the answer is no.
- 33:43All right.
- 33:43No, you don't get to install stuff.
- 33:44No, you don't get to raise permissions.
- 33:46No.
- 33:46Yeah.
- 33:46And then pip install something becomes challenging as well if it's trying to install into like restricted directories.
- 33:52And so you basically made it so you can all that stuff potentially happens into your user profile where you can control almost all the time.
- 34:00Yeah. And at this point with 3.7, I made the final change, which was to do with the C runtime that would still try and install as an admin if you needed it.
- 34:09We're down to very few people who needed that already.
- 34:12So 3.7, I just kind of cut that cord completely and said, if you're still running on a Windows 7 machine that isn't receiving updates for whatever reason, then we won't try and install this properly.
- 34:24We'll just give it to you so it works and assume that you're not ever going to run into the trouble that we were concerned about previously.
- 34:30But I think my favorite story about people enjoying this feature, I had a teacher who spends a lot of time teaching Python throughout Africa come up to me.
- 34:40It was actually at EuroPython this year and absolutely gushing with praise and thanks for making it possible for his students who are coming into like evening classes.
- 34:50They've borrowed their mom's work laptop.
- 34:52It's a 10-year-old laptop.
- 34:54The keyboard's broken.
- 34:55So they've got a USB keyboard plugged into this laptop because they don't get to buy the latest MacBook Pro every year, right?
- 35:03Yeah, of course.
- 35:04And it's running Windows 7 and it's totally locked down and they can still install Python on it.
- 35:09That's great.
- 35:09Because of that change.
- 35:10It's a little mind-blowing that that change, which feels like it's technically a good thing to do, but it also enables kids in Africa to learn to program.
- 35:20And that's just mind-blowing.
- 35:22Yeah, that is so awesome.
- 35:23That's great.
- 35:24And I think actually that sort of speaks a little bit to the reach of talking about Python on Windows and this journey.
- 35:31I mean, we talked about, like I talked about, say, oh, Azure is what's like unlocking a lot of the sort of commercial side of the things around Python for you.
- 35:38But if you look at who is using Python, like what operating system people are using Python on, you go to the conference, maybe it doesn't feel this way.
- 35:47But general studies and surveys say the majority of them is like massively on Windows, right?
- 35:53I've actually been going around speaking to this at conferences recently, which I think we'll have a link to at least one of the recordings of the talks in the notes for this.
- 36:02But my recent presentation I've been giving at conferences is called Python on Windows is OK, actually, which is a bit of a bait and switch title, to be honest, because most of the talk is not actually about Python on Windows because Python on Windows is OK.
- 36:17And one of the best things when I joined the team was it was already OK.
- 36:20I think this installer actually makes a big difference.
- 36:23I think getting it installed properly is a big deal.
- 36:27It's the first experience, right?
- 36:28And the first experience matters because if you have a bad first experience, then you may never look twice.
- 36:33The big kind of controversial thing in that talk and a lot of the reason that I wanted to give it was I started looking at the stats and, you know, I looked around the conferences and was like, yeah, the entire Python world is using Macs mostly.
- 36:47And occasionally people that have taken a Windows laptop and installed Linux on it instead.
- 36:51And then I'd get up to give a talk and I've got a Windows machine and I can look out and just see all these glowing fruits staring back at me.
- 36:58Taunting you.
- 37:00Yeah. And but then we start looking at actual numbers and it's so skewed in the other direction, looking at things through downloads from PyPI, downloads from Conda, usage in the PSF survey, usage in IDEs like VS Code and PyCharm.
- 37:15So PyPI accepted.
- 37:17Windows is a huge, if not the biggest chunk or just a true majority of Python usage.
- 37:24Yeah. So let me just just to put some numbers behind this.
- 37:26Let me just read the operating system usage numbers from the JetBrains and PSF survey, the one that you just mentioned, which was not promoted by JetBrains.
- 37:36They just happened to do some of the analysis.
- 37:38So promoted by PSF.
- 37:40We've got other operating systems, whatever that means, at 17 percent.
- 37:44We have macOS at 15 percent and Linux at 19 percent.
- 37:47Right.
- 37:48I feel like everyone has a Mac at the conferences, but 49 percent people said Windows.
- 37:53Right. That's like not just a little bit more than others.
- 37:56That's more than Mac and Linux combined.
- 38:00Yeah. And as you say, it was not promoted by JetBrains so much.
- 38:04It was like this was promoted in regular Python channels.
- 38:07And so regular Python users are seeing and responding to this and doing it from a Windows machine, which we just don't have that kind of perception in the community that that's the case.
- 38:19And so it was really exciting.
- 38:21Like my favorite part about giving talks in general is looking at the tweets afterwards and the things that people have been most shocked by or most excited by.
- 38:28And the amount of photos of me standing in front of the slide with the 14 million downloads per month of Python for Windows is one of my favorite photos now.
- 38:39That's a ridiculous number of downloads.
- 38:41That's awesome.
- 38:41It's huge.
- 38:42And a lot of that is going to be CI systems, to be fair.
- 38:46But most of the downloads from Python.org are CI systems.
- 38:49We don't actually think there are 14 million Python developers anywhere in the world right now.
- 38:55I think the estimates are closer to six to seven million.
- 38:57So there's automatic downloads.
- 38:59At the same time, if people are automatically downloading Python for Windows, that means they're running Python code on Windows.
- 39:04Yeah.
- 39:04So it doesn't actually spoil the point at all for it to be, you know, oh, it was a script.
- 39:10It's like, well, every single download of the source for Linux was a script.
- 39:13Every single download of the Mac installer was also a script.
- 39:17That's just the reality is no matter how you slice the numbers, I describe it as at least half of the Python community is actually running on Windows.
- 39:26And we just don't realize that.
- 39:30And a lot of time we don't act like it.
- 39:32So the rest of the talk is basically around things that Python projects or Python packages do or have done that make them not work well on Windows.
- 39:44Likewise.
- 39:45Things like using string dot split on forward slash to separate paths.
- 39:50So paths on Windows use backslashes.
- 39:52And we have a couple of great modules for this.
- 39:55So I strongly recommend pathlib, which is in the standard library as of 3.4.
- 39:59But we've had OS dot path module for dealing with paths.
- 40:03And yet people will still just use the normal string functions to split on a forward slash.
- 40:07And if you do that to a path on Windows, you get one element with the entire path still in it because there's no forward slashes anywhere.
- 40:14It's a weird root directory.
- 40:15And it's things like that.
- 40:16And my big concern with that is you get, you know, these 50% of Python developers will install your package, try and use it, and it won't work.
- 40:25And it's just a very unwelcoming experience.
- 40:28Yeah, it can be.
- 40:29And, you know, it can be indirect as well.
- 40:31Like, for example, Sanic is a cool async web framework, right?
- 40:35Python.
- 40:35But I believe right now, at least last I heard, it didn't work on Windows because UVlib doesn't work on Windows.
- 40:43It doesn't install properly on Windows.
- 40:45And there's just these little glitches just like, ah.
- 40:47Yeah.
- 40:47And there's always a very long and reasonable chain of things that would have to work perfectly for the final result to work, which I understand.
- 40:55Yeah.
- 40:55Which I understand.
- 40:56This portion of Talk Python To Me is brought to you by us.
- 41:01Have you heard that Python is not good for concurrent programming problems?
- 41:06Whoever told you that is living in the past because it's prime time for Python's asynchronous features.
- 41:11With the widespread adoption of async methods and the async and await keywords, Python's ecosystem has a ton of new and exciting frameworks based on async and await.
- 41:21That's why we created a course for anyone who wants to learn all of Python's async capabilities.
- 41:26Async techniques and examples in Python.
- 41:28Just visit talkpython.fm/async and watch the intro video to see if this course is for you.
- 41:34It's only $49 and you own it forever.
- 41:37No subscriptions.
- 41:38And there are discounts for teams as well.
- 41:42Part of the problem is that of those 50% of Python users on Windows, I'm pretty well convinced that 49% of them work at places where they're not actually allowed to release their libraries.
- 41:53Yeah.
- 41:54I know for a fact that they have fast networking libraries, that they've re-implemented things for their platforms that make Python run great, that would be amazing to have out there in the community.
- 42:05That'd be a real enabler for a lot of the rest of us that are not kind of restricted to within these companies, but they just can't do it.
- 42:13Yeah, it's probably built to drop a half a millisecond on a trading engine for algorithmic trading or something like this where it's like, well, this is our advantage.
- 42:22We're not putting this out.
- 42:23Yeah, absolutely.
- 42:23And that advantage is worth a few millions of dollars per second as well for a lot of these places.
- 42:29Yeah, it's not unreasonable for them from a self-interested perspective.
- 42:33But yeah, I hear you.
- 42:34I would actually say it in reverse, maybe, like how many of the core developers or maybe not even the core developers, let's just say people working on popular packages like UVlib, not calling them out in particular, really, but just those types of things where the developer doesn't even own a Windows machine.
- 42:52So it just doesn't bother.
- 42:54And ultimately, I think that's the biggest point is when you don't have the machine to run and test on, then you stop thinking about these things.
- 43:03And works on my machine is, for volunteers, I think totally reasonable by asking people to invest in new hardware, invest in a new software installation, especially the matrix of things that you have to worry about.
- 43:17Even for Linux, I would suspect that most Python packages are not tested on more than one variation of Linux.
- 43:24Yeah, for sure.
- 43:25For exactly the same reason.
- 43:26Like no one, very few people are going to be running on FreeBSD and Ubuntu, for example, to make sure that it works on both.
- 43:34So that is a really valid reason for not doing it.
- 43:38But at the same time, it doesn't take a lot of work these days to set up a CI system that is going to run on Windows for you.
- 43:47And it doesn't actually take any money at all.
- 43:48Azure Pipelines is a fairly recent one that a lot of people are really excited about, myself included, because the open source thing.
- 43:58So if you mark your project as public so that anyone can see the results, you automatically get unlimited build time, up to 10 concurrent builds, and Windows, Mac, Linux, a choice.
- 44:10So you can choose, I think there's two Ubuntu images and two Windows images right now.
- 44:15It has Docker support if you want to be running builds inside containers of whatever container you like.
- 44:21That's pretty cool.
- 44:22Can I plug it into like my GitHub repo?
- 44:24Yeah, absolutely.
- 44:25You could do that before we bought GitHub.
- 44:27In fact, that's always been one of the primary uses for it.
- 44:30Yeah, that's pretty awesome.
- 44:31We have CPython builds running on that.
- 44:34Those are not the binding required checks yet.
- 44:37Pandas has switched over most recently.
- 44:39NumPy is there.
- 44:41Condor Forge is investigating moving all of their builds over to it.
- 44:45Oh, that would be huge.
- 44:46I mean, I know some people know what Condor Forge is, but maybe not everyone.
- 44:50And I think they're really interesting in enabling Windows to not have these problems of like building these weird tools because they deliver binaries on the right OS.
- 45:01Maybe tell people real quick what Condor Forge is so they'll appreciate that if they don't know.
- 45:05So Anaconda is a distribution and normally how people think about getting to the Condor tool.
- 45:10So you'll get this big fat installer from Anaconda and install that and get a whole lot of packages.
- 45:15And you have this Condor tool for creating environments, installing packages.
- 45:18But Condor is really just a pip equivalent.
- 45:20And you can, rather than getting the packages from the Anaconda channel, you could get them from other people's channels as well.
- 45:28Condor Forge is a community organization that basically fills in the gaps.
- 45:34Like they have something like 5,000 GitHub repositories that are basically the build steps for 5,000 packages.
- 45:42And they have a set of packages that are built for, I think they're doing five different platforms now.
- 45:49Just automatically building all of these packages.
- 45:53So if you've ever run into like trying to pip install something and there's no wheel, Condor Forge has probably done some of the work or someone's contributed the steps to build the pre-built Condor package so that you can Condor install a whole lot of stuff from there that would otherwise not be available.
- 46:11And they've been doing that through this incredible system of basically abusing as many free CI providers as possible for the various Mac and Windows and Linux builds.
- 46:24We're doing it for the good of the community.
- 46:26Yeah.
- 46:28And I think we timed things right when I mentioned this to one of the Azure Pipelines team members.
- 46:34And I don't actually know exactly what our financial motivation would be, but I don't really care.
- 46:39If they're excited to move as many thousands of builds onto one system that does everything that they want and the Condor Forge team is excited to do that and everyone's just excited to do it.
- 46:51I don't actually know what anyone's getting out of it, but Condor Forge is getting builds, users are getting packages.
- 46:57And so I'm happy.
- 46:58It can at least make the story for installing some of these packages on Windows better by ensuring they have a good infrastructure and it's not too much work, right?
- 47:06So there's maybe something there, yeah?
- 47:08And it makes installing the packages on Mac and Linux better as well.
- 47:11Anaconda's popular on Windows, but not like 90% of their usage.
- 47:17Yeah, yeah, it's true.
- 47:18They still have really significant use on Linux and Mac because they'll give you far more reproducible installs across various platforms than using Building From Source or even Wheels on pip are going to give you.
- 47:30Sure, I've used it on my macOS because something wasn't installing right.
- 47:34I'm just like, I'm just going to get the pre-built version.
- 47:36Let me ask you a question about something that's bugged me for a while.
- 47:40And as somebody who creates courses and tutorials, I often have to have like a couple of steps.
- 47:46Like, okay, here's the command that you type when you register this package so you can develop it in development mode on Mac or Linux.
- 47:55And, oh, here's the separate command that you run on Windows so that you can do that.
- 47:59So, like, Python 3 set up PY develop, right, for example.
- 48:03But, well, Python 3 was not a command on Windows.
- 48:06And that can be super annoying.
- 48:08You're like, well, on Windows, what you do is you say Python, but you've got to make sure which Python it is in the right path so that Python 3 comes first.
- 48:14And you and I, we've had these conversations before, right?
- 48:16Yeah.
- 48:17So this, I think, is one of those things.
- 48:19But you actually have like a super early announcement of something that's amazing around this.
- 48:23Is that right?
- 48:24It's not exactly a secret project, but it's, you know, if you're not watching the Python bug tracker, then you won't have noticed.
- 48:30But hopefully when we start promoting this a little bit more, you'll see it.
- 48:33With Windows 10, we actually added, so Microsoft added a store, an app store, basically.
- 48:40Oh, and in fact, it came in Windows 8.
- 48:41But in Windows 10, some of the recent updates, it's been growing the ability to install regular old apps.
- 48:47So a lot of people think of app stores like, you know, you get your Apple approved iPhone app that only runs on the phone and can't actually do interesting stuff beyond what the app does.
- 48:56Like you can't install a full Python interpreter that can access everything on your system through any of the app stores.
- 49:02What's being added to the Microsoft app store, the Windows app store, is the ability to install those.
- 49:08So paint.net is actually one of the earlier ones to do this.
- 49:13You can install paint.net through the store and it installs really quickly.
- 49:17It's properly isolated between users.
- 49:20And what we're doing, or at least experimenting with at this point, is adding Python to that store so that when it comes out,
- 49:29and the aim is to do this with Python 3.7.2 initially and then keep updating it from there,
- 49:34is be able to, rather than going to python.org and downloading the installer and running through all of those steps,
- 49:41you'll be able to just go to the Microsoft store and say, get it free.
- 49:45Obviously, it's going to be a free app and install it.
- 49:48And that will give you Python on your machine, managed by the store, automatic updates.
- 49:53It'll do automatic updates.
- 49:54Beautiful, yeah.
- 49:55It'll do automatic updates.
- 49:56I don't know how much trouble that's going to cause yet.
- 49:58That's why this is still a little bit experimental.
- 50:00I had to make some significant improvements to VN to make it be able to handle that, but I believe it can handle that now.
- 50:08Oh, that's great.
- 50:09But the really cool thing that comes with store apps that isn't available to regular apps is being able to manage path properly.
- 50:17So one of the problems with the path environment variable on Windows, or just one of the differences from POSIX-like systems,
- 50:25which I actually talk about in my Python Windows talk, is that on POSIX-like systems, you kind of have,
- 50:31here's a directory for my user commands, and any commands I put in there are available to the current user.
- 50:36Here's a directory for my machine commands, and any commands in there are available for the whole machine.
- 50:41And Windows hasn't had that.
- 50:42Windows has, let me add a directory to the path, and then go look in that when you're searching for anything.
- 50:49And so you get apps fighting over who's first on the path.
- 50:53There's no good way to automatically manage it and say, well, 3.7 should come before 3.6.
- 50:59But you can't automatically do that.
- 51:01And so that's always been messy, to the point where that's one of the controversial things I did with the new installer,
- 51:06was disable setting that up by default, because it just leads to breakage and confusion that we can't manage.
- 51:11What the store apps let us do is specify aliases for these commands.
- 51:18And those get managed by the operating system.
- 51:20There's like a nice GUI for switching which app gets to have that alias.
- 51:24And they go in a proper directory, that is, here are my user commands that are available to my user,
- 51:30and it's on path automatically.
- 51:32That's awesome.
- 51:32So this store package, when it comes out, is going to have python.exe on path,
- 51:37managed properly so that you'll get that one, you'll get the right one.
- 51:41And then when you update the store package, you'll get the latest version because it goes in the same place,
- 51:47and the newer version wins over the older version.
- 51:50But because it's so cheap and easy to do this, I thought, hey, why not put python3.exe in there?
- 51:55Well, since we're here, why not put 3.7.exe in there as well?
- 52:00So now you have all of those on path with this package.
- 52:03So that python3 command is going to work.
- 52:05And then I thought, well, this is still pretty easy.
- 52:08Why not keep going?
- 52:09Let's put pip in there.
- 52:10Let's put pip3 in there.
- 52:11Let's put pip3.7 in there.
- 52:13Let's put idle in there.
- 52:15And so it's very easily got to a point where when you install this package,
- 52:20you can go to any command prompt and type idle, and it will start running idle in that directory.
- 52:25You can type, when you end up with multiple ones, idle 3.7 will give you the 3.7,
- 52:30and eventually idle 3.8 will give you the later version of it.
- 52:34It's just there.
- 52:35That is such good news.
- 52:36Thank you.
- 52:37Thank you for doing that.
- 52:38That is really, really cool.
- 52:39So excited to hear it.
- 52:41Today, as we're recording, the first preview one is up.
- 52:43And so there's some more kind of private testing going on.
- 52:46But my hope is that with the 3.7.2 RC, when that is out, which is probably a week or two ago,
- 52:53by the time you're listening to this, it'll be up there publicly.
- 52:56So you can just go to the store and type python,
- 52:58and we should be showing up somewhere near the top of the list.
- 53:01And you can use that to install Python on your Windows box.
- 53:06And the cool thing is that doesn't require admin,
- 53:08but it installs in a way that only installs it once for the whole machine,
- 53:11which is really nice.
- 53:12So if you have 100 users on a machine, it installs it once
- 53:16and then isolates just the differences per user.
- 53:20So it doesn't take up 100 times the disk space or anything crazy like that.
- 53:24That is so cool because you see so many tutorials and stuff
- 53:27where people just put the POSIX variant up there, right?
- 53:32The type pip3 here or, you know, you do this and it's like, well, that's not exactly what you need.
- 53:38So I think this, so you're thinking that this Windows 10 store app of Python 3
- 53:44is going to be the way to get Python going forward.
- 53:47I hope so.
- 53:48There's certainly going to be some cases where it won't be the best option.
- 53:51And so the old installers aren't going to go away anytime soon.
- 53:54Sure.
- 53:55But we'll just have to see how people use it and what people need.
- 53:58There's already cases where the existing installers aren't ideal.
- 54:00And this is why we have other distros out there.
- 54:04This is why WinPython exists, Anaconda exists,
- 54:06because they offer things that, you know, Python.org can't offer.
- 54:10So this is another thing to be offered.
- 54:12And we can track usage.
- 54:15One of the really nice things is we can get all the crash reports.
- 54:17So when Python is breaking badly, there's a dashboard for store apps that basically says,
- 54:23here's how reliable your app is over time.
- 54:26And so we'll start getting those reports for Python, which will be really interesting.
- 54:29Yeah, for sure.
- 54:30And you also were able to recompile Python with the later tools,
- 54:34like move seven years or five years into the future on the compilers, right?
- 54:39As you, as part of your project of taking over all this.
- 54:41Yeah, that was, that was actually one of the first things I did was let's move off Visual Studio 2010
- 54:47since it's now 2015 or whenever I started doing that.
- 54:50Exactly.
- 54:51I've had a number of people thank me profusely for that.
- 54:54Mostly other people who are trying to build Python itself.
- 54:57Yeah, because if you're on Windows and you're a developer,
- 54:59you probably have the latest version of Visual Studio or the Windows Platform SDK or whatever,
- 55:04but none of those are likely like a seven or eight year old version of the compiler.
- 55:09It gets harder and harder over time to get the old compilers.
- 55:12Microsoft supports the latest and try to build in the compatibility that makes it
- 55:18viable for people to move forward as soon as possible.
- 55:21Around the Visual Studio 2015 point is where we actually made some big dramatic changes to make that easier.
- 55:27And so we are at a point now where VS 2015 or 2017 or 2019, which is recently first preview was released,
- 55:36will all work.
- 55:38and they can all kind of work across each other so that even Python 3.5, which was compiled with the old one,
- 55:45can use extensions built with the newest compiler because we've got that.
- 55:48I think we finally got the compatibility right.
- 55:50We went through about six or seven different ideas on how to make it right.
- 55:54And this time I think we've got it in a way that really just helps developers not have to pull all sorts of crazy tricks with their setup to make things work.
- 56:05That's also really good news.
- 56:06So I think there's so many positive things around here.
- 56:09This Python on Windows is okay, actually.
- 56:11I mean, it did highlight some of the issues, but also some of the great things.
- 56:16So maybe let's close out this conversation around the journey of Python at Microsoft by talking about this Python Summit at Microsoft.
- 56:24What's the story on this thing?
- 56:26I've only just barely heard of it.
- 56:27There's rumors floating around, and we've put up a blog post with a bit of information.
- 56:32Being at Microsoft gives me an opportunity to speak to and hear from people at companies that don't normally interact with the community.
- 56:40And so through that, we get to hear about problems and solutions that various people have tried for fixing things in Python or just in their Python projects.
- 56:52And we start hearing some commonalities across a lot of different places.
- 56:55And I'm talking like the Facebooks, Instagrams, through to various big banks who are all heavily invested in Python.
- 57:04We start hearing so much in common, but also not actually being aware of everyone else.
- 57:10And we started feeling like, hey, maybe we're in the privileged place where we can see all the overlap, and maybe it's on us to do something about it.
- 57:18So we basically put out the call to the people that we knew in these places.
- 57:25And so this wasn't like a public open call for content.
- 57:29This was specific invites to companies we know heavily invested in Python and say, hey, come, let's get in a room together and basically talk through what our struggles have been, what our efforts look like.
- 57:42You know, it's like half conference, half counseling session almost.
- 57:46Yeah.
- 57:46And, you know, do it in a place where we can have kind of an informal NDA going on about, you know, this is not, we're not broadcasting this on the internet.
- 57:55So if you want to actually talk about problems that you're having, you don't have to worry that it's going to be a news headline tomorrow.
- 58:01And people came and we had a room filled with trillions of dollars worth of Python development, which is something that probably makes absolutely no sense to most of the community because we look around and see the same kind of Python developer all around us at most of the conferences.
- 58:16And then in this room, we had the Dropboxes, the Amazons, Facebook, Google show up along with the big banks that are like actually making huge amounts of money using Python to the point where if Python disappeared or if Python fell away, they would be losing like billions of dollars of income or being able to move money around like and investments and stuff.
- 58:42So it was just a great opportunity to hear directly from them, hear that and basically find out that, yeah, all of our problems are the same.
- 58:49And a lot of them are shared with the community.
- 58:52A lot of packaging concerns affect everyone.
- 58:56A lot of performance concerns and like the C API for CPython is a hot topic right now, both in the community and in the corporate world.
- 59:06And everyone kind of has different ideas about what to do and how to fix it.
- 59:10And so it was a lot of people said it was a great time.
- 59:13They were very excited that there was a chance to share some of this.
- 59:18As I said, it's a little bit private kind of thing.
- 59:23So we're not putting out reports on specific things from specific companies.
- 59:27But certainly there are those of us like Microsoft who are kind of that channel, right?
- 59:33So, you know, we're a little bit of gatekeepers, I guess, which is not ideal.
- 59:39But at the same time, if it's the only way for like if the only way for the community to hear what the corporations are worried about is for us to kind of aggregate it and say, we spoke to corporations that won't publicly talk about this stuff.
- 59:52And, you know, you'll just have to trust that they said it's a problem to us.
- 59:56And we're kind of repeating anonymously, which the interactions between the corporate world and the community of open source are actually really, really complicated.
- 1:00:05Yeah, I'm sure they are.
- 1:00:06Most of what we've talked about today has been how complicated it can be.
- 1:00:11It's still so complicated, still so much uncertainty about how to interact.
- 1:00:16There's a lot of investment that these corporations want to make into community projects like Python, like Pip, like NumPy.
- 1:00:25And really, there's a huge amount of uncertainty about how to actually do it.
- 1:00:30And there's a lot of reasons for that.
- 1:00:32And probably most of them are solvable.
- 1:00:34But the only way to solve them is by having some amount of open dialogue.
- 1:00:39And we're trying to open that up and make it possible for companies to say, hey, this is what we're worried about.
- 1:00:46This is our concerns.
- 1:00:47This is what we can offer.
- 1:00:49And try and link up with the community to make some of that actually happen.
- 1:00:55Yeah.
- 1:00:56So apart from the corporations, we did have some community people in the room as well.
- 1:00:59I think we had seven Python core developers in the room, mostly employees of these companies, but they were there.
- 1:01:07You know, we were looking around going, did that guy get up and give an entire talk about using Python and not say any dollar amount under a million dollars?
- 1:01:16Like it's like every single, not the only number less than a million was the version number of Python he was talking about.
- 1:01:21Yeah.
- 1:01:22Yeah.
- 1:01:22Did that really happen?
- 1:01:23Does Python get used for that?
- 1:01:25Yeah, it does.
- 1:01:25But how do you turn that like millions and billions of dollars into community contributions is a really difficult problem.
- 1:01:33Yeah, it sounds like it is.
- 1:01:34And I think if you guys could unlock that somewhat, that would be so amazing because there's so many projects that are underfunded or run by one person in their spare time that are probably critical to the work that these other folks are doing.
- 1:01:48If you could somehow get that support to flow the other way or get at least their concerns to help make CPython better, that'd be great.
- 1:01:55There's been a few attempts to do this.
- 1:01:57There's a number of companies out there that are set up for kind of the purpose of redirecting corporate funding into open source projects.
- 1:02:06Anaconda, originally Continuum, is one of those.
- 1:02:09Travis Elephant's new venture, QuantSight, is trying to do the same thing.
- 1:02:14Tidelift is also following a similar thing.
- 1:02:16Yeah, Tidelift is really cool.
- 1:02:18It largely comes down to corporations will give out money for exactly one reason, and it's to get a return, which means you either have to convince them that altruism is going to get them some good PR or actually sell them a product.
- 1:02:31And Tidelift and Anaconda and QuantSight are all selling the corporations a product and turning that into open source funding, which is something that individual projects have really struggled to figure out.
- 1:02:43Yeah, absolutely.
- 1:02:44Like the Patreon model or the PayPal donate button, you know.
- 1:02:48Oh, yeah.
- 1:02:49Good luck.
- 1:02:50Good luck.
- 1:02:50Yes.
- 1:02:50You can't convince, you know, a vice president to, like, to give money to Patreon.
- 1:02:56It just, it's not how any of these big companies work.
- 1:03:00Yeah, they're just like, well, it doesn't make even any sense to us how this works.
- 1:03:04Yeah.
- 1:03:05Yeah.
- 1:03:05And you have a scale problem as well.
- 1:03:07We actually face this with trying to sponsor meetups is finding the person that can approve, you know, a $1,000 sponsorship is actually kind of hard.
- 1:03:15Like, because no individual engineer can approve that expense because that's too big.
- 1:03:19But what if the only people you can find look at that and say, why are you bothering me with something so small?
- 1:03:24Yeah.
- 1:03:25Come back when it's six figures or more.
- 1:03:27And it's actually this really hard spot to get anything done in a large company when it's too big to go unnoticed but too small to be, like, to deserve a decision maker.
- 1:03:39Yeah, it's a weird no man's land in the middle there.
- 1:03:41Indeed.
- 1:03:42Well, it sounds to me like this summit you guys had is a real positive thing.
- 1:03:46So, yeah, keep that up.
- 1:03:47And thanks for the report.
- 1:03:48Yeah.
- 1:03:48Yeah, indeed.
- 1:03:49All right, well, I think as much as I have a million more questions for you, I think we have to call it an episode on that.
- 1:03:55So, let me ask you the two final questions before you go.
- 1:03:58And maybe we can touch on something else as well.
- 1:04:00So, if you're going to write some Python code, what editor do you use these days?
- 1:04:03Probably not Visual Studio Tools for Python these days, right?
- 1:04:06That was my project for a long time.
- 1:04:07So, I have a lot of sympathy.
- 1:04:09I do still use it.
- 1:04:10I wouldn't say it's my primary editor.
- 1:04:12Like, Visual Studio Code right now is probably my primary editor.
- 1:04:15That was going to be my guess, yeah.
- 1:04:17Yeah, well, but the main reason for that is I got up on stage at a conference recently to do demos of it and just failed miserably at a number of things because I had not spent enough time using it.
- 1:04:27It's a really cool editor, but it's one of those you kind of have to live in because there's a lot of non – there's not lots of buttons and stuff.
- 1:04:34You've got to kind of know how to interact with it, right?
- 1:04:37Yeah, and I know Visual Studio inside out, so I can use that comfortably, but I don't feel like I'm learning anything.
- 1:04:44So, I'm living in Visual Studio Code these days to learn and get a good feel for it because, you know, it's rightly or wrongly, people expect me to know how it works.
- 1:04:53And, you know, it would be helpful for that to actually be true when they ask me questions about it.
- 1:04:58So, that is where I'm living right now.
- 1:05:00But also the extension for that.
- 1:05:03So, the Python extension, when we adopted that, oh, gee, a year, two years ago?
- 1:05:08Two years ago, yeah.
- 1:05:09It was like a one-person part-time thing.
- 1:05:12It now has like 100 million people working on it or something.
- 1:05:16I can't even keep track of the team.
- 1:05:18Yeah.
- 1:05:18We have six people based in Vancouver, most of whom I've never actually met in person.
- 1:05:23Like, it's moving along so quickly that it's at that really exciting time where every month when the update comes in, there's new and exciting stuff.
- 1:05:33And it feels totally fresh.
- 1:05:34And it's just exciting to be using right now.
- 1:05:36So, that's also fun.
- 1:05:37Awesome.
- 1:05:37Yeah, it definitely seems like there's a ton of energy around Visual Studio Code.
- 1:05:41And I suspect most people know, but obviously, it runs on all the platforms, right?
- 1:05:46It's not just on Windows, even though it shares the Visual Studio name.
- 1:05:49Yeah, Windows, Mac, Linux.
- 1:05:51Having .NET Core support for all of those platforms is, I feel like that's the limiting factor right now.
- 1:05:56Obviously, it's electron-based.
- 1:05:58So, anywhere that can run, it'll work.
- 1:06:00But some big pieces, especially the Python support, are running in .NET Core.
- 1:06:04So, that's about the limit.
- 1:06:06That's still a really big limit.
- 1:06:08Like, you've got some old versions of Linux distros that we support because it works there.
- 1:06:14Yeah.
- 1:06:15Where really most people would not dream of using them.
- 1:06:18But you can run VS Code there.
- 1:06:20Like, it's a tool.
- 1:06:21It's got to run where people want to use it.
- 1:06:24We can't force you to upgrade your operating system just for the editor.
- 1:06:27Yeah, that's great.
- 1:06:27All right.
- 1:06:28I definitely think there's a ton of energy around VS Code.
- 1:06:31And I think that whole Python extension editor side of the story deserves.
- 1:06:36Like, sort of mention in the Python's journey at Microsoft, even though it, you know, didn't get it to the very end here.
- 1:06:41All right.
- 1:06:42And then, notable PyPI package?
- 1:06:44Yeah.
- 1:06:44So, one that I'm really excited about right now.
- 1:06:47The Azure Machine Learning team recently came out with their new product.
- 1:06:51And the name is very similar to a lot of things we've had before.
- 1:06:54So, it can be tricky to track through exactly what it is.
- 1:06:57But Azure Machine Learning Service is basically an entire service for being able to do your machine learning tasks.
- 1:07:05Everything from data cleaning to model management and deployment.
- 1:07:08In a way that works really nicely balanced between your local editor and running stuff and pushing stuff in the cloud.
- 1:07:16So, it's got a whole lot of nice functionality for, hey, run this job in a cluster that is this big.
- 1:07:22Let me know when you're done.
- 1:07:23Nice.
- 1:07:24And run that training job and then store the model somewhere.
- 1:07:26You get a good history of all the models that have ever been published.
- 1:07:30And that's one of the products that has come out with only support for Python.
- 1:07:35Like, if you want to use that, you're using Python.
- 1:07:37There's actually no other options right now.
- 1:07:40So, I'm excited about that.
- 1:07:41But one particular part of that package that's really cool is the Azure ML Data Prep package.
- 1:07:47So, this is one part of it.
- 1:07:48But it's the part for I have a file on disk or I have a set of files on disk that have some raw data in it.
- 1:07:55And I need to preprocess.
- 1:07:57I need to clean.
- 1:07:57I need to extract data from certain columns and split them into more.
- 1:08:02I need to add more columns.
- 1:08:03I need to remove rows.
- 1:08:05I need to replace missing values.
- 1:08:06It's a library for doing that.
- 1:08:08It does a couple of really cool things.
- 1:08:10So, if anyone's used Flash Fill in Excel, which is this cool feature, you can try to put in a list of people's names.
- 1:08:17Just first name, last name, however many names in one column.
- 1:08:20And then start splitting them out manually.
- 1:08:23You put a few examples of type the first name in the next column, then the last name.
- 1:08:27And do that for two or three.
- 1:08:28And it will suggest splitting up every single row using those examples and figure out how to do it.
- 1:08:34So, that's been in Excel for a while.
- 1:08:35It's also in this package.
- 1:08:37So, you can take a raw data file that has, you know, maybe it has the date and time in those same column.
- 1:08:44And you say, okay, here's a couple of examples of how I want it split out.
- 1:08:47Put, you know, the date here and the time in a separate column.
- 1:08:50And it will figure out how to do that.
- 1:08:52And it can, it will use those examples.
- 1:08:55And then you can run it, stream it over a huge, huge file that won't fit in memory.
- 1:08:59And it will do it to the whole thing and write out a new file that's been pre-processed.
- 1:09:04It's changed together.
- 1:09:05Yeah, it's cool.
- 1:09:06Yeah, it's really, really neat.
- 1:09:09I guess there'll be a link in the show notes to the info on that one.
- 1:09:11But that, when we look at how far Microsoft has come in terms of Python usage, and it seems, this feels like a great ending to this show, actually.
- 1:09:19Yeah.
- 1:09:20This is the new point.
- 1:09:20We have some amazing technology here that is just Python.
- 1:09:25It's just Python.
- 1:09:26Like, it's not even .NET first and then Python.
- 1:09:29It's not even .NET second right now.
- 1:09:31It's Python only.
- 1:09:32It's just Python.
- 1:09:32It's Python all the way.
- 1:09:33That's beautiful.
- 1:09:34And that's so exciting.
- 1:09:35And, you know, I can't wait to see what comes next.
- 1:09:39Yeah, well, it sounds like there's a ton of momentum going there.
- 1:09:42And you've done a lot to get it going in the right direction.
- 1:09:45So that's wonderful.
- 1:09:46All right.
- 1:09:46So people are excited.
- 1:09:48Maybe they want to learn more about this history.
- 1:09:49Some more of the details.
- 1:09:50Things like that.
- 1:09:51What do they do?
- 1:09:52Final call to action.
- 1:09:52I'd say go read the Medium post.
- 1:09:54And that's got links scattered throughout to interesting things.
- 1:09:59And down the end, there's links to all the current things.
- 1:10:02So once you've seen where we came from, where we've gotten to, then I'm trying to make it easy to see what we have on offer today.
- 1:10:09Yeah.
- 1:10:09Well, a lot of cool stuff.
- 1:10:11And thanks for doing this historical journey story.
- 1:10:14It's great.
- 1:10:14Yeah.
- 1:10:14Thanks.
- 1:10:15You bet.
- 1:10:15Talk to you later.
- 1:10:16See ya.
- 1:10:16This has been another episode of Talk Python To Me.
- 1:10:19Our guest on this episode was Steve Dower.
- 1:10:22And it's been brought to you by Linode and us at Talk Python Training.
- 1:10:26Linode is your go-to hosting for whatever you're building with Python.
- 1:10:30Get four months free at talkpython.fm/Linode.
- 1:10:34That's L-I-N-O-D-E.
- 1:10:37Want to level up your Python?
- 1:10:38If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 1:10:43Or if you're looking for something more advanced, check out our new async course that digs into all the different types of async programming you can do in Python.
- 1:10:51And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
- 1:10:56It's like a subscription that never expires.
- 1:10:58Be sure to subscribe to the show.
- 1:11:00Open your favorite podcatcher and search for Python.
- 1:11:02We should be right at the top.
- 1:11:04You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
- 1:11:13This is your host, Michael Kennedy.
- 1:11:15Thanks so much for listening.
- 1:11:16I really appreciate it.
- 1:11:17Now get out there and write some Python code.
- 1:11:19Thank you.
- 1:11:19Thank you.
- 1:11:39Thank you.