Wow. Meta commits to dedicate three engineer-years to implement the removal of the GIL from #Python and fix upcoming compatibility and performance issues with it.
All this dependent on whether the Steering Council accepts PEP 703.
https://discuss.python.org/t/a-fast-free-threading-python/27903/99?u=ambv
Need to work with timezones in #Python?
Don't use pytz! Use zoneinfo.
It's included in the Python standard library from Python 3.9 onward and pip install-able if you're on Python 3.8.
If your code needs to run on Windows, note that you'll need to pip install tzdata to use Python's zoneinfo module properly.
If you're really curious to understand this topic deeply, watch @pganssle's talk from @pycon: https://m.youtube.com/watch?v=rYzgroaK8_Q&feature=youtu.be
The scope of a feature request often isn't obvious to the asker. For example, someone just asked on the Python forum to make it possible to subclass `pathlib.Path.` Meanwhile, Barney Gale has spent the last *three years* or so working on all the nuances of that, and it's finally making it into Python 3.12 although there's more to do. He worked so much they made him a core dev. #Python #TodayInOpenSource
Once again, I am so frustrated by Python static typing https://github.com/pallets/click/issues/2558 If any typing expert out there wants to help, that would be wonderful. #Python
WTF is wrong with the Apple ecosystem? I've tried 3 different podcast apps now (Podcasts, @overcastfm and PocketCasts) and it seems like none of them are capable of easily like... opening a link to an RSS feed and turning that into a podcast if the feed is only available on the LAN. It's infuriating that every time I deal with some Apple thing it's something like this.
This weekend I’ve spent more time in the tox rabbit hole than I expected, but check out how I’ve cut the runtime of full tox runs of the attrs test suite by 75%:
Two Ways to Turbo-Charge tox
https://hynek.me/articles/turbo-charge-tox/
I've been tempted to get an Oura ring, but I'm a bit worried that the device would become useless if the company went under and also, more importantly, it seems like they have a proprietary charger that costs $60!
Why don't people build their stuff to work with standard wireless charging pads 😭
wow TIL that as of #tox 4, you can absolutely SLAY the environment build times if your project builds universal wheels (= virtually all pure-#Python ones)
Just add
```
[testenv]
package = wheel
wheel_build_env = .pkg
```
and it won’t build your package for every Python version anew: https://tox.wiki/en/latest/upgrading.html#universal-wheels
For my service-identity which has a very quick test suite but a lot of factor combinations, it’s 3m vs 30s. structlog that has fewer but slower envs is still 2:35 vs 1:47.
Me: "I should get this shirt."
Wife: "... Why?"
Me: "To look extremely cool, obviously."
Nailed it.
(Not shown: the matching one my 5 year old was wearing.)
Calling all #Python library maintainers! 🐍
Python 3.12 is in beta! 🎉
This means no new features are allowed in and it's now time to start testing your code. You might find things in your code to fix, or even better, you might find things to fix in Python itself!
Here's how to do it:
https://dev.to/hugovk/help-test-python-312-beta-1508 #python312 #beta #test #CI #GitHubActions
Note: I will eventually try `fish` or `zsh`, but my schedule and to-do list don't currently permit me to rework all my [dotfiles](https://github.com/pganssle/dotfiles) to work with a new shell.
I've tried `atuin` so far, and I don't like it. I think I can only use it with the full screen history search and somehow despite the fact that it's automatically merging commands from all shells, it still loses commands, sometimes *from the shell I'm currently using*.
Does anyone have a good solution for handling bash history?
What (I think) I want:
- History search for each shell searches the history of that shell first, then all other shells' history.
- I don't want to lose history from windows opened in tmux or when I'm running a bunch of shells in parallel.
What I don't care about:
- Syncing history
- Fuzzy search
What I don't want:
- Mandatory full-screen history search
This post basically describes my approach to understanding computers (and to doing physics):
https://rachelbythebay.com/w/2023/05/30/eng/
- watch / poke / use system
- develop mental model of why it is
- find where that model breaks and you can not predict what the system does correctly
The places where your mental model and reality are wrong are the most interesting and productive things to look at!
Programmer working at Google. Python core developer and general FOSS contributor. I also post some parenting content.