Gajim - 2025-09-21


  1. nicoco

    how do I get pyright to run locally like in runs in CI, ie, only on diffs from the last X commits?

  2. lovetox

    pyright does not run on diffs

  3. lovetox

    it runs over the whole code base, and you need to install it, https://github.com/microsoft/pyright/blob/main/README.md

  4. nicoco

    for real? when I run it locally, it throws A LOT of errors, and in CI it looks like only the MR diff is processed, I guess it's on the whole modified files list

  5. nicoco

    lol no > pyright (git diff --name-only) [...] 1049 errors, 0 warnings, 0 information I'll let it run in CI, there is something I don't understand about how it's launched in the gitlab pipeline I guess

  6. lovetox

    you simply have not the right dependencies installed

  7. lovetox

    what is the error?

  8. nicoco

    a lot of them, but related to gtk stuff indeed

  9. nicoco

    eg /home/nicoco/src/perso/xmpp/gajim.clean/gajim/gtk/avatar.py:709:47 - error: Type of "get_height" is unknown (reportUnknownMemberType)

  10. nicoco

    Oh I got it, I thought `uv sync --dev` would install [project.optional-dependencies] but it's actually this field actually defines an "extra", so I need to `uv sync --all-extras` to get pygobject-stubs to install. Yay!

    👍 2
  11. nicoco

    Oh I got it, I thought `uv sync --dev` would install [project.optional-dependencies] but this field actually defines an "extra", so I need to `uv sync --all-extras` to get pygobject-stubs to install. Yay!

  12. cal0pteryx

    I wanted to add uv instructions, and use it for Windows builds, as it's way faster than pip. But I encountered a build error along the way back when I tried. Might try again soon :)

  13. lovetox

    uv installs things in virtual environments

  14. lovetox

    That's not what we want when building the windows installer

  15. lovetox

    Not sure if it's even possible to not install in a virtual env

  16. nicoco

    it is a bit weird to define dev dependencies as an "extra" I think, but gajim is not published to PyPI and there is no standard way of defining "dev dependencies" anyway, so this works I guess

  17. nicoco

    uv can install "system packages" too, although I have no idea about whether that actually is something in windows

  18. lovetox

    nicoco: why would this be weird, how would it be possible differently?

  19. nicoco

    poetry, uv (and probably hatch and others) have their own syntax for that

  20. nicoco

    uv uses: ```toml [dependency-groups] dev = [ "coverage>=7.6.10", "emoji>=2.14.0", [...] ``` for instance

  21. lovetox

    So what's weird? Still is defined as extra

  22. nicoco

    it's a bit weird to use "extras" because this usually define runtime dependency for optional behaviour, to do stuff like `pip install some-package[some-extra-feature-that-requires-more-runtime-dependency]`

  23. nicoco

    > So what's weird? Still is defined as extra no, extra is a standard thing of pyproject.toml, the field is `[project.optional-dependencies]`, not `[dependency-groups]`

  24. nicoco

    [project.optional-dependencies] has consequence when publishing to PyPI, for instance

  25. lovetox

    Why do you thing extras should be used only for runtime requirements?

  26. lovetox

    Why do you think extras should be used only for runtime requirements?

  27. nicoco

    it's not me

  28. nicoco

    who think that

  29. nicoco

    but people writing project management tools like uv and poetry

  30. nicoco

    but I guess you're right, https://packaging.python.org/en/latest/specifications/dependency-specifiers/#extras does not mention anything about it being runtime only

  31. nicoco

    the example even includes a "tests" extra

  32. lovetox

    Surprise 😄

  33. nicoco

    Well, the people behind uv and poetry disagree, and I think it's fair to assume they have valid reasons.

  34. nicoco

    I know I have a use-case for slidge

  35. nicoco

    I use some very custom sphinx extensions for document, which I don't particularly want to publish to PyPI.

  36. nicoco

    Stuff not published on PyPI is forbidden in [project.optional-dependencies] and prevents publishing on PyPI.

  37. lovetox

    The same with extras

  38. nicoco

    But uv lets you define a custom pypi index, or even "git dependencies", and you can use those in [dependency-groups]

  39. nicoco

    > The same with extras Yes, precisely my point, with uv "dependency groups" you can put stuff that is not necessarily on PyPI.

  40. lovetox

    Ok but how is that relevant, do we need something that is not on pypi?

  41. nicoco

    absolutely not, lol

  42. nicoco

    just discussing is all ;)

  43. nicoco

    well actually gajim does define "git dependencies"

  44. nicoco

    so the current pyproject.toml would prevent publishing gajim on pypi I think. but gajim is not published to pypi.org anyway, is it?

  45. lovetox

    No

  46. lovetox

    Makes not much sense as it has no python dependencies

  47. nicoco

    then you're right, we don't care. I'm happy to have slidge published on PyPI.org (which makes a lot of sense for a lib), and still be able to use some non-pypi.org dependencies for development.

  48. lovetox

    Makes not much sense as it has non python dependencies

  49. nicoco

    > Makes not much sense as it has non python dependencies some non-python stuff is packaged on pypi too these days. ever used CUDA? :)

  50. lovetox

    We also need to install files into system locations

  51. lovetox

    No tool can do this to my knowledge

  52. nicoco

    I don't know and I decided not to spend more time on that, the gtk, gobject, etc. dependencies are a bit arcane to me.

  53. nicoco

    Which is why I basically decided a few months ago that I'll get back to contributing to gajim whenever I update my computer to debian trixie, which I did a few days ago :)

  54. lovetox

    yeah its a bit sad that we cannot have a dev env thats independent of the system

  55. lovetox

    it will always stay compatible with latest ubuntu

    👍 1
  56. nicoco

    Anyway, I think 2 of my MRs are ready (missing context for non-joined MUCs, use affiliaations to compute MUC name). For the 'displayed marker in MUCs' I think we do not want to store all markers forever so we probably need to do some sort of purging, but I'm not sure where to place it.

  57. nicoco

    About the purging, the first idea that comes to mind is "just store the last received marker by occupant" but I think it's a bit more complex than that. The rule should be "store the lastest marker, but only if it refers to a newer message than the marker we have in store for this occupant", but I'm not sure where to implement that.

  58. nicoco

    I was wrong earlier, [dependency-groups] is not uv-specific but standardized too. (it does not change anything for gajim but still, better to correct oneself when one said wrong things, right?) https://packaging.python.org/en/latest/specifications/dependency-groups/#dependency-groups

  59. lovetox

    thanks, yes we should then switch to dependency-groups even if it makes no difference for us, seems this key was introduced specifically for development tools

  60. lovetox

    about the markers, it is our concept that we store messages without looking at the database beforehand

  61. lovetox

    so building logic such as "store this only if not something different is already stored" is problematic. Also it makes things much more complex because you have a bunch of assmumptions in that logic, e.g. that messages are retrieved in a specific order or that something is stored already at a specific moment

  62. lovetox

    our concept is that we store messages and metadata without any checks.

  63. lovetox

    you apply your logic and checks when you retrieve the data, then you can apply whatever logic is needed

  64. bot

    lovetox pushed 2 commits to branch python-nbxmpp/master imprv: Log details about invalid roster items - https://dev.gajim.org/gajim/python-nbxmpp/-/commit/2d028d07e5f98a538a8db06ffa8c9fa073814c12 imprv: Log details about invalid MUC affiliation items - https://dev.gajim.org/gajim/python-nbxmpp/-/commit/bed88d4f49daee03d93ba1b77eb332adb97cc565

  65. nicoco

    > our concept is that we store messages and metadata without any checks. The MR does that so it's more ready than I thought it was. =) I can't help but wonder if we shouldn't add some sort of cronlike autopurge every X days or hours, and only keep the most X recent markers by (MUC, occupant) pairs, but that's an optimisation that can come later, if necessary, I guess.

  66. astaboy

    hello

  67. astaboy

    Does prosody server support SCRAM-SHA1-PLUS ?

  68. mebs

    yes, i see people logging to my prosody with SCRAM-SHA-1-PLUS

  69. mebs

    speaking of this, does gajim support channel binding?

  70. lovetox

    No

  71. bigbellyboy

    where do I find my xmpp address

  72. lovetox

    Click the avatar in the left bottom

  73. Neustradamus

    lovetox: I see the talk with mebs, Gajim does not work with Channel Binding (-PLUS variants)? So, I need to change Gajim here: - https://github.com/scram-sasl/info/issues/1 - https://wiki.xmpp.org/web/SASL_Authentication_and_SCRAM

  74. lovetox

    Yes Gajim does not support channel binding