Found 98 bookmarks
Newest
Packing Python Projects
Packing Python Projects

This tutorial walks you through how to package a simple Python project. It will show you how to add the necessary files and structure to create the package, how to build the package, and how to upload it to the Python Package Index (PyPI).

·packaging.python.org·
Packing Python Projects
Terminal Emulators Battle Royale – Unicode Edition!
Terminal Emulators Battle Royale – Unicode Edition!

It turns out that Unicode support in Terminals is a lot more difficult than it first appears. A quick overview of special support for Unicode characters in Terminals:

  • "Wide" or "Fullwidth" characters, particularly for East Asian languages and emojis, are codepoints that occupy two cells in a terminal instead of one.
  • "Zero" width combining characters used in languages such as Arabic, Hebrew, or Hindi do not occupy any cells themselves; instead, they modify the previous character.
  • "Zero Width Joiner" (ZWJ U+200D) reduces and combines many codepoints into a single emoji. This is similar to combining, but encoded in a completely different way.
  • "Variation Selector-16" (VS-16 U+FE0F) is a special character that, for specific "Narrow" emojis consuming one cell, causes them to become "Wide", consuming two cells.
·jeffquast.com·
Terminal Emulators Battle Royale – Unicode Edition!
My User Experience Porting Off setup.py
My User Experience Porting Off setup.py
There seems to be a lot of confusion around setup.py and friends; and while I’ve seen pushback against this post (mostly sniffy gatekeeper stuff rather than helpful feedback), it’s a worthwhile read if only because the confusion is real.
·gregoryszorc.com·
My User Experience Porting Off setup.py
Why (Python) type hinting sucks
Why (Python) type hinting sucks
I don’t agree with the post - type hinting is awesome in my experience - but it’s a cleverly-crafted argument and there’s some interesting debate in the comments.
·reddit.com·
Why (Python) type hinting sucks
Should You Use Upper Bound Version Constraints?
Should You Use Upper Bound Version Constraints?

I don't agree with much of this, but I recognise it's a valid position. To quote from the TL;DR at the end:

"Capping dependencies has long term negative effects, especially for libraries, and should never be taken lightly. A library is not installed in isolation; it has to live with other libraries in a shared environment. Only add a cap if a dependency is known to be incompatible or there is a high (>75%) chance of it being incompatible in its next release. Do not cap by default - capping dependencies makes your software incompatible with other libraries that also have strict lower limits on dependencies, and limits future fixes. Anyone can fix a missing cap, but users cannot fix an over restrictive cap causing solver errors. It also encourages hiding issues until they become harder to fix, it does not scale to larger systems, it limits your ability to access security and bugfix updates, and some tools (Poetry) force these bad decisions on your downstream users if you make them. Never cap Python, it is fundamentally broken at the moment. Also, even packing capping has negative consequences that can produce unexpected solves."

·iscinumpy.dev·
Should You Use Upper Bound Version Constraints?
Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack
Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack
"Last week, our automated risk detection platform alerted us to some suspicious activity in dozens of newly published PyPI packages. It appears that these packages are a more sophisticated attempt to deliver the W4SP Stealer on to Python developer’s machines by hiding a malicious import . Join us here on the Phylum research team as we investigate these new and shifting tactics the attacker is using to deploy W4SP stealer in this supply-chain attack."
·blog.phylum.io·
Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack
Musings on Python Type Hints
Musings on Python Type Hints
As a huge fan of type hinting in Python, I feel this is a good article introducing the sorts of things you should think about, and the benefits you should derive from using type hints.
·samgeo.codes·
Musings on Python Type Hints