We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode #420 90% Done in 50% of the Available Time

#420 90% Done in 50% of the Available Time

2025/2/17
logo of podcast Python Bytes

Python Bytes

AI Deep Dive AI Chapters Transcript
People
B
Brian
Python 开发者和播客主持人,专注于测试和软件开发教育。
M
Michael
帮助医生和高收入专业人士管理财务的金融教育者和播客主持人。
Topics
Brian Eichen: 我认为PEP 772提案旨在成立一个Python包管理委员会,以规范Python包管理的技术开发和决策流程。这个委员会类似于Python指导委员会,但专注于包管理。我信任提案的作者们,并认为现在是时候成立这样一个委员会了,以应对Python包管理日益成熟所带来的问题。该提案详细考虑了委员会的规范、责任和运作方式,甚至包括了成员失踪的情况,这表明其考虑的全面性。尽管如此,我仍然认为应该考虑如何加强现有的PyPA,而不是增加一个新的管理层。 Michael Kennedy: 我认为在现有的Python包管理结构之上再增加一个委员会可能会造成更多的混乱,例如,我们应该向谁汇报?谁才是真正的负责人?我倾向于加强现有的结构,而不是引入一个全新的外部结构。不过,包管理对于Python社区至关重要,所以这个提案可能还是有价值的。

Deep Dive

Shownotes Transcript

Topics covered in this episode:

- **[PEP 772 – Packaging governance process](https://peps.python.org/pep-0772/?featured_on=pythonbytes))**

Watch on YouTube)

About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live) to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

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 our friends of the show list), we'll never share it.

Brian #1: PEP 772 – Packaging governance process)

  • draft, created 21-Jan, by Barry Warsaw, Deb Nicholson, Pradyun Gedam

  • “As Python packaging has matured, several interrelated problems with the current way of managing the technical development, decision making and processes have become apparent.”

  • “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.”

  • PEP discusses

  • PyPA, Packaging-WG, Interoperability Standards, Python Steering Council, and Expectations of an elected Packaging Council

  • A specification with

  • Composition: 5 people

  • Mandate, Responsibilities, Delegations, Process, Terms, etc.

Michael #2: Official Django MongoDB Backend) Now Available in Public Preview

  • 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.

  • Features

  • The ability to use Django models with confidence. Developers can use Django models) to represent MongoDB documents, with support for Django forms, validations, and authentication.

  • Django admin support. The package allows users to fire up the Django admin page as they normally would, with full support for migrations) and database schema history.

  • Native connecting from settings.py. Just as with any other database provider, developers can customize the database engine in settings.py to get MongoDB up and running.

  • MongoDB-specific querying optimizations. 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.

  • Limited advanced functionality. While still in development, the package already has support for time series, projections, and XOR operations.

  • Aggregation pipeline support. Raw querying allows aggregation pipeline operators. Since aggregation is a superset of what traditional MongoDB Query API methods provide, it gives developers more functionality.

Brian #3: Developer Philosophy)

  • by qntm

  • Intended as “advice for junior developers about personal dev philosophy”, I think these are just great tips to keep in mind.

  • The items

  • Avoid, at all costs, arriving at a scenario where the ground-up rewrite starts to look attractive

  • This is less about “don’t do rewrites”, but about noticing the warning signs ahead of time.

  • Aim to be 90% done in 50% of the available time

  • 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.”

  • Automate good practices

  • Think about pathological data

  • “Nobody cares about the golden path. Edge cases are our entire job.”

  • 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.

  • There’s usually a simpler way to write it

  • Write code to be testable

  • It is insufficient for code to be provably correct; it should be obviously, visibly, trivially correct

  • Brian’s note: Even if it’s obviously, visibly, trivially correct, it will still break. So test it anyway.

Michael #4: Python 3.13.2) released

  • Python 3.13’s second maintenance release.

  • About 250 changes went into this update

  • 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.

  • For us, it’s simply rebuilding our Docker base (i.e. —no-cache) with these lines:

`RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN --mount=type=cache,target=/root/.cache uv venv --python 3.13 /venv
`

Extras

Brian:

  • Still thinking about pytest plugins a lot.

  • The top pytest plugin list)

  • Has been updated for Feb

  • Is starting to include things without “pytest” in the name, like Hypothesis and Syrupy.

  • 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.

  • Includes T&C podcast episode links if I’ve covered it on the show.

  • There’s 2 so far

Michael:

Joke: