Brett Cannon

Brett Cannon

@snarky.ca

#Python core developer who also works on packaging; works on Python stuff at #Microsoft (although this is a personal account). Proudly #Canadian.

4.1K followers80 following586 posts

We announced the Type Server Protocol ( #TSP ) today so you can choose your type checker to power things like #Pylance in #vscode . We are launching with support for #Pyrefly so that if it's your preferred type checker in CI it can also be used with Pylance. devblogs.microsoft.com/python/annou...

devblogs.microsoft.comPylance + Pyrefly: bring your preferred type checker to Visual Studio Code - Microsoft for Python Developers BlogAnnouncing the Type Server Protocol and our partnership with Meta

Apparently the private key was "4". If my 2.5 year-old toddler can say your private key, it isn't secure.

Jake Bailey@jakebailey.dev

i simply cannot wait to hear about the latest certificate authority drama, the juiciest kind of drama

Brett Cannon reposted

Wow, @pypi.org crossed 2 EXABYTES bandwidth served in 2026. For comparison, **all traffic served in 2025** was only 1.95 Exabytes. Thanks to @fastly.com, over 99.999% of that is absorbed by their powerful global caching layer, chugging along to serve #OpenSource #Python users worldwide

Brett Cannon reposted

I talk to a lot of startups building security tools for AI agents, and my advice to all of them is, treat AI agents like malware. Even if agents provide a lot of value to those who use them, agents are a security nightmare to those who have to secure them.

If @jakebailey.dev was Norwegian.

Dexerto@dexerto.bsky.social

A Norway fan has gone viral for not taking part in their Row celebration after matches and won't do it if they win the World Cup "It’s factually wrong; they didn’t row, they sailed over the Atlantic”

Brett Cannon reposted

npm v12 is now generally available. npm install now makes install scripts, Git, and remote-URL dependencies opt-in by default. We're also retiring npm 2FA-bypass GAT: no account management (early Aug 2026), no direct publishing (~Jan 2027). More info at github.blog/changelog/20...

github.blognpm install-time security and GAT bypass2fa deprecation - GitHub Changelognpm v12 is now generally available and tagged latest. This major release turns on the install-time security defaults we announced in June, and it’s also where we begin a deprecation…

If you use GitHub Actions to publish to #PyPI, I wrote a blog post outlining what I consider the key things you can do to secure your publishing workflow. snarky.ca/how-to-publi... If you don't use GitHub Actions for publishing, this post will NOT be of interest to you.

snarky.caHow to publish to PyPI using GitHub Actions securelyThere have been several security incidents lately that involved compromising GitHub Actions workflows. This has led some to say "GitHub Actions is the weakest link" in publishing and to GitHub publish...

@tiangolo.com are there any plans for hosting SQLite3 databases on @fastapicloud.com ? For a personal blog I just don't need something as fancy as Postgres which requires setting up another service. All I want is a SQLite3 file that I can occasionally download for backup purposes.

Brett Cannon reposted

Setting up a direct indexing account has generally not been worth the hassle, but it sure feels great to be able to exclude SpaceX from my investment list

More Perfect Union@moreperfectunion.bsky.social

BREAKING: SpaceX is now worth more than Amazon. SpaceX market cap is $2.75 trillion, Amazon's is $2.65 trillion. Amazon's profits were $78 billion last year. SpaceX lost $5 billion last year.

Brett Cannon reposted

The rainbow is here all year long, so we don't need to change the profile for June. But it is a good time to remind everyone that LGBTQIA+ rights are under attack all year long as well. And to steal @haskell.org's message: there would be no Gleam without trans people 🩵🩷🤍

Brett Cannon reposted

🤔📚 Wondering what to do this weekend? Grab the latest No Starch Press Humble Bundle, ‘Python: the Good Stuff’ and dig into 15 #Python related titles for just $36! A percentage of the proceeds goes to supporting the PSF! www.humblebundle.com/books/python...

No Starch Press@nostarchpress.bsky.social

A @humblebundle.com for people learning Python, people automating busywork, people teaching the machines, and people trying to escape Excel. Pay what you want. DRM-free. Supports @python.org https://www.humblebundle.com/books/python-good-stuff-no-starch-books

Brett Cannon reposted

Replying to @hugovk.dev

🐍🚀 Out now: Python 3.15 beta 2! 💤 Lazy imports! 🧊 frozendict builtin! 💂 sentinel builtin! 📉 Tachyon profiler! 🖼️ Frame pointers everywhere! 🎨 More colour! 🚌 & more! Library maintainer? Add 3.15 to your CI and keep those bugs coming! discuss.python.org/t/python-3-1... #Python315 #Python #release

discuss.python.orgPython 3.15.0 beta 2 is here!Here comes the antepenultimate beta. This is a beta preview of Python 3.15 Python 3.15 is still in development. This release, 3.15.0b2, is the second of four planned beta releases. Beta release p...

`operator.itemgetter` and `attrgetter` get under-used IMO. Same goes for `else` clauses on `for` and `while` loops.

Trey Hunner@trey.io

Python Tip #148 (of 365): Sort by specific sequence items with operator.itemgetter 🧵 Have an iterable of sequences (tuples, lists, etc.)? You can sort them by one or more of their indexes using itemgetter from Python's operator module. from operator import itemgetter #Python #DailyPythonTip

Brett Cannon reposted

Your FastAPI is safe 🔒 Today, FastAPI was incorrectly flagged as malicious by automated tooling from a large company, among several other packages. FastAPI was not compromised. It was a false positive. We were not contacted before publication. This should not happen to OSS.

Brett Cannon reposted

excited to announce that Wizard Zines is now shipping Canadian orders from Canada! now shipping is cheaper & there's no risk of being hit with duties get your zines at wizardzines.com

Brett Cannon reposted

Brett Cannon reposted

PEP 831 (aka "frame pointers everywhere!") was accepted! If you are an author of a C extension or native lib built with a custom build system, it is now strongly recommended you add -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer to CFLAGS so profilers & debuggers can step through your lib.

peps.python.orgPEP 831 – Frame Pointers Everywhere: Enabling System-Level Observability for Python | peps.python.orgThis PEP proposes two things:

Brett Cannon reposted

Well, let's fix those pprint defaults! mastodon.social/@treyhunner/... Which do you prefer? github.com/python/cpyth... github.com/python/cpyth... #Python #Python315 #pprint

Trey Hunner@trey.io

Big news (for me at least): pprint on Python 3.15 is going to allow MUCH friendlier output! 🎉 Instead of: pprint.pprint(some_object) If you do this: pprint.pprint(some_object, indent=4, expand=True) You'll see output that looks like the most commonly used modern Python line-wrapping style!

Brett Cannon reposted

IT'S HAPPENING!!! 💃 People have asked me for an official @fastapi.tiangolo.com Conference for years. Here we go, let's meet in Amsterdam. ☕️

FastAPI@fastapi.tiangolo.com

Big news: the first-ever ✨ FastAPI Conf ✨ is coming! 📍 Amsterdam 📅 October 28 Meet the FastAPI team, connect with developers ☕️ 🎟️ Join the waitlist for early ticket access: fastapiconf.com

Note the "installing from pylock.toml" part 😁

Seth Larson@sethmlarson.dev

pip 26.1 is an incredible release, thank you to the pip maintainers!! 💜 – Relative dependency cooldown support! – Installing from pylock.toml – Multiple security fixes Read the full blog post by Richard Si: ichard26.github.io/blog/2026/04... #python #pypi #pip #security #oss #opensource

Brett Cannon reposted

Sometimes when you're naming a flag, nothing seems to stick. You try for weeks, ask everyone you know, but the "right" name doesn't seem to be there. Eventually maybe you just ship a name that's bad enough that you figure people will read the docs to figure out what it does.

Brett Cannon reposted

Now there's autocompletion and docs in pyproject.toml for FastAPI 🎉 [tool.fastapi] entrypoint = "main:app" Make sure you have a modern editor and TOML plugin, like @vscode.dev with Tombi 🤓

Brett Cannon reposted

Very clever. Maybe FOSS should do that. "By using libre office, you just saved 150 euros".

This post is unavailable.

Brett Cannon reposted

It's almost like going the wrong direction but WAY FASTER isn't a good strategy.

Kelsey Hightower@kelseyhightower.com

Generating software faster, or automating busywork, doesn't guarantee success in business.

Brett Cannon reposted

Free-threaded Python with @fastapi.tiangolo.com 🧵🚀 (this is not a thread, just a threads emoji)

FastAPI@fastapi.tiangolo.com

FastAPI 0.136.0 officially supports: ✨ free-threaded Python 🐍 ✨ (this announcement has no GIL puns) Thanks @oxykodit.bsky.social, @patrick.wtf, Nathan Goldbaum, @nucleonjohn.bsky.social 🙌 github.com/fastapi/fast...