Thursday, 2026-03-05

clarkbchardet is listed in global requirements (though I'm not sure how important chardet is to openstack though) and ran across https://github.com/chardet/chardet/issues/327 just though this should be on our radar00:39
mnasiadkaclarkb: whoa, thanks for raising attention - https://github.com/chardet/chardet/commit/7e25bf40bb4ae6884892c094080e011290494947 is interesting… complete AI rewrite of chardet06:24
frickleraccording to codesearch the only direct reference is in horizon09:24
gouthamrwow15:50
* dansmith cringes15:53
funginot going to wade into that quagmire, but precedent in the usa so far is that llm-generated code is not copyrightable, so in theory the idea of relicensing (or licensing at all) wouldn't make sense if they are able to actually claim it made a "clean" rewrite15:57
fungieither it's derivative of the original and needs to remain compatible with the original license, or it's rewritten by an llm and doesn't get the benefit of copyright to begin with15:58
dansmithwe're definitely in for some LLM copyright-washing of things.. "rewrite this github repo so it doesn't share a single line of identical code" -> new license16:00
fungithough legally speaking, it's probably effectively more like -> no license (public domain)16:07
dansmiththat's the legal thing, but if you can erase the link, you can claim you wrote it all and thus own the copyright (and the license determination)16:08
fungioh, sure. people can lie about anything they like, of course16:08
dansmithright.. I guess my point is, it used to be harder to lie about cleanrooming something :)16:08
fungiit used to be harder to lie about quite a number of things, thanks ai!16:09
dansmithindeed, except.. not thanks :)16:13
fungiright, sarcastic thanks, i meant16:14
fungithe latest newsletter from debian's project leader talks a bit about managing ai-assisted contribution in their community: https://lists.debian.org/debian-devel-announce/2026/03/msg00001.html16:19
clarkbin this particular case I suspect the main thing to be aware of on our side is that a dependency has had a 500k line rewrite and a license change and updating to the new version may have impacts to our software. Rather than necessarily needing to get into the argument over whether the license change was appropriate or not16:23
mnasiadkaWell I think it makes sense to raise it to Horizon teams attention - since they are the only ones using it and be careful about bumping it’s version in requirements beyond the tag with 500k line rewrite16:49
fricklerthe history in https://github.com/chardet/chardet/issues/36 looks interesting. it also implies that it is a dependency of python-requests and therefore like ... everything?18:24
fungidoesn't appear so, unless it's vendored inside something and not installed from pypi18:27
fungiif i create a clean venv and pip install requests, the only other installed packages according to `pip list` are certifi, charset-normalizer, idna, and urllib318:29
fungidoesn't seem to be vendored inside any other packages either, at least a find across the entire venv's filetree for case-insensitive "chardet" turns up no matches18:30
fungioh, i think charset-normalizer may be used by requests as a modern replacement for chardet18:31
fungiyeah, requests 2.26 (almost 5 years ago) included https://github.com/psf/requests/pull/5797 "Switch LGPL'd chardet for MIT licensed charset_normalizer"18:36
fungiso chardet *was* a dependency of requests a (relatively speaking) very long time ago now18:37
fungiso looks like this whole situation at least dates back to https://github.com/chardet/chardet/issues/36 circa 201418:40
fungioh, that's the same one frickler linked18:40
fricklerah, yes, that happened after the above issue was closed. might be a possible path for horizon then, too18:40
fungiso basically requests solved the problem by switching to an alternative many years ago18:41
fungiif memory serves, ian was even working in openstack back when that issue was opened, so we might have been some of the catalyst for this entire fiasco18:42
fungiyeah, his resume confirms that was while he was at rackspace18:43
fungiso anyway, roundaboutly, once again dealing with a problem of our own creation18:48
clarkbI don't understand the lgpl concern in this context. Its a self contained library that performs a function. Is it really the end of the world to push your patches up if you modify this particular library?20:02
clarkbit isn't viral like the gpl so the scope is limtied to the library itself20:02
fungisome people/businesses are allergic to anything that sounds like "gpl"20:07
gouthamri don't know, but, i don't see usage of chardet directly in horizon.. this is the only use: https://opendev.org/openstack/horizon/src/commit/65cb9ca7f305c5e8a7fb3761f96b3fc06be515e8/openstack_dashboard/local/local_settings.py.example#L286-L28820:20
fungiagreed, it's in global requirements upper-constraints.txt and therefore duplicated into horizon's (hopefully temporary?) custom upper-constraints.txt, but the only match on master is in that example file20:22
fungiplacement also has it installed as a workaround in the gate/perfload-runner.sh script20:23
fungi(but likely no longer necessary)20:24
fungiworth noting, puppet-horizon does use that example local_settings.py directly so relies on chardet20:24
fungiotherwise the only master branch appearances are in constraints files, not actually called/imported20:25
fungiand even the puppet-horizon settings is just supplying a logging override, so does nothing if chardet is missing (which it presumably will be if nothing is actually depending on it)20:26
gouthamrthe placement usage is a different library: https://opendev.org/openstack/placement/src/branch/master/gate/perfload-runner.sh#L10920:27
fungioh, actually placement's script is installing cchardet, not chardet (note the extra "c")20:27
fungiyeah, just spotted that20:27
gouthamrso this might be an opportunity to cleanly excise the requirement if this was just dead code.. or a plugin of sorts that's not really necessary for horizon to run20:28
fungicchardet looks like it has chardet as a dev dependency but not a direct dependency20:29
gouthamrack, and placement's dependency is also a dev dependency20:30
fungiyep, so all of this sounds like we could just delete all references to chardet in master branches and probably nobody would even notice20:31
gouthamrhorizon uses requests, and so maybe this settings.py example was crafted before requests itself switched to charset_normalizer.. 20:32
fungithough the fact that it's ending up in https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt#L9 indicates something in our transitive set of dependencies somewhere is actually depending on it20:32
fungiwe'd need to pip install global-requirements.txt and work out from the pip logs what's pulling it in, if anyone cares20:33
gouthamri don't know who could know the motivation, perhaps rdopiera or tmazur20:33
gouthamroh20:33
gouthamrmight know*20:33
gouthamrthis was when it showed up in horizon: https://review.opendev.org/c/openstack/horizon/+/50163520:34
gouthamri think this was because of requests20:34
gouthamrmaybe at some point, we cared about constraining this dependency, but no longer need to?20:35
fungiyeah, that was 4 years before requests switched off chardet20:35
fungiupper-constraints.txt is refreshed by doing a pip install of global-requirements.txt and then finding out what versions of which packages that pulled down. but maybe it doesn't remove old entries when they disappear, i can't recall20:36
gouthamri'll poke folks on #openstack-horizon to see if they can drop this example config.. 20:38
fungithe other maybe not obvious thing to point out is that requirements upper-constraints.txt is pinning to a 3-year-old version of chardet still, which doesn't have the new concerns20:40
fungi(5.2.0 uploaded to pypy 2023-08-01, while the problem rewrite seems to enter with 7.0.0 uploaded yesterday)20:41
gouthamryes20:41
gouthamrhttps://github.com/chardet/chardet/issues/33120:42
gouthamr"please do not foist this unnecessary controversy and risk upon your users."20:42
fungigranted, 5.2.0 was the most recent release until ~2 weeks ago when 6.0.0 was uploaded (2026-02-22)20:42
clarkbthe job that installs global-requirements should say which dependency installs chardet if we remove it from the top level list (its a pip behavior to emit that info when it fetches things iirc)21:00
fungii used to believe the same, but the last time i went looking it didn't actually log any of that21:05
clarkbI'm not finding the job in zuul's builds list probably isn't part of the periodic pipeline I guess21:07
clarkboh it only runs weeklyu21:08
fungiyeah, https://zuul.opendev.org/t/openstack/build/65b8aed30f834ddc9c8f1073607d4582 was the most recent run21:09
clarkbfungi: looks like the script is called generate-constraints and it seems to eat all the output?21:11
clarkbthe tool logs to a file but the job doesn't seem to capture it21:12
clarkbso ya would need to improve the tooling to better record the relationships between these packages21:12
fungiexactly21:17

Generated by irclog2html.py 4.1.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!