frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Size of Life

https://neal.fun/size-of-life/
539•eatonphil•3h ago•87 comments

DeepSeek uses banned Nvidia chips for AI model, report says

https://finance.yahoo.com/news/china-deepseek-uses-banned-nvidia-131207746.html
174•goodway•2h ago•129 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
135•chirau•1d ago•241 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
70•__rito__•1h ago•31 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
104•pretext•2h ago•40 comments

Why the Sanitizer API is just `setHTML()`

https://frederikbraun.de/why-sethtml.html
63•birdculture•1d ago•28 comments

Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

https://www.heise.de/en/news/Valve-HDMI-Forum-Continues-to-Block-HDMI-2-1-for-Linux-11107440.html
156•OsrsNeedsf2P•1h ago•91 comments

Gundam is just the same as Jane Austen but happens to include giant mech suits

https://eli.li/gundam-is-just-the-same-as-jane-austen-but-happens-to-include-giant-mech-suits
39•surprisetalk•1w ago•19 comments

Is it a bubble?

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
45•saigrandhi•1h ago•25 comments

9 Mothers (YC X26) Is Hiring

https://app.dover.com/jobs/9mothers
1•ukd1•2h ago

Factor 0.101 now available

https://re.factorcode.org/2025/12/factor-0-101-now-available.html
50•birdculture•7h ago•3 comments

Launch HN: InspectMind (YC W24) – AI agent for reviewing construction drawings

22•aakashprasad91•3h ago•10 comments

COM Like a Bomb: Rust Outlook Add-in

https://tritium.legal/blog/outlook
43•piker•3h ago•21 comments

RoboCrop: Teaching robots how to pick tomatoes

https://phys.org/news/2025-12-robocrop-robots-tomatoes.html
27•smurda•3h ago•13 comments

Typewriter Plotters (2022)

https://biosrhythm.com/?p=2143
42•LaSombra•5d ago•0 comments

Golang's big miss on memory arenas

https://avittig.medium.com/golangs-big-miss-on-memory-arenas-f1375524cc90
49•andr3wV•6d ago•37 comments

Volcanic eruptions set off a chain of events that brought Black Death to Europe

https://www.cam.ac.uk/stories/volcanoes-black-death
47•gmays•4d ago•5 comments

Super-Flat ASTs

https://jhwlr.io/super-flat-ast/
29•mmphosis•6d ago•2 comments

Revisiting "Let's Build a Compiler"

https://eli.thegreenplace.net/2025/revisiting-lets-build-a-compiler/
217•cui•12h ago•36 comments

Israel used Palantir technologies in pager attack in Lebanon

https://the307.substack.com/p/revealed-israel-used-palantir-technologies
178•cramsession•3h ago•104 comments

Show HN: A 2-row, 16-key keyboard designed for smartphones

https://k-keyboard.com/Why-QWERTY-mini
8•QWERTYmini•1h ago•6 comments

Map of all the buildings in the world

https://gizmodo.com/literally-a-map-showing-all-the-buildings-in-the-world-2000694696
144•dr_dshiv•5d ago•49 comments

Rust in the kernel is no longer experimental

https://lwn.net/Articles/1049831/
880•rascul•15h ago•652 comments

England Historic Aerial Photo Explorer

https://historicengland.org.uk/images-books/archive/collections/aerial-photos/
21•davemateer•2h ago•3 comments

Cloth Simulation

https://cloth.mikail-khan.com/
165•adamch•1w ago•34 comments

Show HN: Automated License Plate Reader Coverage in the USA

https://alpranalysis.com
3•sodality2•1h ago•1 comments

Bruno Simon – 3D Portfolio

https://bruno-simon.com/
716•razzmataks•1d ago•173 comments

New benchmark shows top LLMs struggle in real mental health care

https://swordhealth.com/newsroom/sword-introduces-mindeval
94•RicardoRei•5h ago•125 comments

When a video codec wins an Emmy

https://blog.mozilla.org/en/mozilla/av1-video-codec-wins-emmy/
259•todsacerdoti•5d ago•65 comments

Amazon EC2 M9g Instances

https://aws.amazon.com/ec2/instance-types/m9g/
137•AlexClickHouse•4d ago•64 comments
Open in hackernews

Deprecations via warnings don't work for Python libraries

https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries
28•scolby33•2d ago

Comments

theamk•2d ago
Deprecations via warnings don't reliably work anywhere, in general.

If you are a good developer, you'll have extensive unit test coverage and CI. You never see the unit test output (unless they fail) - so warnings go unnoticed.

If you are a bad developer, you have no idea what you are doing and you ignore all warnings unless program crashes.

SethMLarson•2d ago
Author here! Agreed that are different levels of "engaged" from users, which is okay. The concerning part of this finding is that even dependent users that I know to be highly engaged didn't respond to the deprecation warnings, so they're not working for even the most engaged users.
eternityforest•1d ago
Why is it that CI tools don't make warnings visible? Why are they ignored by default in the first place? Seems like that should be a rather high priority.
metadat•1h ago
Most of the time they don't matter and aren't an immediate problem.

The Business doesn't care about warnings, they want working software NOW.

bluGill•1h ago
It isn't that easy. If you have a new warning on upgrade you probably want to work on it "next week", but that means you need to ignore it for a bit. Or you might still want to support a really old version without the new API and so you can't fix it now.
Hizonner•36m ago
> If you have a new warning on upgrade you probably want to work on it "next week", but that means you need to ignore it for a bit.

So you create a bug report or an issue or a story or whatever you happen to call it, and you make sure it gets tracked, and you schedule it with the rest of your work. That's not the same thing as "ignoring" it.

bluGill•26m ago
And you always have something more important/interesting to do and so never get around to it.
Hizonner•25m ago
... which means that when the axe falls, the results are 100 percent your fault.
optionalsquid•1d ago
You can turn warnings into errors with the `-Werror` option. I personally use that in CI runs, along with the `-X dev` option to enable additional runtime checks. Though that wont solve the author's problem, since most Python devs don't use either of those options
rimunroe•1h ago
> If you are a good developer, you'll have extensive unit test coverage and CI. You never see the unit test output (unless they fail) - so warnings go unnoticed.

In my opinion test suites should treat any output other than the reporter saying that a test passed as a test failure. In JavaScript I usually have part of my test harness record calls to the various console methods. At the end of each test it checks to see if any calls to those methods were made, and if they were it fails the tests and logs the output. Within tests if I expect or want some code to produce a message, I wrap the invocation of that code in a helper which requires two arguments: a function to call and an expected output. If the code doesn't output a matching message, doesn't output anything, or outputs something else then the helper throws and explains what went wrong. Otherwise it just returns the result of the called function:

  let result = silenceWarning(() => user.getV1ProfileId(), /getV1ProfileId has been deprecated/);
  expect(result).toBe('foo');
This is dead simple code in most testing frameworks. It makes maintaining and working with the test suite becomes much easier as when something starts behaving differently it's immediately obvious rather than being hidden in a sea of noise. It makes working with dependencies easier because it forces you to acknowledge things like deprecation warnings when they get introduced and either solve them there or create an upgrade plan.
ploxiln•1h ago
When I update python version, python packages, container image, etc for a service, I take a quick look at CI output, in addition to the all the other checks I do (like a couple basic real-world-usage end-to-end usage tests), to "smoke test" whether something not caught by outright CI failure caused some subtle problem.

So, I do often see deprecation warnings in CI output, and fix them. Am I a bad developer?

I think the mistake here is making some warnings default-hidden. The developer who cares about the user running their the app in a terminal can add a line of code to suppress them for users, and be more aware of this whole topic as a result (and have it more evident near the entrypoint of the program, for later devs to see also).

I think that making warnings error or hidden removes warnings as a useful tool.

But this is an old argument: Who should see Python warnings? (2017) https://lwn.net/Articles/740804/

Hizonner•43m ago
If you are a good developer, you consider warnings to be errors until proven otherwise.
hiq•11m ago
What does a good developer do when working in a codebase with hundreds of warnings?

Or are you only considering a certain warnings?

mrweasel•28m ago
There was this one library we depended on, it was sort of in limbo during the Python 2 -> 3 migration. During that period is was maintained by this one person who'd just delete older versions when never ones became available. In one year I think we had three or four instances where our CI and unit tests just broke randomly one day, because the APIs had changed and the old version of the library had been yanked.

In hindsight it actually helped us, because in frustrations we ended up setting up our own Python package repo and started to pay more attention to our dependencies.

wang_li•24m ago
That's why you, very early on, release code that slows the API down once it has been deprecated. Every place you issue a deprecation warning, you also sleep 60. Problem solved.
superkuh•2h ago
>We ended up adding the APIs back and creating a hurried release to fix the issue.

So it was entirely possible to keep the software working with these. Why change/remove them in the first place? Is the benefit of of the new abstraction greater than the downside of requiring everyone using the software to re-write theirs?

integralid•1h ago
OS software maintainers don't like maintaining legacy ugly APIs forever and want to refactor/remove legacy code to keep themselves sane and the project maintainable.
superkuh•1h ago
Yep. Or you can see it as, "This software doesn't really care about the users and their use cases. It prioritizes making things look pretty and easier on the dev side over maintaining functionality." Or in the worse but fairly common OSS case, CADT, but that doesn't seem to apply in this context.
LegionMammal978•45m ago
Every public API change is a cost on the user: for an extreme example, if every library I ever used renamed half its APIs every year to align with the latest ontology, then there would hardly be any point in saving my scripts, since I'd have to be constantly rewriting them all.

Of course, the reality is hardly ever as bad as that, but I'd say having to deal with trivial API changes is a reasonable basis for a user to dislike a given project or try to avoid using it. It's up to the maintainers how friendly they want to be toward existing user code, and whether they pursue mitigating options like bundling migrations into less-common bigger updates.

memco•38m ago
I think this is a valid question for this specific case, but may not always be possible. That said, I think as a user I would probably prefer it if under the hood the old function called the new so they can deprecate the behavior without breaking the API. In that way you can still emit the deprecation warning while also only having one actual code path to maintain.
shadowgovt•30m ago
Funny enough, in Python, a sufficiently-dedicated client can also do this on their end by just monkey-patching the class definition.
traverseda•1h ago
Wait, does urlib not use semvar? Don't remove APIs on minor releases people. A major release doesn't have to be a problem or a major redesign, you can do major release 400 for all I care, just don't break things on minor releases.

Lots of things not using semvar that I always just assumed did.

Bratmon•1h ago
+1

The industry has a solution for the exact problem the urllib is having (semver). Urllib just actively refuses to use it.

philipwhiuk•1h ago
Python itself doesn't use semver.
CaliforniaKarl•53m ago
This, I think, is the crux of the matter.

As an example, I always knew urllib3 as one of the foundational packages that Requests uses. And I was curious, what versions of urllib3 does Requests pull in?

Well, according to https://github.com/psf/requests/blob/main/setup.cfg, it's this:

    urllib3>=1.21.1,<3
That is exactly the kind of dependency specification I would expect to see for a package that is using semver: The current version of urllib3 is 2.x, so with semver, you set up your dependencies to avoid the next major-version number (in this case, 3).

So, it seems to me that even the Requests folks assumed urllib3 was using semver.

hartator•1h ago
I think they are misreading the situation.

The devil is in the details. It seems `getHeaders` v. `headers` is non-security, non-performance related issue. Why people should spend time fixing these?

CaliforniaKarl•57m ago
If you (either directly or from SerpApi) are supporting the urllib3 folks (through a Tidelift subscription), then yes, that is a valid point.

Otherwise, I'd say that's a very brave comment you are making.

shadowgovt•31m ago
"Brave" in what sense? It's a legitimate question why an API is having a pattern deprecated and removed for what appears to be pattern reasons.
ipaddr•27m ago
If he gave money valid point if not he must be brave?
Revisional_Sin•1h ago
> Maybe the answer is to do away with advance notice and adopt SemVer with many major versions

Yes.

jakub_g•1h ago
Fixing deprecations is unfortunately the lowest prio of any kind of work for majority of the projects. Part of the problem is probably lack of pressure to do so it if the timeline is unclear. What if this is actually never removed? Why going through the pain?

IMO telling "we deprecate now and let's see when we remove it" is counterproductive.

A better way: deprecate now and tell "in 12 (or 24?) months this WILL be removed".

After 12/24 months, cut a new semver-major release. People notice the semver-major through the dependency management tools at some point, an maybe they have a look at changelog.

If they don't, at some point they may want to use a new feature, and finally be incentivised to update.

If there's no incentive other than "do the right thing", it never gets done.

Having said that, I think LLMs are really going to help with chores like this, if e.g. deprecations and migration steps are well documented.

Alternative option: create a codemod CLI that fixes deprecations for the users, doing the right thing automatically. If migration is painless and quick, it's more likely people will do it.

Hizonner•45m ago
> Fixing deprecations is unfortunately the lowest prio of any kind of work for majority of the projects.

... and the right answer to that is to make it entirely their problem.

> Part of the problem is probably lack of pressure to do so it if the timeline is unclear. What if this is actually never removed?

In this case, the warnings said exactly what release would remove the API. Didn't help.

> Why going through the pain?

Because you're not a feckless irresponsible idiot? I don't think it's an accident that the projects they said didn't react were an overcomplicated and ill-designed management layer for an overcomplicated and ill-designed container system, a move-fast-and-break-things techbro company, and what looks to be a consolation project for the not-too-bright.

You probably get an extra measure of that if you're operating in the Python ecosystem, which is culturally all about half-assed, 80-percent-right-we-hope approaches.

The right answer is to remove it when you say you're going to remove it, and let them pick up the pieces.

It also helps if you design your API right to begin with, of course. But this is Python we're talking about again.

CaliforniaKarl•39m ago
> After 12/24 months, cut a new semver-major release. People notice the semver-major through the dependency management tools at some point, an maybe they have a look at changelog.

The urllib3 package doesn't use SemVer.

eddythompson80•58m ago
Deprecations in all forms are always a shitshow. There isn’t a particular pattern that “just works”. Anybody that tells you about one, best case scenario, it just worked for them because of their consumer/user not because of the method itself.

The best I have seen is a heavy handed in-editor strike through with warnings (assuming the code is actively being worked on) and even then it’s at best a 50/50 thing.

50% of the developers would feel that using an API with a strike through in the editor is wrong. And the other 50% will just say “I dunno, I copied it from there. What’s wrong with it??”

shadowgovt•34m ago
The secret trick I've used on rare occasion, but when necessary, is the "ten second rule."

Users don't notice a deprecation warning. But they might notice adding a "time.sleep(10)" immediately at the top of the function. And that gives them one last grace period to change out their software before it breaks-breaks.

odie5533•22m ago
This will just waste CI compute and not solve anything.
shadowgovt•15m ago
It's worked in the past. But it does require someone at your org to care that CI times are spiking, which is not always a thing you can rely upon.

In addition: if CI is the only place the issue shows up, and never in a user interaction... Why does that software exist in the first place? In that context, the slowdown may be serving as a useful signal to the project to drop the entire dependency.

pavel_lishin•11m ago
Are you saying you wouldn't notice if your CI suddenly started taking twice as long, ten times as long, a hundred times as long to run?
hiq•14m ago
Wild (and I guess most of the time bad) idea: on top of the warnings, introduce a `sleep` in the deprecated functions. At every version, increase the sleep.

Has this ever been considered?

The problem with warnings is that they're not really observable: few people actually read these logs, most of the time. Making the deprecation observable means annoying the library users. The question is then: what's the smallest annoyance we can come up with, so that they still have a look?

Hackbraten•14m ago
A deprecation warning is not actionable for typical end users. Why don't more warnings include calls to action?

Instead of a warning that says, "The get_widget method in libfoo is deprecated and will be removed by November 30", the warning could say:

"This app uses the deprecated get_widget method. Please report this bug to the app developer. Ask them to fix this issue so you can continue using this app after November 30."