Sign in

tushar.pyc

@tush.ar
606 followers 152 following 26 posts

Metaprogramming • Python / Zig / DevTools guy

PostsRepliesMedia
tushar.pyc @tush.ar · 15/02/2025
I made a little thing: You can now type check your Jupyter notebooks github.com/beartype/ipy...
github.com
GitHub - beartype/ipython-beartype: IPython extension type-checking IPython environments with @beartype
IPython extension type-checking IPython environments with @beartype - GitHub - beartype/ipython-beartype: IPython extension type-checking IPython environments with @beartype
020
tushar.pyc @tush.ar · 05/01/2025
The video for my PyCon JP 2024 talk "Crimes with the Python syntax" is out now! youtu.be/fxiE6Tb5ofk
youtu.be
041
Reposted by tushar.pyc
Reuven M. Lerner @lernerpython.com · 01/01/2025
Happy new year! Let's hope for a great 2025. And if improving your #Python skills is part of your plan for the new year, check out my starter pack of Python teachers, authors, and speakers. go.bsky.app/M5WjB4s
193
Reposted by tushar.pyc
Armin Ronacher @mitsuhiko.at · 26/12/2024
BTW thanks to folks pointing this out to me, I did find a solution to avoid CSS duplication between light/dark when user overrides are involved. Basically light-dark(...) does respect color-scheme.
1422
tushar.pyc @tush.ar · 22/12/2024
TIL about `copy.replace()` in Python 3.13 Trying to edit a NamedTuple or frozen dataclass in Python is much simpler now: there's a new `__replace__` method on them, and the right API to use it is: >>> v Vector(x=1, y=2) >>> import copy >>> copy.replace(v, x=3) Vector(x=3, y=2)
063
tushar.pyc @tush.ar · 20/12/2024
Something special is cooking...
010
tushar.pyc @tush.ar · 14/12/2024
Two tricks from the builtin `configparser` Python module that everyone should know: - If you're parsing a .ini file with comments, remember to set the `inline_comment_prefixes` param to ignore inline comments - Use `config.getboolean()` to parse '1', 'true', 'yes' etc. to True
020
Reposted by tushar.pyc
Darren Burns @darren.bsky.social · 08/12/2024
Python achievement unlocked - use `functools.cmp_to_key` for the first time: docs.python.org/3/library/fu... Converts a comparison function into a key function - useful for an Advent of Code problem this year!
231
tushar.pyc @tush.ar · 05/12/2024
TIL even if a python package is nested inside a monorepo on github, you can install it with pip: pip install git+github.com/<user>/<monorepo>#subdirectory=my/nested/package
0142
tushar.pyc @tush.ar · 02/12/2024
TIL about the pytest.mock.usefixtures decorator I continue to believe pytest has a feature for every conceivable use case.
120
Reposted by tushar.pyc
dan @danabra.mov · 01/11/2024
atproto aha moments: - you can host your data - it's just json - it's typed but any app dev can invent those types - records have URIs - records are signed so cacheable without trust - relay aggregates everyone’s events into a global stream - backends subscribe to relay and update local DBs
43939143
Reposted by tushar.pyc
Hynek Schlawack @hynek.me · 30/11/2024
In case you wondered how to apply PEP 639 (better PyPI license metadata) in the most common case, here's an example: github.com/python-attrs... And here's how it looks like on PyPI (see Meta section): test.pypi.org/project/attr...
github.com
Apply PEP 639 (#1377) · python-attrs/attrs@3a5a49e
https://discuss.python.org/t/pep-639-round-3-improving-license-clarity-with-better-package-metadata/53020/128
171
tushar.pyc @tush.ar · 29/11/2024
Just found out about `SimpleParsing`, it's an extension of `argparse` but with type annotations and dataclass support, I like its API. github.com/lebrice/Simp...
github.com
GitHub - lebrice/SimpleParsing: Simple, Elegant, Typed Argument Parsing with argparse
Simple, Elegant, Typed Argument Parsing with argparse - lebrice/SimpleParsing
040
Reposted by tushar.pyc
Glyph @glyph.im · 28/11/2024
Saw this release github.com/Yubico/python-fido2/rele… and was excited to see stuff about WindowsClient extensions and "Extension APIs have been redesigned", thinking that maybe github.com/Yubico/python-fido2/issu… was finally addressed, but instead I see […]
mastodon.social
Original post on mastodon.social
111
Reposted by tushar.pyc
Brett Cannon @snarky.ca · 27/11/2024
I wrote a blog post explaining what the #PSF Conduct WG does since I have heard some people get it wrong. snarky.ca/what-the-psf...
snarky.ca
What the PSF Conduct WG does
In the past week I had two people separately tell me what they thought the PSF Conduct WG did and both were wrong (and incidentally in the same way). As such, I wanted to clarify what exactly the WG d...
12916
Reposted by tushar.pyc
ee @durbin.ee · 26/11/2024
and now we put a bow on it: @python.org
185
Reposted by tushar.pyc
Anthony Shaw @anthonypjshaw.bsky.social · 23/11/2024
Hey! I’m Anthony. I work on #Python stuff at Microsoft. I wrote a book once about the Python compiler, blog sometimes and appear at the odd tech conference.
7424
Reposted by tushar.pyc
Tin Tvrtković @tinche.bsky.social · 21/11/2024
Unsure if you've seen this: jellezijlstra.github.io/why-cant-we#...
jellezijlstra.github.io
Why can’t we …?
121
Reposted by tushar.pyc
Hynek Schlawack @hynek.me · 22/11/2024
OMG I DON'T HAVE TO SORT __all__ AND __slots__ BY HAND ANYMORE! I was annoyed literally every time I had to do it. astral.sh/blog/ruff-v0...
astral.sh
Ruff v0.8.0
The next stable version of Ruff is out now.
7779
Reposted by tushar.pyc
Will McGugan @willmcgugan.bsky.social · 22/11/2024
I re-read @hynek.me 's article on SemVer and this cracked me up "...your users will know what’s going on. But they won’t be happy about it and it may bring some negative vibes to your tropical vacation, financed by the millions you’ve made from maintaining a FOSS project." hynek.me/articles/sem...
hynek.me
Semantic Versioning Will Not Save You
The widely used Python package cryptography changed their build system to use Rust for low-level code, which caused an emotional GitHub thread. Enthusiasts of 32-bit hardware from the 1990s aside, a v...
2201
Reposted by tushar.pyc
Brett Cannon @snarky.ca · 20/11/2024
WASI builds at github.com/brettcannon/...
github.com
Release CPython 3.14.0a2 w/ WASI SDK 24 · brettcannon/cpython-wasi-build
072
Reposted by tushar.pyc
Łukasz Langa @lukasz.langa.pl · 20/11/2024
Did you know you can save 30% on PyCharm now and help support the #Python Software Foundation at the same time? discuss.python.org/t/help-power...
discuss.python.org
Help power Python and join in the PSF year-end fundraiser & membership drive!
Hiya, folks 👋 Posting today to share that the PSF has launched our end-of-year fundraiser and we’d love for you to join in! There are three main ways to participate: Save on PyCharm! JetBrains is ...
0103
Reposted by tushar.pyc
Armin Ronacher @mitsuhiko.at · 19/11/2024
This is clever. Because uv supports explicit indexes you can in fact switch pytorch versions based on environment markers. docs.astral.sh/uv/guides/in...
36511
tushar.pyc @tush.ar · 03/11/2024
What??(??) source: justine.lol/lex
000
tushar.pyc @tush.ar · 02/11/2024
TIL about the MANIFEST.in file for setuptools. Looks like this is the canonical way for adding files or folders outside your package into your source distribution. (For non-python files within your package, package-data is enough) setuptools.pypa.io/en/latest/us...
setuptools.pypa.io
020
Reposted by tushar.pyc
Julia Evans @b0rk.jvns.ca · 31/10/2024
ASCII control characters in my terminal jvns.ca/blog/2024/10...
1216417
Reposted by tushar.pyc
Łukasz Langa @lukasz.langa.pl · 19/10/2023
I started a podcast with @pablogsal.bsky.social about #Python internals. We call it "core.py", hope you like it! The first episode is about the core sprint in Brno where we spent last week. podcasters.spotify.com/pod/show/cor...
podcasters.spotify.com
core.py • A podcast on Spotify for Podcasters
It's a-us, foreigners speaking bad English talking about Python internals! One talks like a Mexican, the other like a Russian. Both hate the comparison!
072