-
nicoco
how do I get pyright to run locally like in runs in CI, ie, only on diffs from the last X commits?
-
lovetox
pyright does not run on diffs
-
lovetox
it runs over the whole code base, and you need to install it, https://github.com/microsoft/pyright/blob/main/README.md
-
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
-
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
-
lovetox
you simply have not the right dependencies installed
-
lovetox
what is the error?
-
nicoco
a lot of them, but related to gtk stuff indeed
-
nicoco
eg /home/nicoco/src/perso/xmpp/gajim.clean/gajim/gtk/avatar.py:709:47 - error: Type of "get_height" is unknown (reportUnknownMemberType)
-
nicoco
👍 2Oh 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!✎ -
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! ✏
-
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 :)
-
lovetox
uv installs things in virtual environments
-
lovetox
That's not what we want when building the windows installer
-
lovetox
Not sure if it's even possible to not install in a virtual env
-
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
-
nicoco
uv can install "system packages" too, although I have no idea about whether that actually is something in windows
-
lovetox
nicoco: why would this be weird, how would it be possible differently?
-
nicoco
poetry, uv (and probably hatch and others) have their own syntax for that
-
nicoco
uv uses: ```toml [dependency-groups] dev = [ "coverage>=7.6.10", "emoji>=2.14.0", [...] ``` for instance
-
lovetox
So what's weird? Still is defined as extra
-
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]`
-
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]` ↺
-
nicoco
[project.optional-dependencies] has consequence when publishing to PyPI, for instance
-
lovetox
Why do you thing extras should be used only for runtime requirements?✎ -
lovetox
Why do you think extras should be used only for runtime requirements? ✏
-
nicoco
it's not me
-
nicoco
who think that
-
nicoco
but people writing project management tools like uv and poetry
-
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
-
nicoco
the example even includes a "tests" extra
-
lovetox
Surprise 😄
-
nicoco
Well, the people behind uv and poetry disagree, and I think it's fair to assume they have valid reasons.
-
nicoco
I know I have a use-case for slidge
-
nicoco
I use some very custom sphinx extensions for document, which I don't particularly want to publish to PyPI.
-
nicoco
Stuff not published on PyPI is forbidden in [project.optional-dependencies] and prevents publishing on PyPI.
-
lovetox
The same with extras
-
nicoco
But uv lets you define a custom pypi index, or even "git dependencies", and you can use those in [dependency-groups]
-
nicoco
> The same with extras Yes, precisely my point, with uv "dependency groups" you can put stuff that is not necessarily on PyPI. ↺
-
lovetox
Ok but how is that relevant, do we need something that is not on pypi?
-
nicoco
absolutely not, lol
-
nicoco
just discussing is all ;)
-
nicoco
well actually gajim does define "git dependencies"
-
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?
-
lovetox
No
-
lovetox
Makes not much sense as it has no python dependencies✎ -
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.
-
lovetox
Makes not much sense as it has non python dependencies ✏
-
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? :) ↺
-
lovetox
We also need to install files into system locations
-
lovetox
No tool can do this to my knowledge
-
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.
-
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 :)
-
lovetox
yeah its a bit sad that we cannot have a dev env thats independent of the system
-
lovetox
it will always stay compatible with latest ubuntu
👍 1 -
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.
-
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.
-
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
-
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
-
lovetox
about the markers, it is our concept that we store messages without looking at the database beforehand
-
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
-
lovetox
our concept is that we store messages and metadata without any checks.
-
lovetox
you apply your logic and checks when you retrieve the data, then you can apply whatever logic is needed
-
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
-
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. ↺
-
astaboy
hello
-
astaboy
Does prosody server support SCRAM-SHA1-PLUS ?
-
mebs
yes, i see people logging to my prosody with SCRAM-SHA-1-PLUS
-
mebs
speaking of this, does gajim support channel binding?
-
lovetox
No
-
bigbellyboy
where do I find my xmpp address
-
lovetox
Click the avatar in the left bottom
-
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
-
lovetox
Yes Gajim does not support channel binding