<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Python Archives - ShiftMag</title>
	<atom:link href="https://shiftmag.dev/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>https://shiftmag.dev/tag/python/</link>
	<description>Insightful engineering content &#38; community</description>
	<lastBuildDate>Tue, 10 Mar 2026 14:10:37 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shiftmag.dev/wp-content/uploads/2026/09/cropped-Shift-32x32.webp</url>
	<title>Python Archives - ShiftMag</title>
	<link>https://shiftmag.dev/tag/python/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>License Laundering and the Death of Clean Room</title>
		<link>https://shiftmag.dev/license-laundering-and-the-death-of-clean-room-8528/</link>
		
		<dc:creator><![CDATA[Luka Kladaric]]></dc:creator>
		<pubDate>Tue, 10 Mar 2026 14:10:37 +0000</pubDate>
				<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://shiftmag.dev/?p=8528</guid>

					<description><![CDATA[<p>A canary died in the open source coal mine and a hundred people showed up to argue about the autopsy.</p>
<p>The post <a href="https://shiftmag.dev/license-laundering-and-the-death-of-clean-room-8528/">License Laundering and the Death of Clean Room</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></description>
										<content:encoded><![CDATA[<figure class="wp-block-post-featured-image"><img fetchpriority="high" decoding="async" width="1350" height="709" src="https://shiftmag.dev/wp-content/uploads/2026/03/licence-laundering-2.png?x32039" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" style="object-fit:cover;" srcset="https://shiftmag.dev/wp-content/uploads/2026/03/licence-laundering-2.png 1350w, https://shiftmag.dev/wp-content/uploads/2026/03/licence-laundering-2-300x158.png 300w, https://shiftmag.dev/wp-content/uploads/2026/03/licence-laundering-2-1024x538.png 1024w, https://shiftmag.dev/wp-content/uploads/2026/03/licence-laundering-2-768x403.png 768w" sizes="(max-width: 1350px) 100vw, 1350px" /></figure>


<p class="wp-block-paragraph">Last week, a <strong>Python library called <code>chardet</code></strong> became the most contested piece of open source software on the internet. And not because it does anything glamorous &#8211; it detects character encodings and figures out whether your file is UTF-8 or Shift-JIS. </p>



<p class="wp-block-paragraph">It&#8217;s plumbing. The kind of thing that used to sit inside <code>requests</code> (and still does if you have it installed) which means it&#8217;s probably somewhere in your dependency tree whether you know it or not.</p>



<p class="wp-block-paragraph"><strong>Here&#8217;s what happened</strong>:</p>



<p class="wp-block-paragraph"><em>The maintainer who kept this plumbing running for twelve years used Claude to rewrite it from scratch, then <a href="https://github.com/chardet/chardet/releases/tag/7.0.0" target="_blank" rel="noreferrer noopener">published the result</a> under MIT instead of LGPL. The original author, who disappeared from public life in 2011, came back from the dead to <a href="https://github.com/chardet/chardet/issues/327" target="_blank" rel="noreferrer noopener">object</a>. Two hundred and forty-four comments followed. Most of them were unhelpful.</em></p>



<p class="wp-block-paragraph">What makes this interesting isn&#8217;t the law, it&#8217;s that every single participant in this fight <strong>chose a position that protects their ego</strong> over one that would have actually fixed anything.</p>



<h2 class="wp-block-heading">Three licenses walk into a bar&#8230;</h2>



<p class="wp-block-paragraph">If you don&#8217;t live in licensing land, here&#8217;s the short version &#8211; <strong>three licenses matter for this story</strong>: <strong>MIT</strong>, <strong>GPL</strong>, and <strong>LGPL</strong>. They all let you use, modify, and distribute the code. The difference is what they demand in return.</p>



<p class="wp-block-paragraph"><strong>MIT</strong> <strong>says</strong>: do whatever you want. Use it in your startup, your side project, your proprietary product. Keep the copyright notice, and we&#8217;re done. No further obligations. This is why companies love it &#8211; their lawyers read it once, nod, and move on.</p>



<p class="wp-block-paragraph"><strong>GPL</strong> (General Public License)<strong> says</strong>: you can use and modify this code, but if you distribute the result, you have to release <em>your entire program&#8217;s</em> source code under the same license. That’s the “copyleft” mechanism, keeping free software free. The trade-off: it’s viral &#8211; if GPL code touches your code, your code inherits the obligation. Most companies treat GPL like radioactive material; legal teams won’t approve it for anything shipped to customers.</p>



<p class="wp-block-paragraph"><strong>LGPL</strong> (Lesser GPL) i<strong>s the compromise</strong>. It says: you can use this library inside proprietary software without the copyleft spreading to your code (that&#8217;s the &#8220;Lesser&#8221; part). But if you modify <em>the library itself</em>, those modifications must stay under LGPL. You must include the license, provide the library’s source, and let users swap in their own modified version. That last part matters: it’s meant for libraries like chardet &#8211; shared plumbing usable everywhere, but with improvements flowing back to the community. The practical consequence: <strong>MIT code can go anywhere</strong>.</p>



<p class="wp-block-paragraph">GPL code can only go into other GPL projects. <strong>LGPL sits in between: any project can <em>use</em> it, but nobody can take improvements private</strong>. </p>



<p class="wp-block-paragraph">The Python standard library requires permissive licensing (MIT, BSD, or similar) because anything in stdlib ships with every Python installation on earth, including inside proprietary products. LGPL&#8217;s requirements (source disclosure, relinkability, copyleft on modifications) make that impossible. That one restriction is what set this entire fight in motion.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-2-1024x614.png?x32039" alt="" class="wp-image-8556" srcset="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-2-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-2-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-2-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-2.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">The release that started it all. </figcaption></figure>



<h2 class="wp-block-heading"><span id="the-maintainer-should-have-forked">The maintainer should have forked</span></h2>



<p class="wp-block-paragraph"><strong>Dan Blanchard</strong> has been <a href="https://github.com/chardet/chardet/graphs/contributors" target="_blank" rel="noreferrer noopener">primary maintainer</a> of <code>chardet</code> since 2013, contributing nearly seven hundred commits versus forty-eight from the next person. He aimed to relicense the library for Python standard library inclusion &#8211; a goal <a href="https://github.com/chardet/chardet/issues/36" target="_blank" rel="noreferrer noopener">on record since 2014</a>. It’s reasonable: LGPL prevents stdlib inclusion, and chardet is one of Python’s most widely used packages.</p>



<p class="wp-block-paragraph">So, <strong>he used Claude Code to write a clean reimplementation</strong>. Ran <a href="https://github.com/jplag/JPlag" target="_blank" rel="noreferrer noopener">JPlag</a> plagiarism detection. Got <a href="https://github.com/chardet/chardet/issues/327#issuecomment-4005195078" target="_blank" rel="noreferrer noopener">0.04% average similarity</a> to the old codebase. Published the <a href="https://github.com/chardet/chardet/commit/f51f523506a73f89f0f9538fd31be458d007ab93" target="_blank" rel="noreferrer noopener">design documents</a>. Published the <a href="https://github.com/chardet/chardet/commits/7.0.0.rc4/docs/plans?since=2026-02-26&amp;until=2026-03-05&amp;after=cc951583cf34e283b04e15942b1a053eb195c2cd+34" target="_blank" rel="noreferrer noopener">implementation plans</a>. Released it as <a href="https://github.com/chardet/chardet/releases/tag/7.0.0" target="_blank" rel="noreferrer noopener">version 7.0.0</a> under MIT.</p>



<p class="wp-block-paragraph">And he did all of this under the same package name, in the same repository, on the same <a href="https://pypi.org/project/chardet/" target="_blank" rel="noreferrer noopener">PyPI listing</a>.</p>



<p class="wp-block-paragraph">That&#8217;s the mistake &#8211; not the rewrite, not the AI. Not even the license change in isolation. <strong>The mistake is claiming your code is &#8220;an independent work, not a derivative&#8221; while simultaneously shipping it as the next version of the thing you say it&#8217;s independent from.</strong></p>



<p class="wp-block-paragraph">You don&#8217;t get to have it both ways: If 7.0.0 is an independent work, it&#8217;s not chardet, call it <code>chardet-ng.</code>Call it <code>chardetect</code>. Call it <code>encoding-detector</code>. Ship it as a new package. Let people migrate on their own terms. <strong>The Python standard library doesn&#8217;t care what the package is called on PyPI, it cares about the license and the code quality</strong>.</p>



<p class="wp-block-paragraph">There&#8217;s a real question buried here that most people skipped over: who actually controls the PyPI listing? Dan has been the sole active maintainer for over a decade. Could he even publish a fresh package under the chardet name without owning the existing listing? PyPI doesn&#8217;t have a &#8220;fork the namespace&#8221; button. The infrastructure assumes continuity.</p>



<p class="wp-block-paragraph">That&#8217;s a genuine constraint, not just a convenience play. But it doesn&#8217;t change the outcome &#8211; <strong>if the code is independent, it deserves an independent identity</strong>, even if the migration is harder.</p>



<p class="wp-block-paragraph">But Dan didn&#8217;t do that, because the value isn&#8217;t in the code &#8211; the value is in the name. In the twelve years of trust built by that name. In the fact that thousands of <code>requirements.txt </code>files already have <code>chardet</code> in them.</p>



<p class="wp-block-paragraph">He knows this. He said as much in the issue: &#8220;It&#8217;s not like this was a thing I just popped into last week.&#8221; Right. That&#8217;s the point. The name carries weight that the code, by itself, does not. <strong>And the name isn&#8217;t his to relicense.</strong></p>



<h2 class="wp-block-heading"><span id="the-mob-should-have-shown-up-years-ago">The mob should have shown up years ago</span></h2>



<p class="wp-block-paragraph">242 comments. People comparing Dan to a sex offender. <strong>People offering to fund lawsuits</strong>. People from a group called &#8220;Monadic Sheep&#8221; volunteering to take over the project. The FSF was invoked. DMCA was invoked incorrectly. Someone brought up trademark law. Someone posted a Rust rewrite just to prove a point.</p>



<p class="wp-block-paragraph">Where were all these people for the last twelve years?</p>



<p class="wp-block-paragraph">Dan maintained this library alone. No funding. No co-maintainers. No help. The other two people on the chardet team haven&#8217;t committed <strong>since 2017 at the latest </strong>&#8211; one of them not since 2012. The original author deleted his entire internet presence in 2011. This is one of the most depended-upon packages in the Python ecosystem, and it was held together by a single person on their own time.</p>



<p class="wp-block-paragraph">Now that person does something people don&#8217;t like, and <strong>suddenly everyone has opinions about governance and stewardship and the spirit of free software</strong>.</p>



<p class="wp-block-paragraph"><a href="https://github.com/chardet/chardet/issues/327#issuecomment-4005706474" target="_blank" rel="noreferrer noopener">Mike Hoye</a> nailed it in the thread: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">If the end state of open source projects is that devs are left to work alone for years on the keystone projects of this jenga tower we&#8217;re calling modern infrastructure, and then we collectively jump all over them when they turn to the kind of help that, however reprehensible it might be, actually shows up to help, then this entire FOSS project is just a popularity contest where the losers join a slow, lonely suicide pact.</p>
</blockquote>



<p class="wp-block-paragraph">That&#8217;s not comfortable to read. It&#8217;s accurate.</p>



<p class="wp-block-paragraph">The people most outraged by this license change are people who <strong>benefited from Dan&#8217;s work for a decade</strong> without lifting a finger. Consumed the output of a copyleft license without contributing back. Relied on a single maintainer without offering support. And now they&#8217;re furious he made a unilateral decision without consulting them.</p>



<p class="wp-block-paragraph"><strong>If you want a voice in how a project is governed, you have to be present when the project needs governing. Not just when it does something you don&#8217;t like.</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="512" src="https://shiftmag.dev/wp-content/uploads/2026/03/chardet-github-1024x512.png?x32039" alt="" class="wp-image-8552" srcset="https://shiftmag.dev/wp-content/uploads/2026/03/chardet-github-1024x512.png 1024w, https://shiftmag.dev/wp-content/uploads/2026/03/chardet-github-300x150.png 300w, https://shiftmag.dev/wp-content/uploads/2026/03/chardet-github-768x384.png 768w, https://shiftmag.dev/wp-content/uploads/2026/03/chardet-github.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">The last time anyone other than Dan Blanchard contributed to chardet, Donald Trump was just starting his first term. </figcaption></figure>



<h2 class="wp-block-heading"><span id="the-ai-optimists-should-stop-celebrating"><strong>The AI optimists should stop celebrating</strong></span></h2>



<p class="wp-block-paragraph">Armin Ronacher wrote a blog post about this called <a href="https://lucumr.pocoo.org/2026/3/5/theseus/" target="_blank" rel="noreferrer noopener">&#8220;AI And The Ship of Theseus.&#8221;</a> He&#8217;s excited. He sees AI rewrites as a way to finally escape the GPL, which he views as a restriction on sharing:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"> If you throw away all code and start from scratch, even if the end result behaves the same, it&#8217;s a new ship.</p>
</blockquote>



<p class="wp-block-paragraph">With respect to Armin, whose work I deeply admire, <strong>this framing is dangerous</strong>.</p>



<p class="wp-block-paragraph">What he&#8217;s describing is license laundering. Take copyleft code. Feed it to a model that was trained on that code. Ask the model to produce something functionally equivalent. Point at the output and say &#8220;look, no similarity.&#8221; <strong>The fact that a plagiarism detector can&#8217;t find matching tokens doesn&#8217;t mean the work is independent</strong>. It means the laundering was effective.</p>



<p class="wp-block-paragraph">If this technique is legitimate, every copyleft project in existence is one Claude session away from becoming MIT. Or proprietary. The same trick works in both directions.</p>



<p class="wp-block-paragraph"><a href="https://github.com/chardet/chardet/issues/327#issuecomment-4005536956" target="_blank" rel="noreferrer noopener">Someone in the GitHub thread</a> made the sharpest observation of the entire debate: <em>take a leaked Windows source code dump, run it through an LLM, and release the output as open source. Is that acceptable? If not, explain why chardet is different. </em>The mechanism is identical. The only variable is whether you sympathize with the copyright holder.</p>



<p class="wp-block-paragraph">Ronacher also points out that:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Vercel happily reimplemented bash but got visibly upset when someone reimplemented Next.js in the same way.</p>
</blockquote>



<p class="wp-block-paragraph">He means this as a critique of hypocrisy. It&#8217;s actually a critique of his own position. <strong>Everyone is fine with license laundering when it benefits them</strong>. Nobody is fine with it when it&#8217;s their code being laundered. That&#8217;s not a principled stance. That&#8217;s convenience.</p>



<p class="wp-block-paragraph">The celebration of AI-assisted relicensing as &#8220;exciting&#8221; or &#8220;progress&#8221; only works if you assume that copyleft licenses are a mistake that needs a technological workaround. <strong>If you think authors should have the right to choose how their work is used, this should terrify you</strong>. Not because the law is clear, but because it isn&#8217;t. And the people with the resources to push the boundaries are the ones who benefit from copyleft disappearing.</p>



<h2 class="wp-block-heading"><span id="the-man-who-defined-open-source-says-you-already-lost"><strong>The man who defined open source says you already lost</strong></span></h2>



<p class="wp-block-paragraph">Bruce Perens <a href="https://github.com/chardet/chardet/issues/331#issuecomment-4009498498" target="_blank" rel="noreferrer noopener">showed up</a> in a <a href="https://github.com/chardet/chardet/issues/331" target="_blank" rel="noreferrer noopener">separate chardet issue</a>. If you don&#8217;t know the name: he co-founded the <a href="https://opensource.org/" target="_blank" rel="noreferrer noopener">Open Source Initiative</a> and wrote the <a href="https://opensource.org/osd" target="_blank" rel="noreferrer noopener">Open Source Definition</a>. He&#8217;s the person who decided what &#8220;open source&#8221; means.</p>



<p class="wp-block-paragraph">His position should make everyone uncomfortable.</p>



<p class="wp-block-paragraph">To the copyleft defenders, he said: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The courts have not sided with plaintiffs in finding AI work to be infringing so far, because the law as it stands today is built primarily around the concept of literal copying, cut and paste of the actual text. </p>
</blockquote>



<p class="wp-block-paragraph">The AI doesn&#8217;t do that. It produces statistically probable output from a blended model of everything it&#8217;s been trained on. The result is &#8220;unrecognizable as derived from any one source.&#8221;</p>



<p class="wp-block-paragraph">Then he added this:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">I was hoping the courts would go a different way than they have so far. My present conclusion is that the wrong side may have won, but they won.</p>
</blockquote>



<p class="wp-block-paragraph">Read that again. <strong>The man who defined open source licensing thinks the wrong side won</strong>. And he&#8217;s telling you to act accordingly.</p>



<p class="wp-block-paragraph">To the AI enthusiasts celebrating, he offered no comfort either: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">I am not evangelizing this. This might not be the world I would have liked to have, but it&#8217;s the one we got.</p>
</blockquote>



<p class="wp-block-paragraph">And to the companies wondering what to do, he was blunt: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">I do not recommend rejecting an AI-mediated Open Source program with verified low-similarity to other works on the basis of legal risk at this time.</p>
</blockquote>



<p class="wp-block-paragraph">Not because it&#8217;s right. Because the law, as it currently works, doesn&#8217;t have the tools to stop it. &#8220;So, yes, it&#8217;s copying, but it&#8217;s not the kind of copying the court is going to prosecute as a copyright violation.&#8221; (He <a href="https://www.theregister.com/2026/03/06/ai_kills_software_licensing/" target="_blank" rel="noreferrer noopener">expanded on this</a> in an interview with The Register.)</p>



<p class="wp-block-paragraph">Perens is describing a world where copyright law was built for photocopiers and the technology outran it. The copyleft purists are right on principle. The AI laundering crowd is right on current law. And the gap between those two things is where every open source project now lives.</p>



<p class="wp-block-paragraph"><strong>Nobody in the chardet thread wants to sit with this</strong>. The purists want to believe the law will catch up. The optimists want to believe the law was always wrong. Perens is telling both sides that the law is what it is, it&#8217;s probably not going to change fast enough to matter, and you should plan accordingly.</p>



<p class="wp-block-paragraph">That&#8217;s a f*****g eulogy, not a victory speech.</p>



<h2 class="wp-block-heading"><strong>The copyleft purists should stop pretending they&#8217;re owed</strong></h2>



<p class="wp-block-paragraph">On the other side of the thread, <strong>people are arguing that Dan owes the LGPL, the FSF, and the original author something that goes beyond what the license actually says</strong>.</p>



<p class="wp-block-paragraph">The LGPL says derivative works must be released under the same license. The core legal question is whether 7.0.0 is a derivative work. That&#8217;s a question for a judge, not for a GitHub comment thread. And it&#8217;s genuinely unclear. The JPlag numbers suggest structural independence. The fact that Claude was trained on the original code suggests something murkier.</p>



<p class="wp-block-paragraph">Some commenters went further than the legal point: Dan should step down, never be trusted, his work is a supply chain risk, and twelve years of maintenance entitle him to nothing.</p>



<p class="wp-block-paragraph"><strong>That&#8217;s not a principled defense of copyleft. That&#8217;s resentment wearing a license as a mask.</strong></p>



<p class="wp-block-paragraph">A license is a legal instrument. It grants and restricts specific rights. It does not create a moral hierarchy where the original author has permanent authority over a project they abandoned fifteen years ago, simply because they chose the license. The LGPL doesn&#8217;t say &#8220;the maintainer must defer to the original author in perpetuity.&#8221; It says derivative works must carry the same license.</p>



<p class="wp-block-paragraph">If the code is truly independent, the LGPL doesn&#8217;t apply. If it&#8217;s not, the LGPL requires the license to be reverted. Those are the only two outcomes the license contemplates. &#8220;The maintainer should resign in shame&#8221; is not one of them.</p>



<p class="wp-block-paragraph"><strong>Dan&#8217;s mistake was strategic, not moral</strong>. He should have made a new project. He didn&#8217;t, and now he&#8217;s in a mess. But treating him like he committed a crime against the commons, when he&#8217;s the only person who actually showed up to maintain the commons for over a decade, is selective outrage at its worst.</p>



<h2 class="wp-block-heading"><span id="the-only-person-who-did-their-job-right"><strong>The only person who did their job right</strong></span></h2>



<p class="wp-block-paragraph"><strong>Mark Pilgrim</strong> <a href="https://github.com/chardet/chardet/issues/327" target="_blank" rel="noreferrer noopener">opened the issue</a>: 4 paragraphs, no insults, no legal threats, no grandstanding.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">I respectfully insist that they revert the project to its original license.</p>
</blockquote>



<p class="wp-block-paragraph">Then he stopped talking. </p>



<p class="wp-block-paragraph"><strong>He made his position clear, provided his reasoning, and let others respond</strong>. He didn&#8217;t engage with the two hundred comments that followed. Didn&#8217;t threaten lawsuits or moralize. He stated a fact as he understands it and left.</p>



<p class="wp-block-paragraph">Mark Pilgrim was a hero of mine. I grew up on <a href="https://diveintopython3.problemsolving.io/" target="_blank" rel="noreferrer noopener">Dive Into Python</a>. His blog was one of those places where you went to learn how to think about the web, not just how to build for it. When he <a href="https://meyerweb.com/eric/thoughts/2011/10/04/searching-for-mark-pilgrim/" target="_blank" rel="noreferrer noopener">deleted his entire internet presence</a> in 2011, it hit a lot of us hard. People called it an &#8220;infosuicide.&#8221; Whatever his reasons were, the web lost something real that day. Seeing his name show up in a GitHub issue in 2026 was &#8211; I don&#8217;t know. Not closure. But something.</p>



<p class="wp-block-paragraph"><a href="https://github.com/textfiles" target="_blank" rel="noreferrer noopener">Jason Scott</a> vouched for his identity. <strong>And then he did something remarkable: he stayed out of it</strong>. Jason Scott is the kind of person who could give a two-hour talk on this topic without repeating himself. He&#8217;s an archivist, a historian, and nobody&#8217;s fool. The fact that he showed up, confirmed Mark was Mark, and then chose not to add his voice to the pile, that&#8217;s restraint that most people in that thread couldn&#8217;t manage. Sometimes the most useful thing you can do is not talk.</p>



<p class="wp-block-paragraph">The person with the most legitimate claim to outrage was the least outraged person in the thread. <strong>The person most qualified to add commentary chose silence.</strong> There&#8217;s a lesson in that, if anyone&#8217;s paying attention.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1024x614.png?x32039" alt="" class="wp-image-8548" srcset="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><strong>Meanwhile, in the real world</strong>&#8230;</h2>



<p class="wp-block-paragraph">While the GitHub thread debated philosophy, someone who works at NVIDIA <strong><a href="https://github.com/chardet/chardet/issues/331" target="_blank" rel="noreferrer noopener">opened a separate issue</a> with a different framing entirely</strong>. No ideology. No license theory. Just a practical assessment from someone who has to get software approved by a legal team before it ships. (They explicitly noted their opinions don&#8217;t represent NVIDIA&#8217;s.)</p>



<p class="wp-block-paragraph">The title: &#8220;v7.0.0 presents unacceptable legal risk to users due to copyright controversy.&#8221;</p>



<p class="wp-block-paragraph">The conclusion: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">chardet v7.0.0 is absolutely toxic. If my employer&#8217;s open source review legal people got wind of it, I seriously doubt that they&#8217;d approve v7.0.0 and up for any use under any circumstances whatsoever.</p>
</blockquote>



<p class="wp-block-paragraph"><strong>This is the part that should have stopped everyone cold</strong>.</p>



<p class="wp-block-paragraph">Dan&#8217;s stated goal was to make chardet more widely adopted. Get it into the Python standard library. Remove the LGPL barrier that kept companies from contributing.</p>



<p class="wp-block-paragraph">Instead, <strong>the rewrite made chardet <em>less</em> usable than it was before</strong>. Under LGPL, any company could use it freely &#8211; LGPL is specifically designed to be non-viral for library consumers. Under the disputed MIT, no company with a functioning legal team will touch it. Not because MIT is worse than LGPL, but because the <em>provenance</em> is radioactive. The license dispute itself is the contamination.</p>



<p class="wp-block-paragraph">Dan&#8217;s own user is telling him:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"> I can&#8217;t use this anymore. The license isn&#8217;t the problem. The uncertainty is. And uncertainty is worse than the restriction ever was.</p>
</blockquote>



<p class="wp-block-paragraph">This is what happens when you optimize for a theoretical audience (stdlib committee, hypothetical future contributors) instead of the actual one (the thousands of projects that depend on your library right now). You <strong>trade a known constraint for an unknown risk</strong>. And in enterprise software, unknown risk is the one thing nobody can accept.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1-1024x614.png?x32039" alt="" class="wp-image-8550" srcset="https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2026/03/Simic-Shiftmag-1.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><span id="what-this-is-actually-about"><strong>What this is actually about</strong>?</span></h2>



<p class="wp-block-paragraph">This fight isn&#8217;t about chardet, it&#8217;s about three things crashing into each other at once, and <strong>nobody wants to untangle them because each thread, pulled separately, leads somewhere uncomfortable</strong>.</p>



<p class="wp-block-paragraph"><strong>Thread 1: who owns a project?</strong> Open source has no good answer for what happens when the original author leaves and a sole maintainer carries the project for a decade. The license governs the code. Nothing governs the name, the reputation, the PyPI listing, the trust. Dan accumulated something real over twelve years. It&#8217;s not copyright. It&#8217;s not a trademark. But it&#8217;s not nothing, and the current system has no framework for recognizing it or limiting it.</p>



<p class="wp-block-paragraph"><strong>Thread 2: AI makes clean-room arguments meaningless.</strong> The entire concept of a clean-room implementation (where you build something from scratch without ever looking at the original code, so you can prove your version is independent) assumes that knowledge contamination is binary. Either you&#8217;ve seen the code or you haven&#8217;t. LLMs break this model completely. The model has &#8220;seen&#8221; the code during training. The developer has seen the code during years of maintenance. The output has near-zero structural similarity.</p>



<p class="wp-block-paragraph">Is that independence, or is it effective laundering? Nobody knows. No court has ruled. The first ruling will set precedent for every copyleft project in every language.</p>



<p class="wp-block-paragraph"><strong>Thread 3: copyleft has a sustainability problem.</strong> LGPL kept chardet from entering the Python standard library for over a decade. It kept a sole maintainer trapped in a licensing box that actively prevented the project from growing. The license did exactly what it was designed to do, and the result was a critical dependency maintained by one exhausted person. If your license&#8217;s primary effect is preventing adoption and discouraging contribution, you should at least acknowledge that outcome before invoking the license as sacred.</p>



<p class="wp-block-paragraph"><strong>None of these threads have clean answers</strong>. But here&#8217;s what would have worked: Dan creates a new project called <code>chardetect</code> under MIT. He announces that <code>chardet</code> 6.x is the final LGPL release and will receive security fixes only. He points the community to the new project. Mark has no grounds to object because the new project doesn&#8217;t claim to be chardet. The Python stdlib gets its MIT implementation. Everyone who depends on <code>chardet</code> can migrate on their own schedule. Nobody&#8217;s trust gets violated.</p>



<p class="wp-block-paragraph">That didn&#8217;t happen because it would have required Dan to give up the one thing that made the rewrite valuable: <strong>the name.</strong></p>



<h2 class="wp-block-heading"><span id="the-uncomfortable-question"><strong>The uncomfortable question</strong></span></h2>



<p class="wp-block-paragraph">Pull up your dependency tree. Find the packages maintained by a single person. Check when they last committed. Check who else has commit access.</p>



<p class="wp-block-paragraph">That&#8217;s your chardet. It&#8217;s sitting there right now. And when the maintainer finally snaps, burns out, or makes a decision you don&#8217;t like, you&#8217;ll have opinions about governance too.</p>



<p class="wp-block-paragraph"><strong>The question is whether you&#8217;ll have earned them.</strong></p>



<p class="wp-block-paragraph"><em>Further reading:</em><a href="https://simonwillison.net/2026/Mar/5/chardet/" target="_blank" rel="noreferrer noopener"><em> Simon Willison&#8217;s analysis</em></a><em> of the chardet dispute,</em><a href="https://lucumr.pocoo.org/2026/3/5/theseus/" target="_blank" rel="noreferrer noopener"><em> Armin Ronacher&#8217;s &#8220;AI And The Ship of Theseus&#8221;</em></a><em>,</em><a href="https://www.theregister.com/2026/03/06/ai_kills_software_licensing/" target="_blank" rel="noreferrer noopener"><em> Bruce Perens in The Register</em></a><em>, the</em><a href="https://github.com/chardet/chardet/issues/327" target="_blank" rel="noreferrer noopener"><em> original GitHub issue</em></a><em>, and the</em><a href="https://github.com/chardet/chardet/issues/331" target="_blank" rel="noreferrer noopener"><em> legal risk issue</em></a><em>. </em></p>



<p class="wp-block-paragraph"><em>The original</em><a href="https://www-archive.mozilla.org/projects/intl/universalcharsetdetection" target="_blank" rel="noreferrer noopener"><em> Mozilla research</em></a><em> on universal character set detection that predates all of this. The</em><a href="https://www.copyright.gov/ai/Copyright-and-Artificial-Intelligence-Part-2-Copyrightability-Report.pdf" target="_blank" rel="noreferrer noopener"><em> US Copyright Office report</em></a><em> on AI and copyrightability.</em><a href="https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc." target="_blank" rel="noreferrer noopener"><em> Google v. Oracle</em></a><em> on API copyrightability and fair use.</em></p>
<p>The post <a href="https://shiftmag.dev/license-laundering-and-the-death-of-clean-room-8528/">License Laundering and the Death of Clean Room</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tame Python Chaos With uv &#8211; The Superpower Every AI Engineer Needs</title>
		<link>https://shiftmag.dev/tame-python-chaos-with-uv-the-superpower-every-ai-engineer-needs-6051/</link>
		
		<dc:creator><![CDATA[Edvin Teskeredžić]]></dc:creator>
		<pubDate>Wed, 22 Oct 2025 13:38:44 +0000</pubDate>
				<category><![CDATA[Developer Experience]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Developer Productivity]]></category>
		<category><![CDATA[Engineer Explains]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[poetry]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[uv]]></category>
		<guid isPermaLink="false">https://shiftmag.dev/?p=6051</guid>

					<description><![CDATA[<p>Managing Python dependencies has always been a pain point - from slow installs to version mismatches across projects. uv aims to fix that.</p>
<p>The post <a href="https://shiftmag.dev/tame-python-chaos-with-uv-the-superpower-every-ai-engineer-needs-6051/">Tame Python Chaos With uv &#8211; The Superpower Every AI Engineer Needs</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you’re like me, you love writing code &#8211; it’s fun and solves real problems. But too often, <strong>we end up wrestling with tooling before we can even start</strong>, especially in Python with its dreadful dependency management.</p>



<p class="wp-block-paragraph">Using <code>pip</code> is like assembling IKEA furniture without instructions. Add a single package, and suddenly you’re battling dependency conflicts, version chaos, and cryptic errors &#8211; decoding them feels like reading an ancient language.</p>



<p class="wp-block-paragraph">I can’t even run a simple script without either polluting my global environment or creating a virtual environment for a one-off script I’ll never run again.</p>



<p class="wp-block-paragraph">It&#8217;s ridiculous how something that should simplify our lives makes it more complicated, especially compared to other ecosystems. Having previously worked with Ruby and its beautiful <a href="https://guides.rubygems.org/" target="_blank" rel="noreferrer noopener">and mature gem system</a>, I felt like <strong>switching to Python downgraded my experience</strong>.</p>



<h3 class="wp-block-heading"><span id="simplifying-python-projects-with-uv">Simplifying Python projects with <code>uv</code></span></h3>



<p class="wp-block-paragraph">As engineers, we desire simple, robust, and predictable solutions. Yet here I was, praying that my environment wouldn&#8217;t implode every time I made a tiny change or &#8211; God forbid &#8211; updated a package version.</p>



<p class="wp-block-paragraph">After some search (and reading <a href="https://www.oreilly.com/library/view/hypermodern-python-tooling/9781098139575/" target="_blank" rel="noreferrer noopener">the excellent book Hypermodern Python Tooling</a>), I&#8217;ve found an alternative that solved most of my issues in one swoop:<code> uv</code> &#8211; a <strong>fast, modern, and reliable Python dependency management tool</strong>.</p>



<p class="wp-block-paragraph">It streamlined the internal process of developing Python services within our team and made us more productive. Our builds are faster, and it eliminated all the complexity we had from using many different tools.</p>



<p class="wp-block-paragraph">In this article, I&#8217;ll convince you to leave your comfort zone and switch to using <code>uv</code> as your go-to tool for everything and anything Python.</p>



<h2 class="wp-block-heading"><span id="the-hellscape-that-is-python-tooling">The hellscape that is Python tooling</span></h2>



<p class="wp-block-paragraph">In terms of tooling, entering the Python ecosystem while previously working with Ruby (and privately with Go) <strong>felt like I replaced a reliable Toyota with a carriage drawn</strong> <strong>by a malnourished horse</strong>.</p>



<p class="wp-block-paragraph">Virtual environments, <code>pip</code>, and dependency management wasted many engineering hours that we could have spent writing code (and producing actual value!).</p>



<p class="wp-block-paragraph">Spinning up a new microservice tested your patience, as the tooling tried to ruin your day with a broken package, an unreadable error message, or sluggish build times because the cache didn&#8217;t update somewhere.</p>



<h2 class="wp-block-heading">Let&#8217;s talk about real-world examples</h2>



<p class="wp-block-paragraph">Dependency management with <code>pip</code><strong> behaves unpredictably</strong>. It can&#8217;t build anything beyond the simplest dependency graph. When you work on legacy code (and you absolutely will), updating it often breaks your functionalities. You can only debug by endlessly examining the output of <code>pip freeze</code> until that command engraves itself in your brain like an ancient chant.</p>



<p class="wp-block-paragraph">The core problems come from the fact that<code> </code><strong><code>pip</code> doesn&#8217;t guarantee that two runs of installing dependencies will also install the same sub-dependencies</strong>. If you want to know more, there&#8217;s a great <a href="https://vodkat.dev/python-dependency-fustrations/" target="_blank" rel="noreferrer noopener">article</a> about this.<br><br><strong>Virtual environments devour disk space</strong>. The concept sounds great: if project A uses one version of dependency X, and project B uses another, you isolate them in virtual environments so every project keeps its source of truth. But in practice, you quickly drain your memory when running many Python services, each with its own project.</p>



<p class="wp-block-paragraph">The problem worsens with <strong>AI-based projects</strong>: in the AI space, we often use <a href="https://pytorch.org/" target="_blank" rel="noreferrer noopener">PyTorch</a> and that single dependency consumes at least 936MB for the CPU version and 1.8GB for the GPU version (numbers taken from the PyTorch forums, <a href="https://discuss.pytorch.org/t/pytorch-2-0-distribution-that-uses-cuda-only-if-available/177230?utm_source=chatgpt.com" target="_blank" rel="noreferrer noopener">here</a> and <a href="https://discuss.pytorch.org/t/large-cpu-file-size/112709?utm_source=chatgpt.com" target="_blank" rel="noreferrer noopener">here</a>). <br><br>Imagine running multiple AI projects &#8211; if we keep this up, our disk space disappears.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2025/09/edvin1-1024x614.png?x32039" alt="" class="wp-image-6052" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/edvin1-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin1-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin1-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin1.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">These are just a few examples of Python’s frustrating tooling. Stick with me &#8211; we’re about to fix them all with one tool: <strong>uv</strong>.</figcaption></figure>



<h2 class="wp-block-heading"><span id="say-hi-to-uv">Say Hi to uv!</span></h2>



<p class="wp-block-paragraph">Now that we&#8217;ve established how badly Python needs better tooling, let&#8217;s look at <code>uv</code>. <br><br>What exactly is <code>uv</code>? <a href="https://docs.astral.sh/uv/" target="_blank" rel="noreferrer noopener">According to their website</a>, <code>uv </code>is a <strong>high-speed Python package and project manager written in Rust</strong>. Integrating <code>uv</code> into your workflow eliminates most of the tools you currently rely on &#8211; it directly replaces <code>pip</code>,<code> pip - tools</code>, <code>poetry</code>, and many more.</p>



<p class="wp-block-paragraph">The core design philosophy focuses on<strong> giving you one Python development tool while also delivering extreme speed</strong> (we&#8217;ll test this later). </p>



<p class="wp-block-paragraph">&#8220;Alright,&#8221; you might ask, &#8220;what can this magical tool do?&#8221; Great question! Let’s look at some of <strong>uv</strong>’s most compelling features.</p>



<h2 class="wp-block-heading"><span id="project-dependency-management">Project dependency management</span></h2>



<p class="wp-block-paragraph">Managing your Python project with <code>uv</code> is extremely simple because <strong><code>uv</code> provides first-class project support</strong> built around declarative manifests and universal lockfiles (similar to those in the JS ecosystem and Poetry).</p>



<p class="wp-block-paragraph">This setup <strong>ensures reproducible installs and fast syncs.</strong> You initialize projects with<code> uv init</code>, add and declare dependencies (e.g., <code>numpy</code> and <code>lang chain</code>), and generate fully pinned lockfiles with <code>uv lock</code>.</p>



<p class="wp-block-paragraph">After that, subsequent environment creations or updates (&#8220;syncs&#8221;) use that lockfile to reproduce identical sub-dependency graphs every time. In practice, this stops the endless back-and-forth of &#8220;works on my machine&#8221; messages via Slack.</p>



<p class="wp-block-paragraph">Unlike plain <code>pip install</code>, which can produce different sub-dependency graphs on repeated runs (creating inconsistent project environments), <code>uv lock</code> locks everything down &#8211; <strong>you won&#8217;t encounter surprises halfway through a deployment pipeline</strong>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin2-1024x614.png?x32039" alt="" class="wp-image-6054" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin2-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin2-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin2-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin2.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><span id="running-standalone-scripts">Running standalone scripts</span></h2>



<p class="wp-block-paragraph">Whipping up a quick Python script to try something out is amazing &#8211; until you need packages without standard Python. Then the experience quickly turns into <code>venv</code> juggling and ad-hoc<code> pip</code> installs.</p>



<p class="wp-block-paragraph">With <code>uv,</code> we can run <strong>standalone scripts without creating new environments</strong>: just run <code>uv</code> <code>run --with</code> <code>[your packages] script.py</code> to auto-install any dependencies to the cache and run your script. These commands install packages on the fly, and you can later lock them with <code>uv lock </code>if needed.</p>



<p class="wp-block-paragraph">You can even embed metadata into your scripts to declare dependencies and required Python versions, like so:</p>



<pre class="wp-block-code"><code># /// script
# requires-python = "&gt;=3.13"
# dependencies = &#91;
#     "langchain",
#     "typer==0.12.3",
# ]
# ///

import os
import langchain
# ... rest of your script ...</code></pre>



<p class="wp-block-paragraph">You can save this script and run it efficiently with <code>uv run script.py.</code> Thanks to uv&#8217;s speedy resolver and global cache, <strong>the script runs repeatably and in milliseconds</strong>. You can finally spend less time fighting your environment and more time doing what you actually want: writing code.</p>



<h2 class="wp-block-heading"><span id="disk-space-efficiency">Disk-Space Efficiency</span></h2>



<p class="wp-block-paragraph"><code>Uv </code>maintains a <strong>global cache of all downloaded packages</strong>. Once you fetch any version of a package (even a sub-dependency!), you never need to re-download or duplicate it across projects. By comparison, pip re-downloads wheels into each virtual environment, and Poetry duplicates caches in projects &#8211; these approaches waste massive amounts of disk space, which matters especially for AI-based projects and workflows.<br><br>To get a bit technical,<strong> <code>uv</code> keeps a single copy of each exact release in a global cache directory</strong>. Any project that needs the same version can access it via a symlink, rather than copying the entire package into the project. Beyond this cache, <code>uv </code>writes project-specific artifacts (e.g., compiled wheels) into a per-project store. Since both stores use content hashes to identify files, uv instantly detects duplicates.</p>



<p class="wp-block-paragraph">This means that if two projects depend on<strong><code> langchain-0.3.24</code>,</strong> <code>uv</code> stores that version only once.<br>The real-world impact is visible in multi-project AI workflows. As AI engineers, we often maintain and juggle multiple PyTorch-based services.</p>



<p class="wp-block-paragraph">We drastically reduce total disk usage<strong> by sharing the PyTorch wheel (approximately 1.8 GB) </strong>across various projects. As the memory footprint from dependencies shrinks, scaling up microservice-based architectures becomes more manageable.</p>



<p class="wp-block-paragraph"> This improvement is crucial for CI pipelines and developer workstations, which can run multiple microservices simultaneously.</p>



<h2 class="wp-block-heading"><span id="speed">Speed!</span></h2>



<p class="wp-block-paragraph">One of the main drawbacks of working in the AI space is the sheer size of all the packages and tools that a modern AI service uses. Installing all those dependencies takes time, <strong>slows down our CI/CD pipeline</strong>, and hampers our developer experience. </p>



<p class="wp-block-paragraph">Naturally, install speed becomes crucial in such scenarios. The makers of <code>uv</code> provide speed comparison benchmarks, testing their tool against pip and Poetry.</p>



<p class="wp-block-paragraph">Across all scenarios (warm/cold installs and warm/cold resolution), <strong><code>uv</code> outperforms pip and Poetry by orders of magnitude</strong>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="224" src="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final1_-1024x224.png?x32039" alt="" class="wp-image-6119" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final1_-1024x224.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final1_-300x66.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final1_-768x168.png 768w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final1_.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">These results come directly from uv&#8217;s official benchmarks. These <a href="https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md" target="_blank" rel="noreferrer noopener">benchmarks</a> install <a href="https://github.com/python-trio/trio/blob/main/docs-requirements.in" target="_blank" rel="noreferrer noopener">Trio&#8217;s official dependencies</a>. Let&#8217;s see how uv&#8217;s benefits impact our developer workflow.</p>



<h2 class="wp-block-heading"><span id="comparing-uv-to-other-tools-when-building-an-ai-microservice">Comparing <code>uv</code> to other tools when building an AI microservice</span></h2>



<p class="wp-block-paragraph">To compare <code>uv </code>with other tools (in this case, <code>pip</code> and <code>poetry)</code>,<strong> </strong>we’ll walk through<strong> the common steps of building a Python application</strong> and see how much easier it is to use <code>uv</code>. The typical steps for creating a Python app include:</p>



<ul class="wp-block-list">
<li>Initializing a project</li>



<li>Adding dependencies</li>



<li>Locking/freezing your dependencies</li>



<li>Installing/syncing packages</li>



<li>Running scripts and notebooks (handy for AI/ML engineers)</li>
</ul>



<p class="wp-block-paragraph">To provide an at-a-glance comparison, we’ve summarized these steps in a table:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="466" src="https://shiftmag.dev/wp-content/uploads/2025/09/edvin3-1-1-1024x466.png?x32039" alt="" class="wp-image-6116" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/edvin3-1-1-1024x466.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin3-1-1-300x137.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin3-1-1-768x349.png 768w, https://shiftmag.dev/wp-content/uploads/2025/09/edvin3-1-1.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Testing Install Speed on a &#8220;real&#8221; AI microservice</h2>



<p class="wp-block-paragraph">To compare the experience of using uv with other tools like<strong><code> pip</code></strong> and<code><strong> poetry</strong></code>, let&#8217;s build a basic AI microservice. We&#8217;ll start with these dependencies:</p>



<pre class="wp-block-code"><code>fastapi==0.110.2
uvicorn&#91;standard]==0.29.0

# AI/GenAI/LLM related
transformers==4.40.1
torch==2.2.2
scipy==1.13.0
scikit-learn==1.5.0
numpy==1.26.4
sentence-transformers==2.7.0
langchain==0.1.16

# Pydantic for data validation
pydantic==2.7.1

# Async tools
httpx==0.27.0

# Background tasks and scheduling
celery==5.4.0
redis==5.0.4

# Observability (logging, tracing, monitoring)
opentelemetry-api==1.25.0
opentelemetry-sdk==1.25.0

# Environment variables
python-dotenv==1.0.1

# ORM
sqlalchemy==2.0.30


</code></pre>



<p class="wp-block-paragraph">This setup doesn’t mimic a real AI microservice; it just represents what you’d commonly find in one. We&#8217;ll create this as a Python project using three different build tools: pip, Poetry, and uv. <strong>Then, we’ll benchmark how fast these tools install the dependencies</strong>. </p>



<p class="wp-block-paragraph">We&#8217;ll use Python 3.12 for our virtual environment, which should not affect the results. In addition, we run <strong>this test on Ubuntu 22.04.5 LTS</strong>. For all tests, we perform a cold installation (no cache), followed by a warm installation (with cache).</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="224" src="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final2_-1024x224.png?x32039" alt="" class="wp-image-6121" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final2_-1024x224.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final2_-300x66.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final2_-768x168.png 768w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.Final2_.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Keep in mind that cold install times depend heavily on your network speed and bandwidth, <strong>and your ISP can throttle TCP, affecting the results</strong>.</p>



<h2 class="wp-block-heading"><span id="why-uv-wins">Why uv wins?</span></h2>



<p class="wp-block-paragraph">Swapping between multiple CLIs introduces cognitive overload &#8211; <code>uv</code> ends that. With <code>pip</code> and <code>venv</code>, you constantly toggle between Python&#8217;s <code>venv </code>module, manual requirements files, and <code>pip</code> installs.<code> Poetry </code>tries to put everything under its own umbrella, but still makes you chain together <code><strong>poetry install</strong></code> , <code><strong>poetry lock</strong></code> , and<code> <strong>poetry run</strong></code>.</p>



<p class="wp-block-paragraph">By contrast,<strong> <code>uv</code> gives you a single tool for all your needs and covers every workflow step</strong>. It just works. Under the hood, uv&#8217;s dependency resolver and global cache guarantee repeatable installs without spinning wheels or bloated environments.</p>



<p class="wp-block-paragraph">Every project shares the same content-address store, which prevents duplicate downloads and wasted disk space. </p>



<p class="wp-block-paragraph">Since <code>uv </code>builds from the ground up with modern workflows in mind, <strong>it provides first-class support for Python version management</strong> (Poetry requires a separate tool, pyenv, for this), workspaces (missing from Poetry), script metadata that turns Python files into portable executables (not supported by Poetry), and even built-in publishing capabilities.</p>



<p class="wp-block-paragraph">In short, <code>uv</code> gives you a simple, lean, and fast pipeline while simultaneously replacing the old ways of dependency management in Python.</p>



<h2 class="wp-block-heading"><code>Uv</code> in production &#8211; benefits and lessons learned</h2>



<p class="wp-block-paragraph">After careful consideration, we slowly started adopting <code>uv</code> as our go-to tool for writing new Python microservices, especially in AI. By switching to uv, <strong>we consolidated our workflow under one tool</strong> and leveraged its many benefits. The results speak for themselves: consistent, millisecond-scale installs, smaller container layers, and zero &#8220;it worked on my machine&#8221; issues across all environments.</p>



<p class="wp-block-paragraph">The benefits are measurable, too. Our average CI/CD pipeline build time dropped by half for services we migrated to <code>uv</code>. Running multiple services locally became easier because <code>uv</code> provides a global cache and symlinks to dependencies, greatly reducing disk usage.</p>



<p class="wp-block-paragraph">In addition, <code>uv.lock </code>ensures every branch and pipeline uses the same dependency graph, eliminating surprise version bumps or broken sub-dependencies. </p>



<p class="wp-block-paragraph">Finally, <strong>our cognitive workload as developers decreased significantly</strong> as we removed multiple tools from our toolchain, dramatically reducing maintenance overhead.</p>



<p class="wp-block-paragraph">After using <code>uv</code> for some time, we also discovered a few valuable tricks:</p>



<ul class="wp-block-list">
<li><strong>Cache Management</strong> &#8211; Periodically running <code>uv</code> cache prune keeps the cache directory clean by removing all unused entries.</li>



<li><strong>Accelerator Configuration</strong> &#8211; Following uv’s PyTorch integration guide lets us pin CPU vs. CUDA builds per service declaratively, avoiding manual URL overrides. This approach allows us to install CUDA-enabled PyTorch on Linux, CPU-only builds on MacOS, and even include custom flags to enable or disable GPU builds when needed.</li>
</ul>



<h2 class="wp-block-heading"><span id="you-should-give-uv-a-chance">You should give uv a chance</span></h2>



<p class="wp-block-paragraph">As we’ve seen, traditional Python tooling too often slows us down, wastes space, and forces us to hope for reproducible builds. <strong><code>Uv</code> cuts through that noise with a single, fast binary</strong> that handles every step of your workflow &#8211;<strong> </strong>from project initialization to publishing.</p>



<p class="wp-block-paragraph"><code>Uv</code> runs much faster than its competitors, and its universal lockfile guarantees deterministic builds that work everywhere, every time.</p>



<p class="wp-block-paragraph">Whether you build heavy AI pipelines, ship microservices, or maintain a monorepo filled with standalone scripts and notebooks, uv brings consistency, performance, and simplicity to your workflow. </p>



<p class="wp-block-paragraph">Stop wrestling with half-baked tools and give uv a spin today &#8211;<strong> I promise it will turn your dependency hellscape into a clean, reliable experience!</strong></p>


<figure class="wp-block-post-featured-image"><img loading="lazy" decoding="async" width="1200" height="720" src="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.naslovna-1.png?x32039" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" style="object-fit:cover;" srcset="https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.naslovna-1.png 1200w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.naslovna-1-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.naslovna-1-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/09/Edvin.naslovna-1-768x461.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure><p>The post <a href="https://shiftmag.dev/tame-python-chaos-with-uv-the-superpower-every-ai-engineer-needs-6051/">Tame Python Chaos With uv &#8211; The Superpower Every AI Engineer Needs</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Python overtakes JavaScript as the most popular programming language</title>
		<link>https://shiftmag.dev/python-most-popular-4563/</link>
		
		<dc:creator><![CDATA[Antonija Bilic Arar]]></dc:creator>
		<pubDate>Tue, 05 Nov 2024 16:43:55 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[programming language]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://shiftmag.dev/?p=4563</guid>

					<description><![CDATA[<p>They say AI is going to replace developers. GitHub's data tells a different story. </p>
<p>The post <a href="https://shiftmag.dev/python-most-popular-4563/">Python overtakes JavaScript as the most popular programming language</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></description>
										<content:encoded><![CDATA[<figure class="wp-block-post-featured-image"><img loading="lazy" decoding="async" width="1200" height="630" src="https://shiftmag.dev/wp-content/uploads/2024/11/python.png?x32039" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" style="object-fit:cover;" srcset="https://shiftmag.dev/wp-content/uploads/2024/11/python.png 1200w, https://shiftmag.dev/wp-content/uploads/2024/11/python-300x158.png 300w, https://shiftmag.dev/wp-content/uploads/2024/11/python-1024x538.png 1024w, https://shiftmag.dev/wp-content/uploads/2024/11/python-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>


<p class="wp-block-paragraph">Instead of being replaced by <a href="https://shiftmag.dev/meet-devin-the-ai-software-engineer-2949/">AI coding tools</a>, developers are increasingly integrating AI into applications and engaging with AI projects on GitHub. <br><br>According to <a href="https://github.blog/news-insights/octoverse/octoverse-2024/" target="_blank" rel="noreferrer noopener">GitHub&#8217;s latest report,</a> Python surpassed JavaScript as the most popular language on GitHub, reflecting a rise in data science and machine learning. Developers are rapidly building AI models and engaging with AI projects on GitHub. They&#8217;ve also noticed an Increased interest in <a href="https://shiftmag.dev/small-language-models-4083/">AI agents and smaller models</a> that require less computational power.<br><br>1.4 million new developers globally joined open-source projects on GitHub, with a majority of them contributing to commercially backed and generative AI projects. </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">In 2024, there was a 59% surge in the number of contributions to generative AI projects on GitHub and a 98% increase in the number of projects overall.</p>
</blockquote>



<h2 class="wp-block-heading"><span id="there-are-more-developers-than-ever">There are more developers than ever</span></h2>



<p class="wp-block-paragraph">The data also shows the rise in the number of developers suggesting AI helping more people learn to code and build software. The number of people actively contributing to GitHub projects is particularly expanding, especially in regions like Africa, Latin America, and Asia, with significant growth in first-time open-source contributors. Brazil&#8217;s developer community is growing fast, and India is expected to become the world’s largest developer population on GitHub by 2028.</p>



<h2 class="wp-block-heading"><span id="python-on-the-throne">Python on the throne</span></h2>



<p class="wp-block-paragraph"><strong>Python is now the most used language on GitHub</strong>. The rise in Python usage correlates with large communities of people joining the open-source community and with the rise in machine learning and data science projects.</p>



<p class="wp-block-paragraph">Systems programming languages, like Rust, are also on the rise, even as Python, JavaScript, TypeScript, and Java remain the most widely used languages on GitHub, the report says.</p>
<p>The post <a href="https://shiftmag.dev/python-most-popular-4563/">Python overtakes JavaScript as the most popular programming language</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: shiftmag.dev @ 2026-10-23 16:12:36 by W3 Total Cache
-->