Python Bytes: #420 90% Done in 50% of the Available Time
<strong>Topics covered in this episode:</strong><br> <ul> <li><strong><a href="https://peps.python.org/pep-0772/?featured_on=pythonbytes">PEP 772 – Packaging governance process</a></strong></li> <li><strong><a href="https://www.mongodb.com/blog/post/mongodb-django-backend-now-available-public-preview?utm_source=www.pythonweekly.com&utm_medium=newsletter&utm_campaign=python-weekly-issue-687-february-13-2025&_bhlid=ac970bf5150af48b53b11f639dd520db04c9a2aa&featured_on=pythonbytes">Official Django MongoDB Backend</a> Now Available in Public Preview</strong></li> <li><a href="https://qntm.org/devphilo?featured_on=pythonbytes"><strong>Developer Philosophy</strong></a></li> <li><strong><a href="https://docs.python.org/release/3.13.2/whatsnew/changelog.html#python-3-13-2">Python 3.13.2</a> released</strong></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=CW4mZ3XNfY8' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="420">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/?featured_on=pythonbytes"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course?featured_on=pythonbytes"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/mkennedy.codes?featured_on=pythonbytes"><strong>@mkennedy.codes</strong></a> <strong>(bsky)</strong></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/brianokken.bsky.social?featured_on=pythonbytes"><strong>@brianokken.bsky.social</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/pythonbytes.fm"><strong>@pythonbytes.fm</strong></a> <strong>(bsky)</strong></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually <strong>Monday</strong> at 10am PT. Older video versions available there too.</p> <p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it. </p> <p><strong>Brian #1:</strong> <a href="https://peps.python.org/pep-0772/?featured_on=pythonbytes">PEP 772 – Packaging governance process</a> </p> <ul> <li>draft, created 21-Jan, by Barry Warsaw, Deb Nicholson, Pradyun Gedam</li> <li>“As Python packaging has matured, several interrelated problems with the current way of managing the technical development, decision making and processes have become apparent.”</li> <li>“This PEP proposes a Python Packaging Council with broad authority over packaging standards, tools, and implementations. Like the Python Steering Council, the Packaging Council seeks to exercise this authority as rarely as possible; instead, they use this power to establish standard processes.”</li> <li>PEP discusses <ul> <li>PyPA, Packaging-WG, Interoperability Standards, Python Steering Council, and Expectations of an elected Packaging Council</li> <li>A specification with <ul> <li>Composition: 5 people</li> <li>Mandate, Responsibilities, Delegations, Process, Terms, etc.</li> </ul></li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="https://www.mongodb.com/blog/post/mongodb-django-backend-now-available-public-preview?utm_source=www.pythonweekly.com&utm_medium=newsletter&utm_campaign=python-weekly-issue-687-february-13-2025&_bhlid=ac970bf5150af48b53b11f639dd520db04c9a2aa&featured_on=pythonbytes">Official Django MongoDB Backend</a> Now Available in Public Preview</p> <ul> <li>Over the last few years, Django developers have increasingly used MongoDB, presenting an opportunity for an official MongoDB-built Python package to make integrating both technologies as painless as possible.</li> <li>Features <ul> <li><strong>The ability to use Django models with confidence</strong>. Developers can use Django <a href="https://docs.djangoproject.com/en/5.1/topics/db/models/?featured_on=pythonbytes">models</a> to represent MongoDB documents, with support for Django forms, validations, and authentication.</li> <li><strong>Django admin support</strong>. The package allows users to fire up the Django admin page as they normally would, with full support for <a href="https://docs.djangoproject.com/en/5.1/topics/migrations/#module-django.db.migrations">migrations</a> and database schema history.</li> <li><strong>Native connecting from settings.py</strong>. Just as with any other database provider, developers can customize the database engine in settings.py to get MongoDB up and running.</li> <li><strong>MongoDB-specific querying optimizations</strong>. Field lookups have been replaced with aggregation calls (aggregation stages and aggregate operators), JOIN operations are represented through $lookup, and it’s possible to build indexes right from Python.</li> <li><strong>Limited advanced functionality</strong>. While still in development, the package already has support for time series, projections, and XOR operations.</li> <li><strong>Aggregation pipeline support</strong>. Raw querying allows aggregation pipeline operators. Since aggregation is a superset of what traditional MongoDB Query API methods provide, it gives developers more functionality.</li> </ul></li> </ul> <p><strong>Brian #3:</strong> <a href="https://qntm.org/devphilo?featured_on=pythonbytes"><strong>Developer Philosophy</strong></a></p> <ul> <li>by qntm</li> <li>Intended as “advice for junior developers about personal dev philosophy”, I think these are just great tips to keep in mind.</li> <li>The items <ul> <li>Avoid, at all costs, arriving at a scenario where the ground-up rewrite starts to look attractive <ul> <li>This is less about “don’t do rewrites”, but about noticing the warning signs ahead of time.</li> </ul></li> <li>Aim to be 90% done in 50% of the available time <ul> <li>Great quote: “The first 90% of the job takes 90% of the time. The last 10% of the job takes the other 90% of the time.”</li> </ul></li> <li>Automate good practices</li> <li>Think about pathological data <ul> <li>“Nobody cares about the golden path. Edge cases are our <em>entire job</em>.”</li> <li>Brian’s note: But also think about the happy path. Documenting and testing what you think of as the happy path is a testing start and helps others understand your idea of how things are supposed to work.</li> </ul></li> <li>There’s usually a simpler way to write it</li> <li>Write code to be testable</li> <li>It is insufficient for code to be provably correct; it should be obviously, visibly, trivially correct <ul> <li>Brian’s note: Even if it’s obviously, visibly, trivially correct, it will still break. So test it anyway.</li> </ul></li> </ul></li> </ul> <p><strong>Michael #4:</strong> <a href="https://docs.python.org/release/3.13.2/whatsnew/changelog.html#python-3-13-2">Python 3.13.2</a> released</p> <ul> <li>Python 3.13’s second maintenance release. </li> <li>About 250 changes went into this update</li> <li>Also Python 3.12.9, Python 3.12’s ninth maintenance release already. Just 180 changes for 3.12, but it’s still worth upgrading.</li> <li>For us, it’s simply rebuilding our Docker base (i.e. —no-cache) with these lines: <pre><code>RUN curl -LsSf https://astral.sh/uv/install.sh | sh RUN --mount=type=cache,target=/root/.cache uv venv --python 3.13 /venv </code></pre></li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li>Still thinking about pytest plugins a lot.</li> <li>The <a href="https://pythontest.com/top-pytest-plugins/?featured_on=pythonbytes">top pytest plugin list</a> <ul> <li>Has been updated for Feb</li> <li>Is starting to include things without “pytest” in the name, like Hypothesis and Syrupy. <ul> <li>Eventually I’ll have to add “looking at trove classifiers” as part of the search, but for now, let me know if you’re favorite is missing.</li> </ul></li> <li>Includes T&C podcast episode links if I’ve covered it on the show. <ul> <li>There’s 2 so far</li> </ul></li> </ul></li> </ul> <p>Michael:</p> <ul> <li>There's <a href="https://github.com/pyscript/pyscript/releases/tag/2025.2.1?featured_on=pythonbytes">a new release of PyScript</a> out. All the details are here: Highlight is new PyGame-CE support. Go play!</li> <li><a href="https://peps.python.org/pep-2026/?featured_on=pythonbytes">PEP 2026 – Calendar versioning for Python</a> rejected. :(</li> <li><a href="https://peps.python.org/pep-0759/?featured_on=pythonbytes">PEP 759 – External Wheel Hosting</a> withdrawn</li> </ul> <p><strong>Joke:</strong> </p> <ul> <li><a href="https://bsky.app/profile/bruno.rocha.social/post/3lhhearmiz22v?featured_on=pythonbytes">Pride Versioning</a></li> </ul>
https://pythonbytes.fm/episodes/show/420/90-done-in-50-of-the-available-time