We're sunsetting PodQuest on 2025-07-28. Thank you for your support!
Export Podcast Subscriptions
cover of episode #432 How To Fix Your Computer

#432 How To Fix Your Computer

2025/5/19
logo of podcast Python Bytes

Python Bytes

AI Deep Dive AI Chapters Transcript
People
B
Brian
Python 开发者和播客主持人,专注于测试和软件开发教育。
M
Michael
帮助医生和高收入专业人士管理财务的金融教育者和播客主持人。
Topics
Brian: 我发现使用UV工具安装pre-commit非常方便。传统的pre-commit安装方式可能对非Python开发者不太友好,但UV工具简化了这个过程。通过简单的命令,例如`uv tool install pre-commit`,就可以全局安装pre-commit。此外,结合`pre-commit-uv`,UV还可以创建虚拟环境并安装pre-commit所需的依赖包,从而加快初始安装速度。尤其是在CI系统中,使用Docker镜像时,UV可以显著提升首次pre-commit的运行效率。最重要的是,使用UV安装pre-commit甚至不需要预先安装Python环境,这使得整个流程更加简洁高效。我强烈推荐大家尝试使用UV工具来管理pre-commit,它确实能带来更好的开发体验。

Deep Dive

Chapters
This chapter explores a more efficient way to install pre-commit, leveraging the 'uv' tool. It simplifies the installation process and speeds up initial cache creation, particularly beneficial for CI/CD environments.
  • Using 'uv tool install pre-commit' simplifies pre-commit installation.
  • Employing 'pre-commit-uv' speeds up initial pre-commit cache creation.
  • 'uv' eliminates the need for a pre-existing Python installation.

Shownotes Transcript

Topics covered in this episode:

- **[pre-commit: install with uv](https://adamj.eu/tech/2025/05/07/pre-commit-install-uv/?featured_on=pythonbytes))**

Watch on YouTube)

About the show

Sponsored by NordLayer: pythonbytes.fm/nordlayer)

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: pre-commit: install with uv)

  • Adam Johnson

  • uv tool works great at keeping tools you use on lots of projects up to date quickly, why not use it for pre-commit.

  • The extension of pre-commit-uv) will use uv to create virtual environments and install packages fore pre-commit. This speeds up initial pre-commit cache creation.

  • However, Adam is recommending this flavor of using pre-commit because it’s just plain easier to install pre-commit and dependencies than the official pre-commit install guide.

  • Win-win.

  • Side note: No Adam, I’m not going to pronounce uv “uhv”, I’ll stick with “you vee”, even Astral tells me I’m wrong

Michael #2: PEP 773): A Python Installation Manager for Windows (Accepted)

  • via pycoders newsletter

  • One manager to rule them all – PyManager.

  • PEP 773 replaces all existing Windows installers (.exe “traditional” bundle, per-version Windows Store apps, and the separate py.exe launcher) with a single MSIX app called Python Install Manager (nick-named PyManager).

  • PyManager should be mainstream by CPython 3.15, and the traditional installer disappears no earlier than 3.16 (≈ mid-2027).

  • Simple, predictable commands.

  • python → launches “the best” runtime already present or auto-installs the latest CPython if none is found.

  • py → same launcher as today plus management sub-commands:

  • py install, py uninstall, py list, py exec, py help.

  • Optional python3 and python3.x aliases can be enabled by adding one extra PATH entry.

Michael #3: Changes for Textual)

  • Bittersweet news: the business experiment ends, but the code lives on.

  • Textual began as a hobby project layered on top of Rich, but it has grown into a mature, “makes-the-terminal-do-the-impossible” TUI framework with an active community and standout documentation.

  • Despite Textual’s technical success, the team couldn’t pinpoint a single pain-point big enough to sustain a business model, so the company will wind down in the coming weeks.

  • The projects themselves aren’t going anywhere: they’re stable, battle-tested, and will continue under the stewardship of the original author and the broader community.

Brian #4: The Best Programmers I Know)

  • Matthias Endler

  • “I have met a lot of developers in my life. Lately, I asked myself: “What does it take to be one of the best? What do they all have in common?””

  • The list

  • Read the reference

  • Know your tools really well

  • Read the error message

  • Break down problems

  • Don’t be afraid to get your hands dirty

  • Always help others

  • Write

  • Never stop learning

  • Status doesn’t matter

  • Build a reputation

  • Have patience

  • Never blame the computer

  • Don’t be afraid to say “I don’t know”

  • Don’t guess

  • Keep it simple

  • Each topic has a short discussion. So don’t just ready the bullet points, check out the article.

Extras

Brian:

  • I had a great time in Munich last week. I a talk at a company event, met with tons of people, and had a great time.

  • The best part was connecting with people from different divisions working on similar problems.

  • I love the idea of internal conferences to get people to self organize by topic and meet people they wouldn’t otherwise, to share ideas.

  • Also got started working on a second book on the plane trip back.

Michael:

Joke: How To Fix Your Computer)