@orsinium For the record; adding `from json import JSONDecodeError` to the top of the file and using JSONDecodeError directly in @deal.raises instead of json.JSONDecodeError made the deal contract violation go away.
@orsinium I get it, sorry for bothering you !
I'm trying to use @deal.raises on a django form method, but I'm having an issue. I made raises declare django.forms.ValidationError and then ran flake8, which told me the function could also raise a json.JSONDecodeError, so I tried adding that to the declaration: @deal.raises(forms.ValidationError, json.JSONDecodeError)
But flake8 keeps bringing up this error: DEL021 raises contract error (JSONDecodeError), pointing to the line that does the json.load().
Here's a link to the function in question: https://github.com/LesFruitsDefendus/saskatoon-ng/blob/a8ff461cda57b4097e302b5fb2e35b9e356aa1d3/saskatoon/harvest/forms.py#L540
@orsinium I wasnt sure if deal would do runtime type checking at the same time as the contract checks, but after testing it does not do it. So I added @typecheck to my functions and now I get both. But would a @deal.typecheck that can be wrapped in @deal.chain make sense ? (since I dont think I can wrap @typecheck in @deal.chain directly)
Hi @orsinium thanks for Deal, it's exactly what I've been looking for in dynamic languages like python.
I'm trying to work out how to set up @deal.cases, but I'm getting a python error:
```
/usr/local/lib/python3.9/site-packages/deal/_testing.py:65: in _check_result
...
E AttributeError: module 'typeguard' has no attribute 'CallMemo'
/usr/local/lib/python3.9/site-packages/typeguard/__init__.py:43: AttributeError
```
I'm running deal v4.24.5 and python 3.9.23, the following plugins are listed by pytest: hypothesis-5.49.0, typeguard-4.4.4, django-4.11.1.
I can see that the actual function is being run with expected results too. It does a call to the database with it's inputs, I can upload the actual code tomorrow if it's not evident.
Hey @VoidLinux Is there a problem with the mirrors right now ? I'm getting the following output:
[patrick@trantor ~]$ sudo xbps-install -Syu
[*] Updating repository `https://mirrors.servercentral.com/voidlinux/current/x86_64-repodata' ...
SSL_connect returned 1
ERROR: [reposync] failed to fetch file `https://mirrors.servercentral.com/voidlinux/current/x86_64-repodata': Operation not permitted
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
My #fosdem 25 presentation is out !
Push based hypermedia with #datastar
https://video.fosdem.org/2025/ub5230/fosdem-2025-6316-push-based-hypermedia-with-datastar.av1.webm
Find the slides here: https://fosdem25-datastar.fly.dev/page/intro.html
I didnt know #Nanovms had ported #OpenBSD pledge / unveil to their #unikernel
That's pretty cool
https://nanovms.com/dev/tutorials/applying-sandbox-security-node-js-unikernels-openbsd-pledge-unveil
I want to package a go program for #Guix and I'd like to look at the package definitions for other go programs, but https://packages.guix.gnu.org/ has been giving me 502 errors since at least yesterday.
I know I can do `guix edit package-name` but I dont know what go based software has been packaged.
First victory was getting nonguix to work (since the nonguix images on gitlab where not booting for me), second was getting /etc/hosts to be configured via guile. I'm hoping third will be managing to create a package, but well see haha.
My laptop is now running #NonGuix.
I'm still running #OpenBSD on my server and I'll put OpenBsd back on this laptop when my mnt pocket reform comes in, but having my filesystem disklabel corrupt itself meant I needed a small break from dealing with the OpenBsd filesystem (in the context of an unstable laptop with a poor battery).
It's taking me some work to start getting comfortable with #Guix, but it's the deep #Guile dive I've been meaning to do for a while.
I'm very impressed by the #Anvil editor. It's a #plan9 #acme lookalike with some extra toys like syntax highlighting.
I sometimes miss syntax highlighting in acme, so I'll play with it for a bit.
And by syntax highlighting all I want is the ability to display code, comments and primitive values like text in different colours. Mostly in the interest of spotting misclosed quotation marks more easily.
This browser based #Oberon emulator is pretty awesome https://schierlm.github.io/OberonEmulator/
Here are the slides for my #fosdem #javascript #datastar presentation
https://fosdem25-datastar.fly.dev/page/intro.html
I'll publish the recording when it's ready.
Le 203 in Brussels is a great #restaurant with good #food, I can recommend it to anyone who's not a vegetarian.
Looking forward to #fosdem25 ! I'll be kicking off the #javascript devroom on sunday with a talk on #datastar https://fosdem.org/2025/schedule/event/fosdem-2025-6316-push-based-hypermedia-with-datastar/
@solene hmm, no dice. I'm trying to figure out compilation of an arcan fossil checkout with pdf support, ld complains that it cant find the libraries while they're all installed though pkg_add.
The other dependencies work just fine.
I'm trying to figure out how to pass flags to ld(1) through a make(1) invocation on #OpenBSD
ld cant find libraries that are installed and I'd like to pass the -v flag to it.
Programmer
/ Skier
/ Forager