跳到正文
每分钟自动更新
  1. Simon Willison

    ty 1.0

    中文摘要

    中文摘要待更新

    英文原文

    ty 1.0 Astral's fast type checker for Python has hit 1.0, and they now "recommend it for production use". ty is now the default and most widely-deployed type checker at OpenAI, providing coverage for many millions of lines of critical Python. Internally, migrating to ty resulted in a median 24x speedup and 73% reduction in peak memory usage . It has built-in support for Django provided the django-types package is also installed. Via Hacker News Tags: django , python , openai , astral , ty

  1. Simon Willison

    Muru

    中文摘要

    中文摘要待更新

    英文原文

    Muru Graham Dumpleton started mod_wsgi 20 years ago, and has been thinking about the ideal way to serve Python web applications in production ever since. Muru is his new, AI-assisted Rust server that aims to provide the best possible tools for running ASGI and WSGI Python apps both in development and production. As he did with wrapture , he's been publishing an extraordinarily detailed account of the project as he works on it - as part of his development process. Here's everything he's published so far, all in the last three weeks: 2026-11-04 — Twenty years of mod_wsgi, and what comes next 2026-11-05 — A first look at Muru 2026-11-07 — Muru: looking inside the workers 2026-11-08 — Muru: how it fits together 2026-11-09 — Muru: import once, fork many 2026-11-10 — Muru: HTTPS in development 2026-11-11 — Muru: WSGI and ASGI together 2026-11-11 — AI as a lifestyle choice 2026-11-12 — Muru: releases, not restarts 2026-11-13 — Muru: canaries without a service mesh 2026-11-14 — Muru: a better tenant in a container 2026-11-15 — Muru: working with Kubernetes, not around it 2026-11-16 — Muru: scaling from what the workers report 2026-11-17 — Muru: scaling to zero 2026-11-18 — Muru: overlays o

  1. Simon Willison

    The PSF end-of-year fundraiser

    中文摘要

    PSF年终筹款活动。以我作为Python软件基金会董事会董事的身份来说:我们已经启动了针对支持Python开发和Python社区的非营利组织的年终筹款活动。如果您的公司或您的工作受益于Python,请考虑今年进行捐赠!PSF负责管理Python的知识产权,运营PyPI,资助核心开发人员冲刺活动,支持社区活动(包括每年举办PyCon美国大会),并雇佣了一支小型而优秀的员工团队来维持所有事务的运转。我们还运营着“驻场开发者”项目,目前包括三位安全开发人员(欢迎,Brett Smith),他们的工作重点是帮助保障Python、PyPI以及更广泛的生态系统安全。标签:python,psf

    英文原文

    The PSF end-of-year fundraiser With my Python Software Foundation board director hat on: we've launched our end-of-year fundraiser for the non-profit that supports Python development and the Python community. If your company or your work benefits from Python, please consider donating this year! The PSF looks after the IP behind Python, operates PyPI, sponsors core developer sprints, supports community events (including running PyCon US every year), and employs a small and excellent staff team to keep everything running. We also operate the Developers in Residence program , which now includes three security developers (welcome, Brett Smith) focused on helping secure Python, PyPI, and the wider ecosystem. Tags: python , psf

  2. Simon Willison

    Running the full server-side Datasette Python app in the browser with service workers and Pyodide

    中文摘要

    Datasette Lite是我将Datasette Python应用程序移植到浏览器中运行的版本,使用的是WebAssembly和Pyodide。我使用service workers发布了Datasette Lite的完整重写版本,现在它几乎与真正的服务器端应用程序无法区分。现在你可以使用精心设计的URL lite.datasette.io完成以下所有操作:加载客户端的Datasette来浏览任何SQLite数据库、JSON文件、CSV文件或SQL脚本;从PyPI中选择一个发布的Datasette版本进行加载;从Datasette GitHub仓库中选择特定的提交、标签或分支名称;从超过100个SQLite版本中进行选择,与Datasette一起使用;从PyPI或wheel文件的URL中安装额外的Datasette插件,包括JavaScript可视化工具。能够加载特定的Datasette引用、插件和SQLite版本,使这成为一种极好的工具,可以链接到正在进行中的功能演示或错误复现,而无需启动完整的Web服务器来提供该演示。例如,考虑以下URL:https://lite.datasette.io/?install=datasette-maplibre&url=https://gist.githubusercontent.com/simonw/39fa5d399465766039549912e2b3d291/raw/f6dfba9

    英文原文

    Datasette Lite is my port of the Datasette Python application to run directly in the browser using WebAssembly and Pyodide . I've released a complete rewrite of Datasette Lite using service workers, and it's now almost indistinguishable from the real server-side application. You can now do all of the following, using a carefully crafted URL to lite.datasette.io : Load client-side Datasette to browse any SQLite database, JSON file, CSV file or SQL script Select a released version of Datasette to load from PyPI Load a specific commit, tag, or branch name from the Datasette GitHub repository Pick from over 100 versions of SQLite to use with Datasette Install additional Datasette plugins from PyPI or URLs to wheel files, including JavaScript visualization tools The ability to load specific Datasette references, plugins, and SQLite versions makes this a fantastic tool for linking to demos of work-in-progress features or bug reproductions, without needing to spin up a full web server to serve that demo. As an example, consider the following URL: https://lite.datasette.io/?install=datasette-maplibre&url=https://gist.githubusercontent.com/simonw/39fa5d399465766039549912e2b3d291/raw/f6dfba9

  1. Simon Willison

    If in doubt, delete the uv.lock file

    中文摘要

    自从我切换到 Python 3.15 之后,我偶尔会遇到一些令人困惑的 Python 依赖错误。我需要记住的规则是:如果不确定,就删除 uv.lock 文件。我的大部分项目都是库,这些库不包含 uv.lock 文件,因为让库依赖项为其他使用它的内容锁定版本是不礼貌的。运行 uv run pytest 等命令通常会在项目中留下 uv.lock 文件,这些文件被列在 .gitignore 中,因此不会被提交到我的代码仓库中。但是……有时候这个 uv.lock 会锁定一个尚未为 Python 3.15 提供 wheel 的依赖版本。例如今天早些时候的一个例子:错误:无法构建 `watchfiles==1.1.1`,原因:调用 `maturin.build_wheel` 失败。错误:配置的 Python 解释器版本(3.15)比 PyO3 支持的最高版本(3.14)还要新。删除该文件并再次运行 uv run pytest 通常可以解决问题。标签:uv , til , python

    英文原文

    I've been getting the occasional confusing Python dependency error since switching over to Python 3.15 and the rule I'm having to remember is: If in doubt, delete the uv.lock file Most of my projects are libraries which don't include a uv.lock file, since it's rude for a library dependency to lock versions for anything else that uses it. Running uv run pytest etc tends to leave uv.lock files lying around, which are listed in .gitignore and so do not get committed to my repositories. But... sometimes that uv.lock pins a version of a dependency that doesn't yet have a Python 3.15 wheel. An example from earlier today: error: Failed to build `watchfiles==1.1.1` cause: Call to `maturin.build_wheel` failed error: the configured Python interpreter version (3.15) is newer than PyO3's maximum supported version (3.14) Deleting that file and running uv run pytest again usually fixes the problem. Tags: uv , til , python

  1. Simon Willison

    eMudhra Intermediate CA Compromise

    中文摘要

    eMudhra中间CA证书泄露 这是个非常非常糟糕的消息:八个eMudhra中间CA证书的私钥已被泄露。这些证书链接到Mozilla、微软、苹果和Chrome根程序所信任的根证书,以及许多下游信任存储。任何捆绑了受信任证书列表的软件都需要进行更新。该网站通过此GitHub仓库跟踪软件更新——Linux发行版需要更新其ca-certificates软件包。在Python世界中,uv 0.13.4、pip 26.2.2和certifi 2026.10.19已发布,包含升级后的证书列表。在官方Python论坛上有一个非常有信息量的讨论帖。 标签:加密,https,pip,python,安全,uv

    英文原文

    eMudhra Intermediate CA Compromise This is very, very bad news: The private keys of eight eMudhra intermediate CA certificates have been compromised. They chain to roots trusted by the Mozilla, Microsoft, Apple and Chrome root programs and by many downstream trust stores. Any software that bundles a list of trusted certificates needs to be updated. This site is tracking software updates via this GitHub repository - Linux distros need to update their ca-certificates packages. In Python world uv 0.13.4 and pip 26.2.2 and certifi 2026.10.19 have been released with upgraded certificate lists. There's a very informative thread about this on the official Python forum. Tags: encryption , https , pip , python , security , uv

  1. Simon Willison

    Hello Python 3.15, goodbye 3.10, and now I can use 3.11

    中文摘要

    Python 3.15来了!这是Python 3.15的必备更新指南,今年由3.14和3.15版本发布负责人Hugo van Kemenade整理。作为一名构建可在所有支持的Python版本中运行的开源软件的人,我可以说,我将告别Python 3.10,并开始拥抱Python 3.11的新特性。首先,一些Python 3.15的亮点。显式延迟导入我最兴奋的是来自PEP 810的显式延迟导入功能。这允许你像这样导入模块:lazy import json lazy from pathlib import Path 模块将在后续代码中首次使用这些符号时被导入。我的LLM命令行工具实现了插件。我不得不在插件作者文档中推荐手动延迟导入,因为仅仅安装使用了像sentence_transformers这样的重型依赖的插件,会使每次调用llm命令都增加数秒。延迟导入直接解决了这个启动成本。推导式中的解包新语法[*sublist for sublist in lists]非常棒。这里有一个从文档中摘录的示例:lists = [[1, 2], [3, 4], [5]] [*L for L in lists] # [1, 2, 3, 4, 5] # 等价于[x for L in lists for x in L]

    英文原文

    Python 3.15 is here ! Here's the essential What's new in Python 3.15 guide, this year curated by 3.14 and 3.15 release manager Hugo van Kemenade. As someone who builds open source software that works in every supported Python version, I get to say goodbye to Python 3.10 and start embracing features from Python 3.11. First, some highlights from Python 3.15. Explicit lazy imports I'm most excited about Explicit lazy imports from PEP 810 . These let you import modules like so: lazy import json lazy from pathlib import Path The module will then be imported the first time those symbols are used in the code that follows. My LLM CLI tool implements plugins. I had to recommend manual lazy imports in the plugin author documentation, because simply installing plugins that used heavy dependencies such as sentence_transformers could add multiple seconds to every invocation of the llm command. Lazy imports directly address this startup cost. Unpacking in comprehensions The new [*sublist for sublist in lists] unpacking syntax is neat. Here's an illustration lifted from the documentation : lists = [[ 1 , 2 ], [ 3 , 4 ], [ 5 ]] [ * L for L in lists ] # [1, 2, 3, 4, 5] # equivalent to [x for L in l

  2. Simon Willison

    Profiling web-edit with Python 3.15: flame graphs and source heatmaps

    中文摘要

    研究:使用 Python 3.15 对网页编辑进行剖析:火焰图和源代码热力图 我让 GPT-6 Astra Extra High 在 Codex 中运行,对新的 Python 3.15 分析器进行了测试,将其应用于我新的网页编辑应用程序:我需要从 PyPI 上的“web-edit”应用程序中得到一个 Python 3.15 火焰图和热力图演示——先进行研究,然后为我制作这些演示。 这是生成的火焰图和热力图示例。 标签:剖析,python,codex

    英文原文

    Research: Profiling web-edit with Python 3.15: flame graphs and source heatmaps I put the new Python 3.15 profiler through its paces by having GPT-6 Astra Extra High in Codex run it against my new web-edit app : I need a Python 3.15 flame graph and heatmap demo of the "web-edit" app from PyPI - research first then make me those demos Here's the resulting example flame graph and heatmap . Tags: profiling , python , codex

  1. Simon Willison

    web-edit 0.1a0

    中文摘要

    发布:web-edit 0.1a0 我在使用Codex Remote通过手机进行一个项目时,发现自己想要编辑一个凭据文件,而不想通过LLM本身来回传输这些凭据。因此……我让Codex和GPT-6 Astra Extra High构建了一个Python网络应用,该应用提供了一个网络界面,用于查看和编辑文件夹中的文件。该应用旨在通过Tailscale运行,这样我可以启动一个代理运行它,然后通过我的Tailscale网络直接从手机编辑文件。这是浏览文件夹中文件的界面:编辑功能使用了CodeMirror 6——我原本打算使用Monaco,但目前它在移动设备上的体验还不是很好。标签:项目,python,人工智能,tailscale,生成式人工智能,大语言模型,codex

    英文原文

    Release: web-edit 0.1a0 I was working on a project from my phone using Codex Remote when I found myself wanting to edit a credentials file without round-tripping those credentials through the LLM itself. So... I had Codex and GPT-6 Astra Extra High build this Python web app which provides a web UI for viewing and editing files in a folder. It's intended to be run over Tailscale, so I can have an agent start this running and then edit files via my Tailscale network directly from my phone. Here's the interface for browsing files in a folder: Editing uses CodeMirror 6 - I was going to use Monaco but that still doesn't have a great mobile experience yet. Tags: projects , python , ai , tailscale , generative-ai , llms , codex

  1. Simon Willison

    Python 3.15.0 added to actions/python-versions

    中文摘要

    Python 3.15.0 已添加到 actions/python-versions 中。这是一个比较冷门的链接,但我等了几天了——我甚至让 ChatGPT 去检查是否有更新:克隆 https://github.com/actions/python-versions 并每小时执行一次 git pull,直到他们添加了稳定版的 3.15 - 然后告诉我。现在这个已经实现了,你可以将 "3.15" 添加到 GitHub Actions 测试矩阵中,以针对新的 Python 3.15.0 版本运行测试。标签:github , python , github-actions , chatgpt

    英文原文

    Python 3.15.0 added to actions/python-versions Bit of a niche link, but I've been waiting for this for a couple of days - I even told ChatGPT to check for it: Clone https://github.com/actions/python-versions and git pull once an hour until they add the stable 3.15 - then tell me about it Now that this has landed, you can add "3.15" to a GitHub Actions testing matrix to run tests against the new Python 3.15.0 release . Tags: github , python , github-actions , chatgpt

  1. Simon Willison

    Quoting Ben Affleck

    中文摘要

    我从小就对电脑有点兴趣。当电影开始从模拟胶片转向数字电影时,我对这一方面更加感兴趣了。多年来,视觉特效的工作流程一直包括机器学习。因此,我可以编写一些相当糟糕的Python脚本之类的东西,因为卷积神经网络是现在Transformer所能做的事情的早期版本,而Transformer可以同时进行更多的计算。你会做的一些事情是查看所谓的张量,也就是将视觉图像用数字表示的东西——比如批次编号、帧编号,以及每一帧中每个像素的红、绿、蓝数值。你使用卷积神经网络来识别张量中的模式,这些模式会揭示所谓的边缘检测或特征提取,也就是识别出足够的模式来知道这是窗台的位置,这样我们就可以更容易地将绿幕图像去除并替换成其他内容。——本·阿弗莱克,Python爱好者 标签:机器学习,Python

    英文原文

    I've always been kind of into computers since I was young. And then when film started to move from analog film to digital, I became more interested in that aspect of it. And the visual effects workflow for many years has included machine learning. So I can write like pretty shitty Python scripts and stuff like that because with convolutional neural networks, which were the sort of precursors to what the transformer can do, which is just much more computation simultaneously, you would do things like look at what's called a tensor, which is just the numerical translation of a visual image in numbers — like the batch number, the frame number, the red, green, and blue values of each pixel in each frame. And a tensor, you use a convolutional neural network to identify patterns in that that would reveal what's called edge detection or feature extraction, which is just identifying patterns enough to know like this is where the window ledge is, so we can more easily take the green screen image out and replace it with something. — Ben Affleck , Pythonista Tags: machine-learning , python

  1. Simon Willison

    pwasm 0.2a0

    中文摘要

    发布:pwasm 0.2a0 pwasm 是我的一个愚蠢项目——一个完全通过 vibe 编码的纯 Python WebAssembly 引擎,我在一月份第一次陷入人工智能狂热期间开发了它。自从一月份以来,我再也没有碰过它,所以我决定让 Claude Opus 5.5 来处理它,看看它是否能做出任何显著的改进:评估 pwasm 当前的状态——然后考虑要让它运行研究仓库中的 MicroPython 和 micro JavaScript 实验需要做些什么——以及要让它提速需要做些什么。在 42 次提交之后(仅需最少的后续提示),它现在几乎可以处理所有的 WASM 规范,而 PyPI 上的 wheel 包含了 MicroPython、QuickJS 和 Micro QuickJS 的工作型 WASM 构建。我完全不信任这个东西——因此打上了 alpha 版本标签——但看到今天的模型能改进 10 个月前模型的工作成果,这很有趣。 标签:python、webassembly、vibe-coding

    英文原文

    Release: pwasm 0.2a0 pwasm is one of my folly projects - an entirely vibe-coded pure Python WebAssembly engine that I built in January during my first bout of AI mania . I hadn't touched it since January, so I decided to let Claude Opus 5.5 loose on it and see if it could make any significant improvements: Evaluate current state of pwasm - then consider what it would take to get the MicroPython and micro JavaScript experiments from the research repo working under it - and what it would take to speed it up 42 commits later (with minimal follow-up prompting) it now handles almost all of the WASM specification, and the wheel from PyPI bundles working WASM builds of MicroPython , QuickJS and Micro QuickJS . I wouldn't trust this thing at all - hence the alpha version tag - but it's interesting seeing how today's models can improve on the work of models from 10 months ago. Tags: python , webassembly , vibe-coding

已经到底了