Change:
<ins> diff --git a/jiten/app.py b/jiten/app.py index 6d54020..f30a1d8 100644 --- a/jiten/app.py +++ b/jiten/app.py @@ -149,13 +149,22 @@ True >>> d.index("JLPT N3") < d.index("歯", d.index("JLPT N5")) < d.index("JLPT N2") True ->>> sorted( (c.name, c.value) for c in client.cookie_jar ) +>>> def cookies(): +...   import importlib.metadata +...   v = tuple(map(int, importlib.metadata.version("werkzeug").split("."))) +...   if v < (2, 3): +...     return sorted( (c.name, c.value) for c in client.cookie_jar ) +...   else: +...     cookies = [ client.get_cookie(k) for k in PREFS ] +...     return sorted( (c.key, c.value) for c in cookies if c is not None ) + +>>> cookies() [] >>> p = dict(dark = "yes", lang = "eng ger oops".split()) >>> r = client.post("/_save_prefs", data = p, follow_redirects = True) >>> r.status '200 OK' ->>> sorted( (c.name, c.value) for c in client.cookie_jar ) +>>> cookies() [('dark', 'yes'), ('lang', '"eng ger"'), ('large', 'no'), ('max', '50'), ('nogrid', 'no'), ('nor2h', 'no'), ('roma', 'no')] """                                                             # }}}1 @@ -168,8 +177,7 @@ import kanjidraw import click, flask, jinja2, werkzeug os.environ["FLASK_SKIP_DOTENV"] = "yes"                       #  FIXME -from flask import Flask, abort, escape, make_response, redirect,  -                  request, render_template, url_for +from flask import Flask, abort, make_response, redirect, request, render_template, url_for from .version import __version__, py_version from .kana import kana2romaji </ins>

Discussion:
Steps to reproduce the behavior: out nixos-23.11 and cd into it nix-build -A jiten This same version of jiten works fine on 23.05. Please run and paste the result. Note that that channel is unused because my system is flake-ified, which is why it's out of date. The host is nixos-23.05 because this came to light while upgrading, but the affected build is nixos-23.11 as described above. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
That's truly baffling, but probably an upstream bug in jiten. I don't get why it's happening though, since the cookies in the jar should be the stdlib ones? which have the right attribute already?
i am running bisect now, it used to build, so something must have changed
it was pointed out to me elsewhere that since jiten is non-free, Hydra doesn't run the tests for it; that's probably how this happened I'm not a Python expert but the error message suggests to me that one of the libraries used by the test has changed its API
the thing is, i think this is probably a stdlib , which makes it extremely confusing why it could possibly be missing that attribute
My personal hunch is that it likely has to do with Flask updating past v2.3.2, as mentions: Though I didn't expect it to succeed, I replicated the error with Flask 2.3.2. Going to see if I can get Flask 2.3.1 working, and tested with as well. Edit: Didn't get it working with 2.3.1 either and with seemingly the same error, huh.
Sorry! I haven't been able to work on Jiten for a while, so I missed this. The problem seems to be an incompatible change in test cookies in 2.3.0; tracking this upstream in obfusk/jiten.

I'm not yet sure when I'll be able to release a new version of Jiten (and I'm not currently working on nixpkgs as I do not currently have a working nix install), but this should be fixed on master now; this patch seems to fix compatibility with newer flask & werkzeug: Only the pitch data files and mp3s are non-free (non-commercial use only). Maybe we can eventually add a second package or something -- simply not checking out the non-free submodule before building should work, but the current tests will likely fail, so I'd have to account for that first -- for users that don't want the non-free data files? That one could then be tested automatically, which should catch most errors in regular too (though I'd have caught this in CI if not for the fact I wasn't able to work on Jiten for a year).
oh hey, thanks so much for the investigation and the fix! I'm going to prepare a PR that cherry-picks the fix, so you don't have to worry about time pressure on an upstream release. that's a good thought about the jiten-foss thing, and let me know if you'd like my help on the nix parts of it at any point.
Thanks for the PR! I'm hoping to have the tests pass w/o the non-free submodule present by the next release (tracking in obfusk/jiten). I'll let you know when there's a new release and/or I can use help with the nix packaging then :)
looking forward to it! :)