We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode #421 22 years old

#421 22 years old

2025/2/24
logo of podcast Python Bytes

Python Bytes

AI Deep Dive Transcript
People
B
Brian
Python 开发者和播客主持人,专注于测试和软件开发教育。
M
Michael
帮助医生和高收入专业人士管理财务的金融教育者和播客主持人。
Topics
Michael: 我介绍了httpdbg,一个用于调试Python程序中HTTP(S)客户端请求的工具。它易于使用,只需用pyhttpdbg命令代替python运行程序即可。它提供了一个UI界面,可以查看、比较和分析应用程序发出的所有HTTP请求,这对于调试和学习HTTP请求的运作方式都非常有用。它支持多种HTTP库,包括requests, urllib, httpx, aiohttp等,甚至可以拦截其他库发出的HTTP请求,这使得它成为一个非常强大的调试工具。 Michael: 我还讨论了Anaconda在推动Python移动端开发方面所做的努力。PyPI现在支持iOS和Android平台的预编译二进制包(wheels),这使得在移动设备上安装和使用Python库更加容易。Anaconda的Russell Keith-McGee在其中发挥了关键作用,他致力于使iOS和Android成为CPython的官方构建目标。CI Build Wheel工具也正在更新中,以简化iOS和Android wheels的创建过程。 Michael: 最后,我还分享了我用旧的Mac mini以175美元的价格换购了一台全新的Mac mini M4的经历,这让我感到非常惊喜。 Brian: 我介绍了PyPI现在支持iOS和Android wheels的消息,这标志着移动端Python开发向前迈进了一大步。这要感谢Sarah Gooding和Russell Keith-McGee等人的努力,以及PEP 730和738的推动。虽然CI Build Wheel工具目前仍在更新中,但它将进一步简化iOS和Android wheels的创建过程。这将使越来越多的第三方库能够在移动设备上使用。 Brian: 我还讨论了Arcade游戏平台的3.0版本发布。这个版本带来了许多改进,包括对OpenGL和ShaderToy的支持,以及对Python 3.8的支持终止。虽然有一些breaking changes,但总体上这是一个非常重要的更新,为游戏开发者提供了更多功能和效率。 Brian: 最后,我介绍了PEP 765的接受,该PEP禁止在finally块中使用return、break和continue语句来退出finally块。虽然这不会立即成为语法错误,而是一个语法警告,但这将有助于避免一些意外的行为。

Deep Dive

Shownotes Transcript

Topics covered in this episode:

- **[httpdbg](https://github.com/cle-b/httpdbg?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.

Michael #1: httpdbg)

  • A tool for Python developers to easily debug the HTTP(S) client requests in a Python program.

  • To use it, execute your program using the pyhttpdbg command instead of python and that's it. Open a browser to http://localhost:4909 to view the requests

Brian #2: PyPI Now Supports iOS and Android Wheels for Mobile Python Development)

  • Sara Gooding

  • “the Python Packaging Index (PyPI) has officially begun accepting and distributing pre-compiled binary packages, known as "wheels," for both iOS and Android platforms. “

  • Next up, “cibuildwheel Updates Are in Progress to Simplify iOS and Android Wheel Creation”

Michael #3: Arcade Game Platform) goes 3.0

Brian #4: PEP 765 – Disallow return/break/continue that exit a finally block)

  • Accepted for Python 3.14

  • I wouldn’t have thought to do this anyway, but it’s weird, so don’t.

  • Will become a SyntaxWarning catchable by running with -We

Extras

Brian:

Michael:

  • Tea pot follow up

  • While you're right that some software actually had this implemented, Python does not. It's not an officially accepted HTTP status code, it was proposed in a 'joke' RFC. I guess Python - even though its name comes from the funny TV series Monty Python - is not so funny. httpx, your (or at least -my-) favorite HTTP module for python, does have the I_AM_A_TEAPOT constant.

  • By the way, there are some HTTP status codes that changed their names in RFC 9110, for instance, http.HTTPStatus.UNPROCESSABLE_CONTENT (422, previously UNPROCESSABLE_ENTITY)

  • Pride follow up fosstodon.org/@kytta/114034442981727301)

  • Time to upgrade your mini)?

Joke: How old is she)?