Weekly Report 2021, August 16 - 22

This week my family and I visited the Polish seaside. Since I’m admittedly not a big fan of doing nothing at the beach for 8+ hours a day for a week, I decided to just keep working for that week. I figured that since I was already remote, being a little more remote this week won’t make much difference.

This turned out to be true to an extent. I feel like I got what I wanted from the trip, and so did the fam. My work output’s been similar to previous weeks, with the following caveats:

  • I had more interruptions than usual which made coding less feasible, so I focused on code review instead;
  • instead of working within a single time block, I opted for splitting work into two halves each day: morning before lunch, and evening after kids were asleep;
  • I took the last day at the seaside actually off (working on Sunday after returning home).

Stats look as follows:

  • issues: 12 closed;
  • PRs: 3 authored, 57 closed, 7 reviewed.

Highlights

Back in 2017 I gave a lightning talk about how you should be running Python with warnings enabled:

Since then many things changed, but some things still hold true: there will always be more DeprecationWarnings, and that you’re not running Python with warnings. But you should.

In particular, one large round of API changes coming in Python 3.10 is the removal of the explicit loop= parameter in all public asyncio APIs (see “What’s new in Python 3.10” for the gist, and BPO-34728, BPO-36373 and BPO-42392 for details).

Unfortunately, while the loop= parameter was deprecated all the way back in Python 3.8, the relevant warnings for asyncio.gather turned out to be only emitted in some unlikely scenarios. Sam Bull discovered it and fixed it so now the deprecations should be more chatty:

I bring this up not so much as a technical achievement but to raise awareness. This will be released as part of Python 3.9.7 next Monday, August 30th. I’ll be highlighting the change in the release notes as well.

More chatty warnings also meant that now unit tests started raising them. To keep things in check, I added a new facility to our test.support package which allows silencing warnings in bulk for use cases where a context manager isn’t very idiomatic to use. I gotta say I’m pretty fond of how declarative the ignores look.

Returning values from test methods is deprecated now as well

If you accidentally put a yield expression in a test method, it will always appear as passing but won’t actually execute any test code. Other return values might also hide bugs in your tests: why would you return a value that isn’t None from them anyway?

So starting with Python 3.11 this kind of usage will emit deprecation warnings. See BPO-41322 for details.

Where were you anyway?

We spent the week in Sarbinowo, a village in Western Pomerania. It used to be a quiet alternative to big seaside cities in Poland. Not so anymore! Fortunately, with kilometers upon kilometers of sandy beaches, it was easy to find a spot for yourself… or to keep walking:

Can you spot the day off? 😆 In case you’re wondering, it was raining most of Tuesday.

Plans for next week

Python Github PR and commit stats gathering was on hold this week due to requiring better Internet access than I had this week. I will be returning to this full force next week.

Detailed Log

Monday

Issues:

PRs:

Tuesday

Issues:

PRs:

Wednesday

Issues:

PRs:

Thursday

Issues:

PRs:

Friday

Day off at the beach.

Sunday

Don’t worry, I won’t be making this a habit. I’m just covering for Friday here.

Issues:

PRs:

#Python/Developer-in-Residence