WEBVTT

00:00:00.001 --> 00:00:05.060
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:00:05.060 --> 00:00:09.260
This is episode 79, recorded May 23rd, 2018. I'm Michael Kennedy.

00:00:09.260 --> 00:00:10.160
And I'm Brian Okken.

00:00:10.160 --> 00:00:10.960
Hey, Brian. How are you doing?

00:00:10.960 --> 00:00:11.700
I'm doing great.

00:00:11.700 --> 00:00:15.160
Nice. I think, as always, we've got a bunch of fun stuff to talk about.

00:00:15.160 --> 00:00:17.820
And we wouldn't be doing it without DigitalOcean.

00:00:17.820 --> 00:00:21.840
A couple of reasons, but DigitalOcean is sponsoring this episode and a bunch of the upcoming ones.

00:00:21.840 --> 00:00:23.160
So thank you to DigitalOcean.

00:00:23.860 --> 00:00:30.160
Get $100 off or $100 credit at pythonbytes.fm/DigitalOcean for new customers.

00:00:30.160 --> 00:00:31.480
Tell them, tell you more about that later.

00:00:31.480 --> 00:00:38.300
I would be totally surprised, Brian, if you wanted to cover something about, say, testing or pytest.

00:00:38.300 --> 00:00:43.520
Yeah, yeah. So pytest 3.6.0 just got announced.

00:00:43.520 --> 00:00:46.080
So 360 for pytest.

00:00:46.360 --> 00:00:58.220
And this is like an inside baseball kind of release because there's not a lot that if I think 80% of the people using pytest won't see a difference.

00:00:58.220 --> 00:01:01.920
But, however, this was a big deal for the team.

00:01:01.920 --> 00:01:09.160
Essentially, it's a revamp of the implementation of the marker system and the data type that was used to hold the markers.

00:01:09.160 --> 00:01:11.160
So there is a couple other things.

00:01:11.160 --> 00:01:16.280
That's the big thing that's going on in the 3.6.0 release is reworking of the markers in it.

00:01:16.280 --> 00:01:21.860
And there's a list on their release notes of all the different defects that they fixed with this.

00:01:21.860 --> 00:01:35.240
The takeaway for a lot of people is if you were using, if you're writing a plug-in or something or using the plug-in features and using getmarker to find out which markers are applied to a particular function,

00:01:35.360 --> 00:01:41.600
the getmarker is deprecated, there's a new API, there's itermarkers and getclosestmarker.

00:01:41.600 --> 00:01:45.300
And, yeah, we'll have a link in the show notes to read more on that.

00:01:45.300 --> 00:01:51.680
So most of it's a plug-in writers change, API change, but it's exciting.

00:01:51.680 --> 00:02:00.440
And I'm excited for the team to get that out because kind of like the Django 2 release, it's about maintenance and going forward.

00:02:00.440 --> 00:02:01.880
And so that's great.

00:02:01.880 --> 00:02:06.360
There is one more feature that we, from a couple other things, a breakpoint.

00:02:06.360 --> 00:02:09.920
The pytest is supporting the breakpoint functionality in 3.7.

00:02:09.920 --> 00:02:12.520
And that is brought to you by our friend Anthony Shaw.

00:02:12.520 --> 00:02:13.460
So he put that in.

00:02:13.460 --> 00:02:14.060
Oh, nice.

00:02:14.060 --> 00:02:19.860
Yeah, he's doing a lot of work on Python 3.7 because rumor is he may be doing a course on Python 3.7.

00:02:19.860 --> 00:02:20.860
So awesome.

00:02:20.860 --> 00:02:22.200
He was able to bring it over here.

00:02:22.300 --> 00:02:34.340
And a couple other smaller things like the, apparently, I had never run into this, but if you have an assertion failure on equality and the only thing different is white space, it's kind of hard to tell.

00:02:34.340 --> 00:02:38.300
So they now escape characters too.

00:02:38.300 --> 00:02:42.920
So you can see what the white space difference is a little bit better, which is kind of cool.

00:02:42.920 --> 00:02:43.440
I've never run into that.

00:02:43.440 --> 00:02:44.240
That's a little hard.

00:02:44.240 --> 00:02:44.980
You print it on.

00:02:44.980 --> 00:02:46.080
You're like, those are the same.

00:02:46.080 --> 00:02:47.080
No, no.

00:02:47.080 --> 00:02:49.220
That's two spaces, not one right there.

00:02:49.220 --> 00:02:49.620
Yeah.

00:02:49.620 --> 00:02:53.980
So for the main port, I wanted to get this out to as many people as possible.

00:02:53.980 --> 00:02:59.860
So if you are depending on reading markers in your internal code, pay attention to this.

00:02:59.860 --> 00:03:01.040
So that's it.

00:03:01.120 --> 00:03:04.300
Yeah, it sounds like a nice cleanup of the internal APIs for extension writers.

00:03:04.300 --> 00:03:07.180
And that's always good because that probably means more extensions.

00:03:07.180 --> 00:03:09.160
Extensions are more likely to be built.

00:03:09.160 --> 00:03:09.400
Yep.

00:03:09.400 --> 00:03:09.900
Sounds good.

00:03:09.900 --> 00:03:13.960
So have we talked about GUIs, Python GUIs on this podcast?

00:03:13.960 --> 00:03:15.080
I'm not sure if we have.

00:03:15.080 --> 00:03:15.860
We probably should.

00:03:15.860 --> 00:03:16.580
Yeah.

00:03:16.580 --> 00:03:17.260
We probably should.

00:03:17.260 --> 00:03:17.860
Yeah, let's do that.

00:03:17.860 --> 00:03:21.680
So there's a lot of stuff going on.

00:03:21.680 --> 00:03:27.740
Part of the reason I went on that rant is because stuff needs to be happening there, but also because some things are happening.

00:03:27.900 --> 00:03:33.240
Like we had the WX Python Phoenix release, which is kind of a rebirth of WX Python, which is really great.

00:03:33.240 --> 00:03:36.980
Well, we also have the same thing going on for QT.

00:03:36.980 --> 00:03:40.020
So for a while, there was a sort of a split.

00:03:40.020 --> 00:03:41.940
There was PyQT.

00:03:41.940 --> 00:03:43.160
There was PySide.

00:03:43.160 --> 00:03:44.080
There was PySide2.

00:03:44.080 --> 00:03:45.080
There are all these ways.

00:03:45.080 --> 00:03:47.320
They defended it on different versions of QT.

00:03:47.320 --> 00:03:49.520
And it was kind of just generally a mess.

00:03:49.520 --> 00:03:55.800
So the QT company is now officially making something called QT for Python,

00:03:56.040 --> 00:04:02.600
which as far as I can tell is more or less like a rebirth of PySide2 for what that's worth.

00:04:02.600 --> 00:04:09.500
So it's really nice that the company that makes QT, the cross-platform GUI framework,

00:04:09.500 --> 00:04:11.860
is like really dedicating itself to Python.

00:04:11.860 --> 00:04:12.280
Yeah.

00:04:12.280 --> 00:04:17.400
One of the things that I think is cool about the QT space is they have the QT designer.

00:04:18.120 --> 00:04:23.420
And I think that's really nice and important for, you know, like I have a visual way to design the UI.

00:04:23.420 --> 00:04:27.940
I know you can write code and say the position is 20, 20 and it stretches this wide.

00:04:27.940 --> 00:04:32.360
But like that is not the same as draggy, droppy, press the button.

00:04:32.360 --> 00:04:33.480
You know what I mean?

00:04:33.480 --> 00:04:37.080
So I got a lot of I'm pretty excited about this, let's say.

00:04:37.080 --> 00:04:38.540
So that's really cool.

00:04:38.680 --> 00:04:44.680
They basically are keeping it super similar to the QT C++ API where that makes sense.

00:04:44.680 --> 00:04:50.280
So like if you read documentation about C++, which is the native language for QT,

00:04:50.280 --> 00:04:55.640
if you replace the pointer dereference, so the arrow, the dash arrow,

00:04:55.640 --> 00:04:59.400
to replace that with a dot, you know, that may well be the Python API.

00:04:59.400 --> 00:04:59.860
Hmm.

00:04:59.860 --> 00:05:00.500
Okay.

00:05:00.620 --> 00:05:01.080
Which is good.

00:05:01.080 --> 00:05:06.460
But some of the problem, some of the drawbacks, let's say that are like it doesn't necessarily leverage the Pythonic features.

00:05:06.460 --> 00:05:13.180
So like maybe you call a function to do a thing rather than put a decorator on to something else, things like that.

00:05:13.180 --> 00:05:18.800
One thing that is nice is a lot of these UI frameworks are super painful to install, right?

00:05:18.800 --> 00:05:21.540
You can install them on the system and then they don't work so well.

00:05:22.200 --> 00:05:30.680
Maybe there's like some big long compilation step like WX Python takes forever to pip install it onto Ubuntu.

00:05:30.680 --> 00:05:32.360
The last time I tried doing that.

00:05:32.360 --> 00:05:38.520
So they're planning on shipping a wheels version of QT, which before you had to get like some separate installer or something.

00:05:38.520 --> 00:05:44.580
So that'll be pretty sweet that you'll just be able to pip install your thing and it'll come with the foundational stuff you need.

00:05:44.580 --> 00:05:45.280
That's exciting.

00:05:45.280 --> 00:05:46.320
Yeah, that is pretty cool, right?

00:05:46.320 --> 00:05:54.480
So, I mean, I really hope that the company behind QT putting a big effort into this is going to mean like finally a polished version.

00:05:54.480 --> 00:05:56.780
So we'll see.

00:05:56.780 --> 00:06:00.980
I think the licensing might still be GPL and LGPL.

00:06:00.980 --> 00:06:04.420
So as a combination, take your pick.

00:06:04.420 --> 00:06:08.900
I'm not sure what the variations are exactly there, but I don't know.

00:06:08.900 --> 00:06:11.440
I'd like to see something more permissive, but who knows?

00:06:11.440 --> 00:06:13.560
Still nice to see some progress here.

00:06:13.560 --> 00:06:15.360
So do you know, I was trying to find it.

00:06:15.420 --> 00:06:20.620
Do you know the projected release date for the official QT for Python?

00:06:20.620 --> 00:06:21.380
Or is that?

00:06:21.380 --> 00:06:27.640
They're talking about, so the article I'm linking to, it's a blog post calling Hello QT for Python.

00:06:27.640 --> 00:06:30.280
And they say they're working on a technology preview.

00:06:30.280 --> 00:06:32.900
So that's all I've seen.

00:06:32.900 --> 00:06:37.200
But they don't seem to have any further information that I easily found.

00:06:37.200 --> 00:06:38.320
It may be somewhere else.

00:06:38.940 --> 00:06:45.080
Yeah, so it'll be, it does say it'll be available under GPL, LGPL, and commercial licenses.

00:06:45.080 --> 00:06:51.000
It talks about when development started and stuff like that, but it doesn't seem to have like a release date.

00:06:51.000 --> 00:06:52.140
So there it is.

00:06:52.340 --> 00:06:52.960
All right, cool.

00:06:52.960 --> 00:06:53.260
Nice.

00:06:53.260 --> 00:07:01.500
Well, speaking of sneak peeks on things, we've got, we've talked about MongoDB, the 4.0 release that's coming.

00:07:01.500 --> 00:07:05.140
We've talked about that before, but now you can play with it.

00:07:05.340 --> 00:07:11.620
So the 4.0, 4.0, RCA zero is now available.

00:07:11.620 --> 00:07:13.460
It's the very zeroth version of the RCA.

00:07:13.460 --> 00:07:13.780
Yes.

00:07:13.780 --> 00:07:14.900
There's a lot of zeros there.

00:07:14.900 --> 00:07:15.600
Yeah.

00:07:15.680 --> 00:07:23.880
So that is out and ready for testing so people can actually get their hands on it and try working the, again, the big news for this.

00:07:23.880 --> 00:07:29.740
There's a lot of new features, but the big news is ACID transactions and multi-document.

00:07:29.740 --> 00:07:31.840
Multi-document ACID transactions.

00:07:31.840 --> 00:07:33.580
Yes, that's a pretty big deal.

00:07:33.580 --> 00:07:35.820
And I actually don't know if this is a big deal.

00:07:35.820 --> 00:07:40.860
Well, there's a lot of things here, but non-blocking secondary reads, I don't even know if I know what that means.

00:07:40.860 --> 00:07:49.180
So the idea with the non-blocking secondary reads is one of the ways you can set up MongoDB is in a, what's called a replica set.

00:07:49.180 --> 00:07:53.260
So there's like a primary thing that you read and write to.

00:07:53.260 --> 00:07:59.200
And then there are other ones which are constantly just staying in sync with that server.

00:07:59.200 --> 00:07:59.660
Okay.

00:07:59.660 --> 00:08:00.940
There's a couple of benefits to that.

00:08:00.940 --> 00:08:04.320
Like you could put them into, say, different data centers.

00:08:04.320 --> 00:08:12.040
The primary thing is if like for some reason the main server, the primary server fails, it'll automatically switch to one of the secondary ones.

00:08:12.040 --> 00:08:16.760
So it's kind of like a failover redundancy sort of thing as well.

00:08:17.240 --> 00:08:28.380
But you can configure it in a way that you can say, I would like to read from the non-primary database as a way of like adding read scalability.

00:08:28.380 --> 00:08:35.780
So like if I have five servers in the cluster, if I don't do anything, I can only talk to the one, the primary one as a single server.

00:08:36.340 --> 00:08:39.040
And I get no boost of concurrency, let's say.

00:08:39.040 --> 00:08:47.780
But if you say, I want to read from the others, well, then all of a sudden there's like, you're sort of farming that out across six different, you know, servers, primary plus the other five or whatever.

00:08:47.780 --> 00:08:48.940
Right.

00:08:48.940 --> 00:08:52.140
That used to block for consistency reasons.

00:08:52.140 --> 00:08:57.040
And now apparently they found a different way to ensure consistency, maybe because of the transactions.

00:08:57.040 --> 00:09:01.700
Anyway, that's a long, long explanation for what I think that means.

00:09:01.700 --> 00:09:03.660
That does make sense.

00:09:03.660 --> 00:09:04.260
And that's cool.

00:09:04.760 --> 00:09:13.280
At least I knew, I know that there are a lot of people that choose a SQL database over a document database, mostly because of the lack of transactions.

00:09:13.280 --> 00:09:17.100
And so that's one of the reasons why I brought this up, because I'm excited about transactions.

00:09:17.100 --> 00:09:21.040
Yeah, I think that's super exciting as well for the reason you just said.

00:09:21.040 --> 00:09:32.980
What I do think is interesting is as people get to more serious applications, they get to a place where often they give up transactions anyway for sort of concurrency.

00:09:33.940 --> 00:09:44.460
Right. Like, you know, if I go to Amazon, it's not like, and I go to order something, it's not just going to lock all of Amazon while I interact with, you know, my order.

00:09:45.400 --> 00:09:47.440
What it's going to do is like, say, we'll place the order.

00:09:47.440 --> 00:09:55.020
And if it happens to be that actually the thing you ordered sort of sold out just at the moment that you pressed it, you'll get like a message or something.

00:09:55.020 --> 00:09:57.740
Right. Like, hey, sorry, we couldn't fulfill it or whatever.

00:09:57.740 --> 00:09:58.520
Here's your refund.

00:09:58.680 --> 00:10:03.360
So there's a lot of these sort of compensation things that get put into like high scalability stuff.

00:10:03.360 --> 00:10:06.080
I just grabbed Amazon as an example.

00:10:06.080 --> 00:10:07.140
I don't really know how they work.

00:10:07.140 --> 00:10:15.000
But, you know, there's a lot of these large sites that sort of don't use full on transactions in the same sense that other ones do.

00:10:15.100 --> 00:10:16.060
So it's pretty interesting.

00:10:16.060 --> 00:10:22.920
It's interesting in that I don't really think transactions are something I'm going to be using in any of my sites.

00:10:22.920 --> 00:10:27.760
They just don't really seem to be necessary with a few possible exceptions.

00:10:28.020 --> 00:10:29.980
I'll get to what those might be in a little bit.

00:10:29.980 --> 00:10:36.680
But, yeah, I think you're right that people, when people feel they need it, or there are a few situations where you really do need it.

00:10:36.680 --> 00:10:37.540
This is super interesting.

00:10:37.540 --> 00:10:46.740
One other thing that's kind of cool that's not a 4.0 thing, but it's in a 3.6, which is the one right before this, as far as I know, is actually the streaming API.

00:10:47.640 --> 00:10:59.380
So if I've got, like, say, WebSockets or something that I want notification of, like, push of change to the database, you could, like, run a query and say, I want to stream new results that hit this query.

00:10:59.380 --> 00:11:07.140
And then as stuff is inserted to the database that matches, it'll git pushed out to you instead of re-polling the database.

00:11:07.140 --> 00:11:10.640
So suppose I connect to a chat server and I set up WebSockets.

00:11:10.640 --> 00:11:20.340
So you could, like, literally subscribe to, like, these change streams on, like, the conversation record, and you would just get them pushed back down instantly without any polling end-to-end.

00:11:20.340 --> 00:11:20.780
Okay.

00:11:20.780 --> 00:11:21.400
That's pretty cool.

00:11:21.400 --> 00:11:24.660
It's kind of like RethinkDB's feature, primary feature was.

00:11:24.660 --> 00:11:38.300
I guess where I would probably use transactions a lot, and it's not really transactions, but because of transactions you can do this, is I believe 4.0 also includes rollback checkpoints.

00:11:38.520 --> 00:11:54.300
For instance, you can grab a replica of a big database or something, and, like, for instance, like, during testing, you can have a starting point, do a whole bunch of transactions on it, query it, and then roll back to a previous state.

00:11:54.300 --> 00:11:55.420
Yeah, that is pretty cool.

00:11:55.420 --> 00:11:59.860
And I think maybe that secondary non-blocking read stuff has to do with that as well.

00:11:59.860 --> 00:12:01.740
You sort of begin a transaction and you start reading.

00:12:01.740 --> 00:12:02.180
Yeah.

00:12:02.180 --> 00:12:02.620
Anyway.

00:12:02.620 --> 00:12:03.400
Yeah, yeah, very cool.

00:12:03.400 --> 00:12:05.520
So I'm glad to see that that's coming along.

00:12:05.520 --> 00:12:12.880
I feel like the NoSQL document database world and the relational world are kind of, like, merging.

00:12:12.880 --> 00:12:16.740
Like, they're getting closer to each other in a lot of ways, right?

00:12:16.740 --> 00:12:19.260
We have Postgres getting JSON stuff.

00:12:19.260 --> 00:12:21.280
We get MongoDB getting transactions.

00:12:21.280 --> 00:12:25.240
And they're all kind of sort of growing and intersecting in interesting ways.

00:12:25.240 --> 00:12:27.920
Speaking of interesting, DigitalOcean's pretty interesting.

00:12:27.920 --> 00:12:29.380
They're doing a lot of good stuff for us.

00:12:29.380 --> 00:12:36.380
So, like, the files that you're getting when you download the podcast, the website, all that stuff is running on DigitalOcean servers.

00:12:36.380 --> 00:12:39.320
And I'm a super, super happy customer of theirs.

00:12:39.320 --> 00:12:42.180
And they're sponsoring the show as well.

00:12:42.180 --> 00:12:49.340
So one of the things that's cool, maybe I mentioned this a while ago, Brian, is their sort of one-click app server configuration.

00:12:49.340 --> 00:13:01.060
So if I want to create, say, a server with MongoDB all configured, I can go there and say, create me a droplet with this version of Mongo or with this other web framework set up.

00:13:01.060 --> 00:13:07.880
And it'll automatically create all the server configuration and have everything set up and ready to go within, like, 60 seconds.

00:13:07.880 --> 00:13:09.120
So really, really nice.

00:13:09.800 --> 00:13:17.260
And probably the biggest thing, if you are not using DigitalOcean, you can get a $100 credit by going to pythonbytes.fm/DigitalOcean.

00:13:17.260 --> 00:13:18.500
So that's a pretty good deal.

00:13:18.500 --> 00:13:19.460
Yeah, that's great.

00:13:19.460 --> 00:13:19.980
Yeah, awesome.

00:13:19.980 --> 00:13:28.460
So if you're looking for a nice, affordable, fair, and very fast server hosting, check them out, pythonbytes.fm/DigitalOcean.

00:13:28.460 --> 00:13:32.240
So, Michael, have we talked about PipInf in the show before?

00:13:32.240 --> 00:13:35.300
If I recall correctly, I think we were confused about PipInf.

00:13:35.300 --> 00:13:36.780
I was confused about PipInf.

00:13:37.300 --> 00:13:50.920
Basically, you know, or surprised, maybe is the right word, that PipInf became sort of the officially recommended way of the packaging authority in Python to manage packages.

00:13:50.920 --> 00:13:52.180
And I'm like, oh, when did that happen?

00:13:52.180 --> 00:13:53.140
That was pretty interesting.

00:13:53.140 --> 00:13:55.280
So there's been a lot of debate.

00:13:55.280 --> 00:13:58.000
And you said there was kind of a coarse Reddit thread.

00:13:58.000 --> 00:13:59.940
Like, imagine Reddit was unkind to people.

00:13:59.940 --> 00:14:01.020
Could you imagine?

00:14:01.020 --> 00:14:02.620
Right, yeah.

00:14:02.620 --> 00:14:05.100
That's unfortunate.

00:14:05.100 --> 00:14:07.620
But I think it's too bad that that kind of stuff happens.

00:14:07.620 --> 00:14:11.340
And maybe we should all just speak up like, hey, like, that comment is out of bounds, right?

00:14:11.340 --> 00:14:13.340
Anyway, I'm not going to link to it.

00:14:13.340 --> 00:14:14.120
I don't want to encourage it.

00:14:14.120 --> 00:14:19.180
But I do want to link to this thing called PipInf Review after using it in production.

00:14:19.180 --> 00:14:24.560
So there's this team that used PipInf in production since November 2017.

00:14:24.560 --> 00:14:25.240
So what is that?

00:14:25.240 --> 00:14:26.020
A little over half a year?

00:14:26.020 --> 00:14:27.580
Maybe almost exactly half a year.

00:14:28.540 --> 00:14:32.060
And this sort of comes, they talk about, this is what worked for us.

00:14:32.060 --> 00:14:34.320
This is what wasn't working so well for us.

00:14:34.320 --> 00:14:44.320
And in the end, they're like, at no point did anyone in the team ever mention getting read a PipInf, which actually is a pretty strong statement, apparently.

00:14:44.320 --> 00:14:46.900
So if no, we said, no, we've got to get rid of this.

00:14:46.900 --> 00:14:49.380
It's just like, ah, it's not quite working in some way.

00:14:49.380 --> 00:14:50.840
So here, I'll give you the rundown.

00:14:51.380 --> 00:14:53.680
The article starts off pretty accurately.

00:14:53.680 --> 00:14:56.080
It says, the current state of Python's packaging is awful.

00:14:56.080 --> 00:14:58.340
I don't think anyone would disagree with that.

00:14:58.340 --> 00:15:01.360
The problem is recognized, and there are many attempts to solve the mess.

00:15:01.360 --> 00:15:04.380
And PipInf was the first, and it did get a lot of traction.

00:15:04.380 --> 00:15:06.600
But not everyone loved it.

00:15:06.600 --> 00:15:12.780
And he said, one of the areas where PipInf can be a challenge is for libraries.

00:15:12.780 --> 00:15:19.700
So PipInf is more built for managing the dependency of an application.

00:15:20.040 --> 00:15:24.300
But if you're a library author, that doesn't necessarily make a lot of sense.

00:15:24.300 --> 00:15:25.800
Yeah, I'm on the fence on that.

00:15:25.800 --> 00:15:26.040
Sure.

00:15:26.040 --> 00:15:27.100
Sorry, I forgot the guy's name.

00:15:27.100 --> 00:15:34.460
The reason that he said this was basically supporting multiple environments goes against PipInf's philosophy.

00:15:34.460 --> 00:15:35.640
Right?

00:15:35.640 --> 00:15:40.980
So they want a deterministic, reproducible application environment.

00:15:41.880 --> 00:15:54.100
But, you know, if you're going to do that for, say, PyPy and Python 2.7 and Python 3.6 or whatever, well, then it doesn't really work, potentially.

00:15:54.100 --> 00:15:54.800
Right?

00:15:54.800 --> 00:15:58.460
Because it's, you know, once exact hashes of the exact libraries.

00:15:58.460 --> 00:16:01.280
And if those don't match, then you're out of luck.

00:16:01.280 --> 00:16:01.560
Right?

00:16:01.760 --> 00:16:02.960
So that's a challenge.

00:16:02.960 --> 00:16:04.380
I think that's the primary challenge.

00:16:04.380 --> 00:16:04.700
Yeah.

00:16:04.700 --> 00:16:05.100
Yeah.

00:16:05.100 --> 00:16:07.080
And I agree with that.

00:16:07.080 --> 00:16:09.820
And it's just partly I think it's a miscommunication.

00:16:09.820 --> 00:16:15.800
PipInf was never intended to work for every library sort of use.

00:16:15.800 --> 00:16:20.180
Because libraries, by definition, they don't have their dependencies pinned.

00:16:20.940 --> 00:16:23.620
It's at the application level where you pin your dependencies.

00:16:23.620 --> 00:16:26.100
So you say there's this miscommunication.

00:16:26.100 --> 00:16:27.760
And I definitely think you're right.

00:16:27.760 --> 00:16:34.060
Because when I looked at PipInf on GitHub, I really saw that as, you know, the statement.

00:16:34.060 --> 00:16:40.240
PipInf is the officially recommended tool for managing application dependencies from PyPA.

00:16:40.240 --> 00:16:46.540
As PipInf is the officially recommended tool for managing Python dependencies.

00:16:46.540 --> 00:16:50.740
Where really, like, the application should have been bolded, underlined in all caps.

00:16:51.360 --> 00:16:52.740
Something to that effect, right?

00:16:52.740 --> 00:16:53.200
Right.

00:16:53.200 --> 00:16:54.240
So pretty interesting.

00:16:54.240 --> 00:16:59.660
But, yeah, I think, you know, generally their review of it was good.

00:16:59.660 --> 00:17:01.460
So I'll try to give you the quick rundown here.

00:17:01.460 --> 00:17:08.420
So pip file and pip file.lock really are superiority to requirements.txt by a ton.

00:17:08.420 --> 00:17:14.440
And the guy said, hey, I first disliked having FlakeAid and a security checking tool all built into one thing.

00:17:14.440 --> 00:17:15.580
But I think it's actually great.

00:17:15.580 --> 00:17:18.800
Installing from private repositories works really well.

00:17:18.800 --> 00:17:20.660
Creating a new pip file is easy.

00:17:20.660 --> 00:17:28.840
No problems introducing PipInf to new users or installing from a mixture of indexes and Git repos.

00:17:28.840 --> 00:17:30.240
That was all really good.

00:17:30.240 --> 00:17:36.380
Virtual Enf or virtual Envy is much easier to get into and understand now.

00:17:36.380 --> 00:17:37.140
Let's see.

00:17:37.180 --> 00:17:40.460
Dependencies can be easily installed into a system like Docker.

00:17:40.460 --> 00:17:44.560
And finally, like I said, no one proposed getting rid of it.

00:17:44.560 --> 00:17:49.340
They were just a few edge cases, mostly around the library side of things.

00:17:49.340 --> 00:17:51.020
So, yeah, pretty good.

00:17:51.080 --> 00:17:55.660
But if you're thinking about using PipInf in production, you know, check this article out.

00:17:55.660 --> 00:17:59.660
It's kind of got some good discussion and a lot of follow-up as well.

00:17:59.800 --> 00:18:18.920
I want to add that I was, for library development, I am going to start, I haven't been using it, but I'm going to start using it, not from the standpoint of handling all of the dependencies for the library dependencies, but more because the setup.py does that.

00:18:18.980 --> 00:18:23.540
But the transitive dependencies and also mostly the developer dependencies.

00:18:23.540 --> 00:18:32.100
So, PipInf has a developer feature where you can either create the environment for running or create the environment for development, and those can be different.

00:18:32.100 --> 00:18:38.840
And traditionally, we've had a requirements underscore dev or something like that, but it's just you kind of have to know it's there.

00:18:38.840 --> 00:18:41.740
So, for that reason, I'm going to try PipInf.

00:18:41.840 --> 00:18:52.940
The other reason is the --run flag to be able to run in the environment without activating the environment is going to be useful for things like Jenkins runs and things like that.

00:18:52.940 --> 00:18:54.320
I'm going to give it a shot.

00:18:54.320 --> 00:18:57.420
I don't have a report yet, but I'm going to start using this as well.

00:18:57.420 --> 00:18:58.160
Yeah, sounds good.

00:18:58.160 --> 00:19:00.280
You're going to have to give us a report after a while, though.

00:19:00.280 --> 00:19:02.000
Yeah, definitely.

00:19:02.000 --> 00:19:03.040
Nice.

00:19:03.040 --> 00:19:03.720
All right.

00:19:03.720 --> 00:19:10.960
So, you've got some stuff for GitHub Flow, the whole sort of working in GitHub, PRs, submitting issues, open source goodness, yeah?

00:19:11.080 --> 00:19:19.580
I've got a development team that's migrating to both a lot of changes in our development workflow, but one of the things is using Git more.

00:19:19.580 --> 00:19:33.540
And we're using GitLab at work, but this is – so a lot of these – some of these – I didn't use GitHub for open source projects, of course, but here's an article called 15 Tips to Enhance Your GitHub Workflow or GitHub Flow.

00:19:33.540 --> 00:19:37.440
And a lot of these apply to both Git and GitHub and GitLab.

00:19:37.440 --> 00:19:38.940
Some of them are GitHub only.

00:19:38.940 --> 00:19:49.500
But there's some things that you just sort of need to know about the culture around Git and GitHub and GitLab and everything that you don't actually – it isn't obvious from the start.

00:19:49.640 --> 00:19:52.380
So, I like having an article that calls out a lot of these things.

00:19:52.380 --> 00:20:05.880
Like, one of the talks about – I'm not using projects yet, but I'd like to try to use projects to prioritize issues and maybe track progress and plan for what's going in which release and stuff.

00:20:05.880 --> 00:20:08.420
Maybe if that's built in, might as well try it.

00:20:08.420 --> 00:20:10.160
I'm using tags on issues.

00:20:10.420 --> 00:20:11.780
I've started using that.

00:20:11.780 --> 00:20:19.440
I know we have tags on some – a lot of open source projects like, what is it, Help Wanted and things like that.

00:20:19.440 --> 00:20:20.620
There's some standard ones.

00:20:21.220 --> 00:20:22.240
Getting to know those are good.

00:20:22.240 --> 00:20:27.020
Templates are something that really – so a lot of the stuff isn't stuff I know about yet.

00:20:27.020 --> 00:20:28.920
It's stuff I want to start using.

00:20:28.920 --> 00:20:40.420
Templates are something – like if somebody does a pull request against your project, having some predefined stuff filled in for them to know what to fill in.

00:20:40.760 --> 00:20:44.640
And the default template is sometimes kind of lame for certain projects.

00:20:44.640 --> 00:20:50.440
Like, I've got a library that it – the default one asks for, like, operating system.

00:20:50.440 --> 00:20:52.460
Well, I don't really care.

00:20:52.460 --> 00:20:54.620
It's not going to affect the library I'm using.

00:20:54.620 --> 00:21:01.980
If the issue is really hard to reproduce, I'll ask somebody and say, hey, this is – I'm trying to reproduce it here, and I can't reproduce it.

00:21:01.980 --> 00:21:03.920
Anyway, there's a whole bunch of great things.

00:21:04.120 --> 00:21:10.440
I squashed down – one of the things I didn't know about at first was squashing pull requests and squashing commits.

00:21:10.440 --> 00:21:17.460
That's something that is totally foreign to – if you're coming to get from other revision control systems.

00:21:17.460 --> 00:21:20.380
So there's just a good list of a whole bunch of goodies.

00:21:20.380 --> 00:21:21.400
Yeah, that's really cool.

00:21:21.400 --> 00:21:26.380
And I like the automated tests and checks on pull requests.

00:21:26.380 --> 00:21:27.400
Like, that's really nice.

00:21:27.400 --> 00:21:37.400
Like, if I do a PR to someone else's repo and, like, my PR automatically gets tested, like, flakated or whatever they're, you know, wanting to have checked, right?

00:21:37.400 --> 00:21:41.720
That can tell me right away before they get back to me, oh, there's a step I missed.

00:21:41.720 --> 00:21:42.820
Let me fix that.

00:21:42.820 --> 00:21:48.140
And then, you know, resubmit the PR or just update the PR and then have it rerunning.

00:21:48.140 --> 00:21:49.300
Okay, now everything's good.

00:21:49.300 --> 00:21:56.900
And I'm sure that on the other side of things, if someone is running a project and it's already passing all that before they even get to it, they can take it more seriously.

00:21:57.160 --> 00:22:01.200
Yeah, and that helps you with even, you know, you're splitting up branches.

00:22:01.200 --> 00:22:08.160
And so you can have tests running on multiple branches, which is nice if you have a long-running development feature.

00:22:08.160 --> 00:22:18.960
And then one of the things I want to play with here is there's a discussion about pre-commit hooks and hooking things like black up to your pre-commit hook to make sure the styling is correct.

00:22:18.960 --> 00:22:19.460
Oh, nice.

00:22:19.460 --> 00:22:21.400
Yeah, instead of asking, just change it.

00:22:21.400 --> 00:22:21.900
Yeah.

00:22:21.900 --> 00:22:23.420
Your styling is wrong.

00:22:23.420 --> 00:22:24.220
You need to break that line.

00:22:24.220 --> 00:22:24.520
Fine.

00:22:24.520 --> 00:22:25.280
We did that for you.

00:22:25.280 --> 00:22:26.000
Yeah.

00:22:26.560 --> 00:22:27.260
That's pretty cool.

00:22:27.260 --> 00:22:28.140
All right.

00:22:28.140 --> 00:22:31.280
So the last one I got, Brian, is just a feel-good story.

00:22:31.280 --> 00:22:34.760
Python versus legacy Python, that type of thing.

00:22:34.760 --> 00:22:37.380
So Pandas goes Python only.

00:22:37.380 --> 00:22:38.960
No more legacy Python for Pandas.

00:22:38.960 --> 00:22:39.420
Wow.

00:22:39.420 --> 00:22:40.180
That's cool.

00:22:40.180 --> 00:22:41.080
That's a pretty big deal.

00:22:41.080 --> 00:22:45.660
Like, Pandas in the data science space is one of the true foundational items.

00:22:45.660 --> 00:22:49.160
Maybe it's more popular than any of the others.

00:22:49.280 --> 00:22:51.480
I feel like people almost always start with Pandas.

00:22:51.480 --> 00:22:55.220
And then once they get their data processed, they, like, move to another library.

00:22:55.220 --> 00:22:58.800
So Pandas going Python 3 only is really, really awesome.

00:22:58.980 --> 00:23:00.640
I got this off of Twitter from Randy Olson.

00:23:00.640 --> 00:23:01.600
Thank you for that.

00:23:01.600 --> 00:23:04.300
And basically, they're following NumPy's lead.

00:23:04.300 --> 00:23:06.520
Remember, NumPy is going Python 3 only.

00:23:06.520 --> 00:23:12.500
So officially starting January 1st, 2019, which is not that far away.

00:23:12.500 --> 00:23:13.520
Seven months-ish?

00:23:13.520 --> 00:23:14.120
Six months?

00:23:14.120 --> 00:23:17.080
Pandas will drop support for legacy Python.

00:23:17.080 --> 00:23:20.440
And this includes no backports of security or bug fixes.

00:23:20.880 --> 00:23:23.160
The final release will be the day before.

00:23:23.160 --> 00:23:25.520
And that one's going to support Python 2.

00:23:25.520 --> 00:23:27.100
And we're just going to leave it there, apparently.

00:23:27.100 --> 00:23:27.960
Yeah.

00:23:27.960 --> 00:23:34.400
So I feel like data science has got a little bit of an edge on the Python 3 story for everyone.

00:23:34.400 --> 00:23:47.360
And partly because they've come into the ecosystem as a large group more recently than, say, the web developers or the automator folks who have been around for a long time.

00:23:47.500 --> 00:23:50.960
Like, the data science stuff has really exploded 2012 and onward.

00:23:50.960 --> 00:23:53.600
So it was a slightly easier choice, I think.

00:23:53.600 --> 00:23:54.360
Yeah, I think so.

00:23:54.360 --> 00:23:54.740
Yeah.

00:23:54.740 --> 00:23:55.240
Pretty cool.

00:23:55.240 --> 00:23:56.020
All right.

00:23:56.020 --> 00:23:57.020
Well, that's it for our news.

00:23:57.020 --> 00:23:58.180
Anything personal you want to share?

00:23:58.180 --> 00:23:58.820
No.

00:23:58.820 --> 00:24:02.160
I'm just excited to get back to, like, podcasting and stuff.

00:24:02.160 --> 00:24:02.740
It's been good.

00:24:02.740 --> 00:24:03.120
I know.

00:24:03.120 --> 00:24:06.600
It was a lot of fun to do the live one, though, at PyCon, right?

00:24:06.600 --> 00:24:08.060
Like, nobody cheered for us today.

00:24:08.060 --> 00:24:10.120
Not the word anyway, right?

00:24:10.120 --> 00:24:12.140
It was so fun to just be in the eye and get the...

00:24:12.140 --> 00:24:12.360
Yeah.

00:24:12.360 --> 00:24:14.060
And, like, nobody laughed at my jokes.

00:24:14.060 --> 00:24:14.600
Yeah.

00:24:14.600 --> 00:24:16.220
Maybe they did.

00:24:16.220 --> 00:24:17.060
We'll just never know.

00:24:17.260 --> 00:24:18.500
Maybe we need, like, a sound.

00:24:18.500 --> 00:24:18.920
Yeah.

00:24:18.920 --> 00:24:20.460
Like, one of those fake audience tracks.

00:24:20.460 --> 00:24:22.380
No, that'll take away from the real ones.

00:24:22.380 --> 00:24:23.720
We'll do some more live ones.

00:24:23.720 --> 00:24:24.560
We're talking about it, right?

00:24:24.560 --> 00:24:25.320
Yeah, definitely.

00:24:25.320 --> 00:24:26.520
It was so fun.

00:24:26.520 --> 00:24:27.220
We want to do more.

00:24:27.220 --> 00:24:27.500
Yeah.

00:24:27.500 --> 00:24:28.240
Maybe we can do some more.

00:24:28.240 --> 00:24:28.940
We'll figure that out.

00:24:28.940 --> 00:24:30.740
So are you excited?

00:24:30.740 --> 00:24:32.740
It's GDPR Eve.

00:24:32.740 --> 00:24:33.100
Yeah.

00:24:33.100 --> 00:24:34.040
The only one...

00:24:34.040 --> 00:24:34.800
Well, yeah.

00:24:34.800 --> 00:24:36.940
I don't really know how that affects me.

00:24:36.940 --> 00:24:42.100
But I'm telling people that's why I forget their name so quickly is because I'm complying with GDPR.

00:24:42.100 --> 00:24:42.760
Oh, man.

00:24:42.920 --> 00:24:46.080
I have very mixed feelings about GDPR.

00:24:46.080 --> 00:24:50.100
Like, I'm a fan of privacy and respecting data stuff.

00:24:50.100 --> 00:24:54.880
I'm not a fan of some of the ways in which they're going about it.

00:24:54.880 --> 00:25:00.380
I mean, like, it's a tech requirement written by non-technical people, for starters.

00:25:00.380 --> 00:25:04.640
Do you have to change, like, for instance, the courses site of yours?

00:25:04.640 --> 00:25:05.560
We have to.

00:25:05.560 --> 00:25:10.560
I've been doing nothing but 10 hours a day of GDPR programming all week.

00:25:10.560 --> 00:25:11.140
Oh, geez.

00:25:11.140 --> 00:25:11.440
Yeah.

00:25:11.440 --> 00:25:12.040
And I'm not done.

00:25:12.040 --> 00:25:13.040
I got one or two more days.

00:25:13.040 --> 00:25:18.740
And what drives me crazy about this is I'm an American company, 100% in America.

00:25:19.740 --> 00:25:26.560
And, you know, like, that Europe has these rules that apply to us, which it's not about Europe or America.

00:25:26.560 --> 00:25:31.740
Like, what if India decides later that they have other rules that are inconsistent with what I've done for GDPR?

00:25:31.740 --> 00:25:33.820
And then Brazil has other...

00:25:33.820 --> 00:25:41.900
Like, I just think it's kind of crazy to say, like, lawmakers in one country can, like, impose their will on all of the world through these laws.

00:25:41.900 --> 00:25:42.540
So it's kind of funky.

00:25:42.540 --> 00:25:45.480
But I'm going to do it because they pretty much have to.

00:25:45.480 --> 00:25:58.440
So basically, the reason I'm throwing this out there is if you run a site where you've got, like, say, a mailing list or people buy stuff or you collect user data, just be sure to be really careful and look into this.

00:25:58.900 --> 00:26:04.720
And also, we talked about environments, and we talked about pip-emf and various other bits of packaging.

00:26:04.720 --> 00:26:11.100
So I just want to give a quick shout-out to the XKCD Python environment cartoon, which came out a few weeks ago.

00:26:11.100 --> 00:26:15.100
So that would be xkcd.com slash 1987.

00:26:15.100 --> 00:26:19.020
It's just about the sort of madness.

00:26:19.020 --> 00:26:24.740
So my Python environment has become so degraded that my laptop has been declared a super fun site.

00:26:24.740 --> 00:26:27.400
It's got homebrew for Python.

00:26:27.400 --> 00:26:29.280
It's got the OS Python Anaconda.

00:26:29.280 --> 00:26:32.800
It's got pip, another pip, easy install.

00:26:32.800 --> 00:26:34.660
Okay.

00:26:34.660 --> 00:26:36.020
It's pretty good, right?

00:26:36.020 --> 00:26:36.600
Yeah.

00:26:36.600 --> 00:26:36.880
Yeah.

00:26:36.880 --> 00:26:45.960
I think we'll probably try to – I'm going to link to the – Kenneth Reitz's – I should just stop trying to pronounce names.

00:26:45.960 --> 00:26:53.080
His PyCon talk because there was a lot of stuff in there about, like, the history of packaging that I didn't know about.

00:26:53.080 --> 00:26:54.700
So it's a good listen.

00:26:54.700 --> 00:26:56.200
Yeah, you should definitely link to that.

00:26:56.200 --> 00:26:56.600
That's awesome.

00:26:57.160 --> 00:26:57.460
All right.

00:26:57.460 --> 00:27:00.320
Well, thank you, Kenneth, for working on PipEmpf.

00:27:00.320 --> 00:27:03.780
And thank you, Brian, for sharing everything with all of our listeners.

00:27:03.780 --> 00:27:04.280
Thank you.

00:27:06.280 --> 00:27:08.000
Thank you for listening to Python Bytes.

00:27:08.000 --> 00:27:10.580
Follow the show on Twitter via at Python Bytes.

00:27:10.580 --> 00:27:13.460
That's Python Bytes as in B-Y-T-E-S.

00:27:13.460 --> 00:27:16.900
And get the full show notes at pythonbytes.fm.

00:27:16.900 --> 00:27:21.240
If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

00:27:21.240 --> 00:27:23.920
We're always on the lookout for sharing something cool.

00:27:23.920 --> 00:27:27.320
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:27:27.320 --> 00:27:30.940
Thank you for listening and sharing this podcast with your friends and colleagues.

