WEBVTT

00:00:00.001 --> 00:00:04.540
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to

00:00:04.540 --> 00:00:11.100
your earbuds. This is episode 121, recorded March 13th, 2019. I'm Michael Kennedy. And I'm

00:00:11.100 --> 00:00:14.960
Brian Okken. And this episode is brought to you by Datadog. Check them out at pythonbytes.fm

00:00:14.960 --> 00:00:20.800
slash Datadog. More on that later. Brian, how you been? I'm, well, actually I had a rough week

00:00:20.800 --> 00:00:23.760
last week, but I think I'm getting back to it. Where'd you get in a fight with a dentist?

00:00:23.760 --> 00:00:29.160
Yeah, I went to like two dentists and two doctors just to fix one tooth, but yeah,

00:00:29.160 --> 00:00:31.560
it's all done now. Well, glad to hear you're doing better at least.

00:00:31.560 --> 00:00:35.380
You know, I would say the future is looking bright. What do you think?

00:00:35.380 --> 00:00:37.940
Yeah, especially with Python 3 coming everywhere.

00:00:37.940 --> 00:00:40.460
Yeah, absolutely. All right. So what's your first item here?

00:00:40.460 --> 00:00:46.440
Well, the first item is, oh yeah, you were doing like a whole transition thing. So yeah,

00:00:46.440 --> 00:00:54.980
I get it now. Futurize and auto-futurize. So Futurize is, there's a website called pythonfuture.org

00:00:54.980 --> 00:01:00.940
and they have this thing called Futurize that you can turn it on in stages. So it has a whole bunch of

00:01:00.940 --> 00:01:06.700
different modular switches. And the idea is to automate your conversion from Python 2 to Python 3.

00:01:06.700 --> 00:01:11.640
So like one thing you can do is like a fix the print statement, but nothing else, things like that?

00:01:11.640 --> 00:01:12.360
Is that the idea?

00:01:12.460 --> 00:01:16.860
Yeah. There's a whole bunch of different little modular things you can do. And I don't, I actually

00:01:16.860 --> 00:01:22.320
didn't dig into it enough to know if you can really, really go really small and granular and only change

00:01:22.320 --> 00:01:28.100
a few things at once. But one of the things they do have is a staged conversion. So they have split up

00:01:28.100 --> 00:01:35.840
a bunch of their stuff into relatively safe fixes, things like changing the exception syntax using print

00:01:35.840 --> 00:01:41.240
function. So the print function is easy to change, making sure that your classes have an object-based

00:01:41.240 --> 00:01:46.820
class. And apparently the iterator syntax changed, but I apparently that I didn't realize that.

00:01:46.820 --> 00:01:52.220
And a handful of other things that are really safe to just change. So there's a stage one that just

00:01:52.220 --> 00:01:58.920
changes all that stuff. And then the stage two where there's some more risky items, possibly

00:01:58.920 --> 00:02:06.160
they've do more kind of wrap some of the Python 2 style stuff with Python 3 style code. And, you know,

00:02:06.160 --> 00:02:11.380
of course all of this would only be for large projects because small projects, just go do it yourself, man.

00:02:11.380 --> 00:02:17.100
Anyway, if you're going to try to do all these modular things, it'd be kind of neat if you could test

00:02:17.100 --> 00:02:22.200
between hand and save all your changes. Timothy Hopper put together something called

00:02:22.200 --> 00:02:30.980
auto-futurize that is a shell script that uses Git to save all your changes and then talks to run your,

00:02:30.980 --> 00:02:38.440
is assuming you're using talks to check your code. And it goes and go ahead, does all of these changes

00:02:38.440 --> 00:02:44.960
to your code and test it in between. And if it does a little bit of a change and your tests pass,

00:02:44.960 --> 00:02:49.700
it does the rest of it. And then it doesn't check in things that don't work. So this is kind of fun

00:02:49.700 --> 00:02:54.800
and it'd be fun to try on a project. Yeah. I like the idea of both of these. I can totally envision

00:02:54.800 --> 00:03:01.300
like some high paid consultants sitting down to do the Python 2 conversion for the companies that put

00:03:01.300 --> 00:03:07.540
their head in the sand until January. And then they come in and they just, you know, run this for the

00:03:07.540 --> 00:03:14.220
morning, go have a long lunch, come back. Everyone will be super happy how quickly they did it. And

00:03:14.220 --> 00:03:18.560
it'll be great. The machine will do all the conversion. Yeah. There'll be like two files

00:03:18.560 --> 00:03:23.500
that they have to hand edit to fix. And exactly. It's going to take a few weeks, but we'll see if

00:03:23.500 --> 00:03:28.580
we can get it done without too much of a problem. Hey, that's a new business idea. Maybe I should

00:03:28.580 --> 00:03:33.100
start another side business. It's a little shady, but you know, it's all right.

00:03:33.100 --> 00:03:35.980
So thanks Tim for, for Christmas money for next year.

00:03:35.980 --> 00:03:38.680
Yeah. Thank you, Tim. And that's a cool, actually, you know, in all seriousness,

00:03:38.680 --> 00:03:40.780
it's a cool project and I think it's going to help a lot of folks.

00:03:40.880 --> 00:03:45.160
Speaking of helping folks, Anthony Shaw, he's putting a lot of content out there for everyone.

00:03:45.160 --> 00:03:51.180
And the reason we talk about him so often is often he's doing some kind of blog post,

00:03:51.180 --> 00:03:57.300
he's written some kind of cool article. And he went kind of meta recently and did a live stream.

00:03:57.300 --> 00:04:02.400
I think it was on YouTube of how he goes about writing these posts, how he does research,

00:04:02.400 --> 00:04:05.120
how he thinks about the different formats, all that kind of stuff.

00:04:05.120 --> 00:04:09.340
Yeah. So I was just, it's still on my to-do list to watch. So you watched it and it was pretty good.

00:04:09.340 --> 00:04:12.200
I watched it. Yeah. About 20 minutes of it. Didn't have a chance to watch the whole thing,

00:04:12.200 --> 00:04:17.080
but it was, it's good. Him just writing a post and you just watch him write it. He goes through

00:04:17.080 --> 00:04:22.300
and talks about the different posts he's written, some of the trade-offs and how he works and things

00:04:22.300 --> 00:04:26.940
like that. So he talks about one of his posts called modifying the Python language in six minutes,

00:04:26.940 --> 00:04:32.880
which is like a deep code focused article. He talks about listicles. And so he talks about five

00:04:32.880 --> 00:04:38.060
easy coding projects to do with kids. He did, he talks about what is popular and like why those

00:04:38.060 --> 00:04:43.140
are popular, which is pretty interesting. He says one type of article he likes to write is like

00:04:43.140 --> 00:04:47.620
question articles. So why is Python slow, for example? And of course to, you know, disprove that or

00:04:47.620 --> 00:04:51.860
whatever. And then also the tourist, like I'm going to take you on a tour or something. So a tourist guide

00:04:51.860 --> 00:04:56.460
to the CPython source code. So if you're looking to up your writing game or get inspired, you know,

00:04:56.460 --> 00:04:59.100
if you sit down and you're like, Oh, we got to write about something. What am I going to do? Well,

00:04:59.100 --> 00:05:02.600
here's a bunch of ideas like, do I want to write a listicle? Do I want to write a tour? Do you want

00:05:02.600 --> 00:05:06.180
to write a question? And so it really helps focus the mind and get you going, I think.

00:05:06.180 --> 00:05:10.440
Yeah, definitely going to check this out because he's pretty much crushing it. And I'd like to

00:05:10.440 --> 00:05:16.260
kind of learn from that technique. So yeah, very, very well done. Nice job, Anthony. I feel like

00:05:16.260 --> 00:05:21.940
you've chosen a very controversial topic for the next one. Not so much, but, but a pretty interesting.

00:05:21.940 --> 00:05:28.080
Yeah, I guess I just totally forgot that it was controversial. And I know it was like big thing at the

00:05:28.080 --> 00:05:34.580
time, but it's the walrus operator or peps 572. And I kind of love the walrus operator because

00:05:34.580 --> 00:05:42.240
it's the, what semi or the colon with the equal sign. And it's basically excitement expression

00:05:42.240 --> 00:05:48.020
that's coming in Python three eight. And it's kind of hard to describe on audio, but it's a,

00:05:48.020 --> 00:05:53.300
so a lot of the times, if you were to say, I do a lot with dictionaries, or if I'm looking into

00:05:53.300 --> 00:05:58.900
some data database or something, I want to find out if an element is there. And if it is there,

00:05:58.900 --> 00:06:04.400
I want the value. And it's always this two stage thing. And it'd be great. And pattern matching is

00:06:04.400 --> 00:06:09.160
another one, regular expressions. If there is a match, then search for it and get this stuff.

00:06:09.160 --> 00:06:15.380
Otherwise don't do something. And, being able to do this as one assignment expression is going to,

00:06:15.380 --> 00:06:20.420
I think, help out quite a bit. Anyway, you can play with it now. So that that's the whole point of this

00:06:20.420 --> 00:06:26.180
is, Alexander Holtner. Yes. I wrote an article saying that now that the alphas,

00:06:26.180 --> 00:06:31.480
some of the alpha releases for Python three, eight are out, you can try these out. And he wrote a post

00:06:31.480 --> 00:06:36.800
demonstrating exactly what I was talking about, getting elements out of a dig, iterating through

00:06:36.800 --> 00:06:45.540
dictionaries and grabbing keys out of their elements. If they, if they exist, he used pyenv and, to

00:06:45.540 --> 00:06:50.440
grab the new releases. I don't know why, but I'm just one that I like to just download the stuff.

00:06:50.440 --> 00:06:55.360
So I've added the links to the two, three, eight alphas available so far.

00:06:55.360 --> 00:06:59.380
People want to try it out. So. Yeah. The one that I really like here is the

00:06:59.380 --> 00:07:04.480
list expression, which could be a generator or it could be set expression or whatever, but

00:07:04.480 --> 00:07:10.300
a list comprehension, because those have to be one line. And if you want to assign a variable and

00:07:10.300 --> 00:07:14.960
then test it and then do other stuff with it, you can't really get really do that.

00:07:14.960 --> 00:07:20.360
And without the walrus operator, if you're going to like apply like a function to the elements that

00:07:20.360 --> 00:07:26.100
you're looping over and then you want to use those, you have to basically get access or compute that

00:07:26.100 --> 00:07:30.680
twice for each element. And the walrus lets you do it all in one. So these little expressions are kind

00:07:30.680 --> 00:07:35.500
of like the lambda has the, you know, the colon and then the body type of syntax. It's a little bit

00:07:35.500 --> 00:07:39.840
like that kind of in line and that definitely seems nice to me. Yeah. That's a pretty cool use.

00:07:39.840 --> 00:07:44.380
I hadn't, hadn't really seen that before this article. I guess I didn't pay much attention,

00:07:44.380 --> 00:07:49.820
but using it as a, in a comprehension is pretty cool. Yeah. Cool. Yeah. Also your little nested

00:07:49.820 --> 00:07:55.700
for loop if test, it's pretty nice. You know, I guess I'm coming around to the walrus operator,

00:07:55.700 --> 00:07:59.920
honestly. Yeah. I mean, once I start using three, eight, I'll be using it all the time. It'd be like,

00:07:59.920 --> 00:08:05.320
be like using f-strings, I think to say, okay, well now it's three, eight and above because I don't want to

00:08:05.320 --> 00:08:12.080
use anything else. I'm not there yet, but awesome. All right. Well, before we get onto the next one,

00:08:12.080 --> 00:08:16.440
which I'm pretty thrilled about, cause it's simple and amazing. I just want to tell you quickly about

00:08:16.440 --> 00:08:21.180
Datadog. So they're sponsoring this episode. Of course, Datadog is a monitoring and analytics

00:08:21.180 --> 00:08:26.800
service that brings all your metrics and logs and distributed traces together. And their client

00:08:26.800 --> 00:08:32.780
automatically instruments things like asynchronous libraries, such as Async IO and popular frameworks

00:08:32.780 --> 00:08:37.420
like Django or tornado to help you visualize your performance. If you want to trace your requests

00:08:37.420 --> 00:08:41.660
across service boundaries and figure out where your app is slow or find errors, you know, go over to

00:08:41.660 --> 00:08:47.160
pythonbytes.fm/Datadog. Got a cool free trial there and you get a nice little Datadog t-shirt too.

00:08:47.160 --> 00:08:54.860
So check them out. It helps support the show. Now to the awesome thing. We talked about click and we

00:08:54.860 --> 00:08:59.780
talked recently about argparse and other cool ways to build command line applications, right? Yeah.

00:08:59.780 --> 00:09:07.240
And there's of course the tried and true input, right? You got input. What is your question? And

00:09:07.240 --> 00:09:11.820
you set the value and then you maybe have to test it. We'll see whether it's an integer. And then like,

00:09:11.820 --> 00:09:14.840
if there's an error, you say, no, there's an error. You can't say that you got to say an integer.

00:09:14.840 --> 00:09:19.180
And there's all these, these challenges, right? So maybe I've got a list of things I'd like them to

00:09:19.180 --> 00:09:23.820
pick from like what kind of, you know, maybe you're building a site and like through a generator says,

00:09:23.820 --> 00:09:28.040
well, what kind of data backend do you want? I want Django ORM. I want SQLAlchemy. I want raw SQLite,

00:09:28.040 --> 00:09:32.420
whatever. You might give them a list and say, well, pick one, two, three, or four, right?

00:09:32.420 --> 00:09:35.760
Which box do you want? Well, with bullet, have you seen bullet?

00:09:35.760 --> 00:09:38.120
I'm just looking at it right now and it's pretty exciting.

00:09:38.120 --> 00:09:42.520
It's incredible, right? So what you get is imagine like a dropdown combo box,

00:09:42.520 --> 00:09:47.880
like you would have on the web that is the list and you can click, but in the command line as a

00:09:47.880 --> 00:09:52.120
command line or even, so it says choose something and you can arrow through it. It has like little

00:09:52.120 --> 00:09:58.420
indicator of which one you're on. Oh man, it is slick. It supports colors and emojis and it has a

00:09:58.420 --> 00:10:05.700
scroll bar. You can like even scroll through them if there's too many choices to fit on the screen.

00:10:05.700 --> 00:10:11.180
Yeah. It's, it's pretty cool and it's easy to use. So that's nice. There's also other types of inputs.

00:10:11.180 --> 00:10:14.720
Like you can have a password. It says enter your password or what is the password? And it does the

00:10:14.720 --> 00:10:20.680
star marking, which is cool. It has yes, no questions and numbers. It only, you know, a number

00:10:20.680 --> 00:10:26.340
input. You can only enter numbers. They won't accept, you know, junk that won't parse. So you

00:10:26.340 --> 00:10:32.100
don't have to go through all those steps. it's pretty incredible, right? Yeah. So we need somebody

00:10:32.100 --> 00:10:36.800
to write cookie cutter with, with bullet prompts. Exactly. I was thinking of cookie cutter.

00:10:36.800 --> 00:10:41.560
Exactly. Cause the cookie cutter asks all those types of questions all the time. Yeah. It would be

00:10:41.560 --> 00:10:47.240
beautiful to have bullet just, you know, beautifying all these things. So there's one idea people want

00:10:47.240 --> 00:10:51.580
to contribute to open source. Another one is right here on bullet. you know, there's probably other

00:10:51.580 --> 00:10:57.160
types of input besides passwords. Yes, no. And numbers like maybe multi-select. I don't know,

00:10:57.160 --> 00:11:02.020
but also looking for windows support. I think right now this does not work on windows because the way

00:11:02.020 --> 00:11:08.380
the terminal works versus on, you know, a POSIX system. So pretty cool though. Still, still digging it.

00:11:08.640 --> 00:11:13.940
So go bullet. Go bullet. Yeah. So we actually have a couple of items to do with pip and packages and

00:11:13.940 --> 00:11:17.900
installing. You go first. Okay. Well, last week, I think it was last week. Maybe it was the week

00:11:17.900 --> 00:11:23.380
before we talked a little bit about, maybe you want to try something different than, Travis for your,

00:11:23.380 --> 00:11:30.240
uh, pipelines, for your continuous integration. The exodus after all the layoffs and all that

00:11:30.240 --> 00:11:34.600
business, huh? Yeah. Well, I mean, or just maybe you're just wanting to try Azure anyway,

00:11:34.600 --> 00:11:39.940
Azure just because it looks neat. There's an article that I thought was super cool. That was,

00:11:39.940 --> 00:11:48.100
um, hosting private pip packages using Azure artifacts. And the idea is for the, of the article

00:11:48.100 --> 00:11:53.940
is let's say if I'm using Azure pipelines to do actually a data pipeline, doing a whole bunch of

00:11:53.940 --> 00:11:58.940
different stages of changing the data or whatever, whatever you do with data pipelines, some of the

00:11:58.940 --> 00:12:04.360
work can be packaged up and used, in later stages with just like a pip install. That'd be

00:12:04.360 --> 00:12:10.140
cool. And then how, how do you do that? There's a few gotchas that they get through and they, for

00:12:10.140 --> 00:12:16.060
instance, in one part, you can't just use the normal pipelines just by itself, but you can use

00:12:16.060 --> 00:12:24.560
the CI pipelines from Azure DevOps tool to get the packages into an artifact form. And basically it's

00:12:24.560 --> 00:12:28.640
all the hacks that you need to do to make this work. I just thought that was cool. It was neat.

00:12:28.640 --> 00:12:33.660
Yeah. I think that sounds really cool as well. And now go ahead and leverage those artifacts to,

00:12:33.660 --> 00:12:35.020
to make your pipelines, which is cool.

00:12:35.020 --> 00:12:39.320
I don't think you can make these public. They're mostly, you know, you're using it for your own

00:12:39.320 --> 00:12:44.280
stuff. So they're a little bit private. Like they're talking about using a credential,

00:12:44.280 --> 00:12:50.060
hooking up your credentials so that a pip install can get those correctly. and then I also wanted,

00:12:50.060 --> 00:12:55.520
one of the things we did, did talk about last week was, Anthony Shaw's, pytest Azure

00:12:55.520 --> 00:13:01.180
pipelines, pytest plugin. We've already covered that last week, but one of the things that's cool that

00:13:01.180 --> 00:13:08.780
happened since then is that plugin has now part of the recommended pipeline recommended setup from

00:13:08.780 --> 00:13:13.040
Microsoft itself. Yeah, that's pretty cool. Well done. So it's definitely going to be sort of the

00:13:13.040 --> 00:13:17.300
de facto way over there now. Yeah. So I want to talk about something pretty unique. maybe we

00:13:17.300 --> 00:13:25.600
haven't touched on this before. It has to do with GUIs. So, last week we spoke about mixing in

00:13:25.600 --> 00:13:32.160
the asyncio. I know this was two weeks ago, the asyncio pipeline, sort of event loop and mixing that

00:13:32.160 --> 00:13:39.040
in with cute. So cute for Python and PyQ and things like that. So all GUIs have event loops, right?

00:13:39.040 --> 00:13:42.800
They're always just going around and around going, did something happen? Did they click a button? I'm

00:13:42.800 --> 00:13:48.600
looking for, you know, like mouse move. I'm looking for key down, resize events. And it just, you know,

00:13:48.600 --> 00:13:54.240
passes it on to like the various event handlers. Well, asyncio is another loop that kind of goes

00:13:54.240 --> 00:13:59.020
around and around process those things, but like, how do we put those together? So a guy named Andy

00:13:59.020 --> 00:14:05.940
Bolka sent us a message after hearing the first conversation about what was it? He was async

00:14:05.940 --> 00:14:11.700
QT cute was the name of the project. After hearing about that, he's like, Hey, I work on wxPython.

00:14:11.700 --> 00:14:17.560
And, you know, there's a cool thing called WX async as well. And it does a really similar thing.

00:14:17.560 --> 00:14:23.160
And it basically merges those two event loops into one thing, which is pretty cool. So he wrote a

00:14:23.160 --> 00:14:28.820
really nice in-depth medium article about it called async and await for wxPython.

00:14:28.820 --> 00:14:35.840
Oh, very nice. Yeah. So one of the challenges with wxPython apparently is doing background work,

00:14:35.840 --> 00:14:39.460
right? So you try to like call service or you try to do something. And then, you know,

00:14:39.460 --> 00:14:45.460
if you don't take extra measures, it's going to block up that event loop. That is the GUI thread.

00:14:45.460 --> 00:14:50.480
And it's just like your app's going to freeze and not respond and do all sorts of bad stuff. You're

00:14:50.480 --> 00:14:55.860
not supposed to do in desktop apps. So with this, you can have async handlers that, you know,

00:14:55.860 --> 00:15:00.040
run in the background. So if you're like waiting on a call to go to the service, you just await that.

00:15:00.040 --> 00:15:05.160
And like the event loop keeps on chugging. So it's pretty cool. Obviously you can do threading

00:15:05.160 --> 00:15:08.400
and multiprocessing and that kind of stuff, but this is a little bit cleaner. And if you want to

00:15:08.400 --> 00:15:13.300
use async and await. Yeah. Nice. The other thing that he talks about in his article is about this

00:15:13.300 --> 00:15:20.100
sort of viral nature of using async and await. So if I define a function, I say async def something,

00:15:20.500 --> 00:15:27.320
the function that's going to call it may well have to itself be async so it can await it. And then like

00:15:27.320 --> 00:15:32.260
the things that call that have to become asyncified and so on. It creates this kind of

00:15:32.260 --> 00:15:39.420
like from the bottom up spread of async, like invading all of your code, which that can be a

00:15:39.420 --> 00:15:44.140
challenge. And it talks a little bit about that, but I would just wanted to throw a shout out, which

00:15:44.140 --> 00:15:48.400
to something I think we've spoken about before. If I haven't, we should definitely make it in full

00:15:48.400 --> 00:15:53.760
featured item later, but unsync. Have I mentioned unsync on the show? I don't remember.

00:15:53.760 --> 00:15:56.940
All right. Well, that's probably going to be a new thing if we haven't. I'll double check. But

00:15:56.940 --> 00:16:04.500
unsync is a super simple library that puts a unifying API on multiprocessing, threading,

00:16:04.500 --> 00:16:10.200
and asynchronous methods. And it manages its own little background queue running somewhere else on

00:16:10.200 --> 00:16:16.680
another thread. It allows you to do a lot of things like just blocking on those running sub method

00:16:16.680 --> 00:16:22.640
calls to get the result so that you don't actually have the problem. You can sort of use it to stop

00:16:22.640 --> 00:16:28.100
this async spread of these methods. So anyway, you know, it's an interesting article. It's interesting

00:16:28.100 --> 00:16:32.260
it covers that. And I want to throw unsync out there as one of the cool solutions for it.

00:16:32.260 --> 00:16:37.480
Yeah. That's a good thing to bring up. I kind of didn't think about that. I mean, I'm used to it

00:16:37.480 --> 00:16:42.540
in C++ world that if you're running multi-threaded, everything's got to be multi-threadable.

00:16:42.540 --> 00:16:46.600
Yeah. It starts to go crazy. And it's just like, yeah, similarly. Yeah. Yeah. Anyway. Okay.

00:16:46.600 --> 00:16:50.760
Pretty cool. All right. Well, that's it for our main items. I have a couple of follow-up ones and I

00:16:50.760 --> 00:16:55.220
have a set of jokes for you. I have a joke generator for you even. How's that?

00:16:55.220 --> 00:16:58.440
Oh, that's great. Yeah. All right. You got anything you want to let people know about?

00:16:58.440 --> 00:17:01.500
No. So you just released a new testing code episode.

00:17:01.500 --> 00:17:09.620
Yeah. That released an episode talking about a fun alternative to our version of TDD that's called

00:17:09.620 --> 00:17:18.100
TCR test commit revert with the idea of what happens if every time your tests fail, you just throw away

00:17:18.100 --> 00:17:23.360
all your code that you've changed since the last good commit. And it seems absolutely crazy, but it's a fun

00:17:23.360 --> 00:17:27.800
thing to talk about. Yeah. It does seem a little crazy, but also, yeah, it seems fun. Yeah. And then

00:17:27.800 --> 00:17:31.720
there are a whole bunch of cool people lined up. I've got like six interviews lined up. So there's

00:17:31.720 --> 00:17:36.540
going to be lots of good content coming up soon. Yeah. Sweet, sweet. All right. Well, I have a couple

00:17:36.540 --> 00:17:44.160
of things, a correction, some self-aware acknowledgements, and then a joke. So correction, we spoke about the

00:17:44.160 --> 00:17:50.940
MongoDB licensing and the AWS kerfuffle where AWS said, well, you're going to change your license. So we

00:17:50.940 --> 00:17:56.480
can't use MongoDB as our own service. Well, fine. We'll rewrite a new implementation that has nothing to do

00:17:56.480 --> 00:18:02.080
with you, but is, you know, wire protocol identical and things like that. Well, mostly I got that right.

00:18:02.080 --> 00:18:07.060
However, Will S sent me a message said, Hey, I actually posted a message on the comment section

00:18:07.060 --> 00:18:12.700
of that episode and said, Hey, you said they switched to the AGPL. They actually had already been on the

00:18:12.700 --> 00:18:21.540
AGPL. And what they switched to is something called the SSPL server side license. And it turns out that

00:18:21.540 --> 00:18:26.960
the OSI open source initiative doesn't even recognize SSPL as an open source

00:18:26.960 --> 00:18:33.840
license because the way some of its conditions. And so it's interesting in some sense that like

00:18:33.840 --> 00:18:38.160
MongoDB might not even be open source anymore based on its license, not in the traditional,

00:18:38.160 --> 00:18:40.380
what is its license mean sense anyway.

00:18:40.380 --> 00:18:45.220
Right. I took the perspective of, let's say I've got a service out there. I'm just like a,

00:18:45.220 --> 00:18:49.980
to have a side project where I've got a service out there where I just run my own instance of

00:18:49.980 --> 00:18:56.460
Mongo and have amusing that. Do I have to worry about this license change? And the answer is no.

00:18:56.460 --> 00:19:00.040
Yeah. That's what I saw as well. It's like, but if you want to be a cloud provider and you want to

00:19:00.040 --> 00:19:02.720
offer the service to others, then you do.

00:19:02.720 --> 00:19:08.020
Right. But if the service you're offering isn't Mongo, it's just some other service that happens to use

00:19:08.020 --> 00:19:09.620
Mongo. Yeah. You're good.

00:19:09.620 --> 00:19:12.120
Yeah. Like businessinsider.com or whatever.

00:19:12.120 --> 00:19:12.760
Yeah.

00:19:14.140 --> 00:19:19.780
Yep. Okay. So MongoDB license, sorry, it's SSPL. That's the change. It was already AGPL. Thank you,

00:19:19.780 --> 00:19:26.520
Will, for that. So Brian, do you know that legacy Python is self-aware and has actually entered the

00:19:26.520 --> 00:19:27.640
fifth stage of grief?

00:19:27.640 --> 00:19:29.020
No.

00:19:29.220 --> 00:19:34.940
So people out there can try this. So if you type Python 2 dash M and you run any module,

00:19:34.940 --> 00:19:41.680
so like Python 2 dash M pip list, like that's a meaningless command. You'll get the output that

00:19:41.680 --> 00:19:48.740
says deprecation. Python 2.7 will reach its end of life on January 1st, 2020. Please upgrade your

00:19:48.740 --> 00:19:55.340
Python as Python 2.7 won't be maintained after that date. Moreover, my word, a future version of

00:19:55.340 --> 00:19:57.480
pip will drop support for Python 2.7.

00:19:57.480 --> 00:19:59.780
Oh, wow. Yeah. Well, that makes sense.

00:19:59.780 --> 00:20:03.980
Yeah. So, I mean, I feel like that's acceptance, right? It's like, yeah, I'm going away. Sorry.

00:20:03.980 --> 00:20:10.180
Anyway, there's a funny Twitter thread as well that I threw out when I first saw that going by. So that's cool.

00:20:10.180 --> 00:20:14.940
And then finally, we talked about pip and packaging and stuff. There's this thing that Dan Bader from

00:20:14.940 --> 00:20:19.640
RealPython shot me over and said, hey, have you seen this? This is kind of cool. Called PyDist.

00:20:19.780 --> 00:20:28.240
So this is a thing, a service, I guess, that is in beta. And the idea is you can use it as your

00:20:28.240 --> 00:20:35.760
package source, right, for pip and whatnot. And you can have public and private dependencies there.

00:20:35.760 --> 00:20:40.820
It'll mirror the public ones and keep a copy of them and never, ever delete them, even if they were

00:20:40.820 --> 00:20:46.980
deleted from pip, PyPI, so that you always have them there stable. It's pretty cool. It's supposed to do a

00:20:46.980 --> 00:20:50.700
bunch of other stuff, like show you, like, if you use this package, here are all the packages that

00:20:50.700 --> 00:20:55.680
depend upon it and what you're going to get, which is not really available right now and things like

00:20:55.680 --> 00:21:00.240
that. But it looks like it maybe at some point become a paid service. I don't know. It's in free

00:21:00.240 --> 00:21:04.120
beta. They don't say one way or the other. So anyway, maybe that's helpful to people out there.

00:21:04.120 --> 00:21:05.500
Interesting though. Cool.

00:21:05.500 --> 00:21:06.500
All right. You ready for a joke?

00:21:06.500 --> 00:21:07.360
Definitely.

00:21:07.360 --> 00:21:11.480
This is super hilarious. All right. Let's do this. pip install --user.

00:21:11.480 --> 00:21:12.160
PyJokes.

00:21:12.160 --> 00:21:12.560
Okay.

00:21:12.560 --> 00:21:13.900
All right. You got to do it.

00:21:14.280 --> 00:21:20.000
Or better. I'm super loving PipX. So PipX install PyJokes if you got that, because that

00:21:20.000 --> 00:21:25.720
that is the business these days. PipX is awesome. It's like homebrew, but for Python executables.

00:21:25.720 --> 00:21:26.880
Okay. This is going to take two then.

00:21:26.880 --> 00:21:30.460
All right. Let me, I'll do a couple and then you can give me one at the end. So what this is,

00:21:30.460 --> 00:21:34.720
this is a package that you can install that gives you a command line access to developer jokes.

00:21:34.720 --> 00:21:35.000
Really?

00:21:35.000 --> 00:21:39.380
Yeah. Okay. So once you install, I'm going to type PyJoke. There are two ways to write error-free

00:21:39.560 --> 00:21:44.160
programs. Only the third one works. All right. Let's see what else we got. This one, I think

00:21:44.160 --> 00:21:50.080
you'll like this one. A QA engineer walks into a bar, runs into a bar, crawls into a bar, dances

00:21:50.080 --> 00:21:57.960
into a bar, tiptoes into a bar, rams a bar, jumps into a bar. Okay. That's it. How many programmers

00:21:57.960 --> 00:22:03.860
does it take to change a light bulb? None. They just make darkness a standard. Let's see.

00:22:03.940 --> 00:22:10.340
A good programmer is someone who always looks both ways before crossing a one-way street.

00:22:10.340 --> 00:22:17.300
See, these are like, once you, once you install PipX and sell PyJokes, these are at your hand.

00:22:17.300 --> 00:22:20.660
And you're like, I'm feeling a little down. What are we going to do? Why do Java programmers

00:22:20.660 --> 00:22:25.500
wear sunglasses? Because they can't see sharp. Huh? So like there's, it just doesn't stop.

00:22:25.500 --> 00:22:26.120
Apparently.

00:22:26.120 --> 00:22:32.820
Well, we don't even have to have anybody submit any jokes for us anymore. We just use these.

00:22:33.020 --> 00:22:36.640
We have the fountain of, the endless fountain of jokes. Although I'm sure there is some limit

00:22:36.640 --> 00:22:40.460
to how many jokes are in there. You can go to their website and actually submit a joke to be

00:22:40.460 --> 00:22:45.120
included in the app. Oh, okay. Which is all good. So I have to make sure I update it every once in a

00:22:45.120 --> 00:22:48.960
moment. Yeah. That's why you need PipX because then you have to do PipX update all and it does it.

00:22:48.960 --> 00:22:54.880
Okay. Cool. Sweet. Anyway, that's our joke. If people can go out there and install PyJokes,

00:22:54.880 --> 00:23:02.160
the package and run it. Although they might not need us anymore, Brian. Yeah, they will. Because they'll need

00:23:02.160 --> 00:23:06.080
our wonderful transitions from one thing to another. That's right. That's right. All right. Well,

00:23:06.080 --> 00:23:09.680
a lot of fun as always and I'll chat with you later. Okay. Bye.

00:23:09.880 --> 00:23:14.400
Thank you for listening to Python Bytes. Follow the show on Twitter via at Python Bytes. That's

00:23:14.400 --> 00:23:21.180
Python Bytes as in B-Y-T-E-S. And get the full show notes at pythonbytes.fm. If you have a news item

00:23:21.180 --> 00:23:25.880
you want featured, just visit pythonbytes.fm and send it our way. We're always on the lookout for

00:23:25.880 --> 00:23:30.920
sharing something cool. On behalf of myself and Brian Okken, this is Michael Kennedy. Thank you for

00:23:30.920 --> 00:23:35.480
listening and sharing this podcast with your friends and colleagues.

